Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/slippySpatial.r
Generates tiles and a tile-based slippy map based on the Leaflet Javascript library, from a Spatial class object. At the moment it's only tested on SpatialPolygons, especially for the plotting options
1 | slippySpatial(sp, zoom = c(3, 9), output, col = "white", border = "black", browse = TRUE)
|
sp |
A Spatial* class object. |
zoom |
A vector with the minimum and maximum zoom levels to be rendered. |
output |
Map output location. |
col |
Fill colour of polygons, can be a vector. |
border |
Border colour of polygons, can be a vector. |
browse |
Launch a browser to display the map when complete. |
Currently renders a Spatial object to tiles, produces the HTML/Javascript code to display it. No projection of raster into the correct coordinate system currently takes place, so geographic WGS84 rasters are required. Note that there is a web Mercator error at small scales that I'm working on fixing.
Launches a browser window displaying the map, and returns the location of the index.html file.
Grant Williamson
slippyRaster
1 2 | tes=readShapePoly("clusters.shp")
slippySpatial(tes,zoom=c(2,4),output="alps3",col="blue",border="black",browse=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.