[R-sig-Geo] mapview with custom tiles

Marcel Stadelmann marcel.stadelmann at gmx.net
Wed Sep 21 14:06:53 CEST 2016


Hello,

Is it possible to use mapview with custom tiles without the predefined basemaps? In leaflet it is possible with the addTiles() function and a url (urlTemplate). It should work something like:

library(mapview)
mapview(gadmCHE)@map %>% addTiles(urlTemplate = 'http://localhost:8000/tiles8/{z}/{x}/{y}.png',options = tileOptions(minZoom = 2, maxZoom = 8, tms = TRUE))

In this the local computer serves the tiles with SimpleHTTPServer
$ python -m SimpleHTTPServer 8000

The problem is, that it's not possible to switch off the preconfigured basemaps and those are overwriting my local tiles.

Thanks,
Marcel


More information about the R-sig-Geo mailing list