Description Usage Arguments See Also Examples
This function creates a new instance of a d3-carto-map and sets its most basic options. By itself the function does not create any layers on the map.
1 2 |
region |
The region to which the map should be centered. This region can
be one of several types. Passing a
two-letter ISO
country code will center the map on that country. The string |
bbox |
Instead of a region, you can center the map on a bounding box.
The bounding box be specified in decimal degrees of latitude and longitude
and should have the following format: |
width |
The width of the map in pixels. |
height |
The height of the map in pixels. |
browser |
Where to display the map. If |
points_layer
, tile_layer
,
topojson_layer
1 2 3 4 5 | if(require(historydata)) {
cartographer(region = "United States") %>%
tile_layer() %>%
points_layer(catholic_dioceses, x = "long", y = "lat")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.