slippySpatial: Spatial Layer Slippy Map Generation

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/slippySpatial.r

Description

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

Usage

1
slippySpatial(sp, zoom = c(3, 9), output, col = "white", border = "black", browse = TRUE)

Arguments

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.

Details

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.

Value

Launches a browser window displaying the map, and returns the location of the index.html file.

Author(s)

Grant Williamson

See Also

slippyRaster

Examples

1
2
tes=readShapePoly("clusters.shp")
slippySpatial(tes,zoom=c(2,4),output="alps3",col="blue",border="black",browse=TRUE)

ozjimbob/Rslippy documentation built on May 24, 2019, 5:56 p.m.