[R-sig-Geo] leaflet problem

boB Rudis bob at rudis.net
Sat Aug 1 14:35:47 CEST 2015

The documentation for addTiles has this:

             urlTemplate = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
             attribution = NULL,
             layerId = NULL,
             group = NULL,
             options = tileOptions())

By default, when one does:

    wien <- "http://maps{s}.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png"
    leaflet() %>% addTiles(wien)

the underlying leaflet code is issuing calls for tiles like this:


(so, "mapsa" vs "maps1", "mapsb" vs "maps2", etc).

You can specify a different format for the subdomains, but when I do:

    leaflet() %>% addTiles(wien, options=tileOptions(subdomains="1234"))

leaflet does use the numerical subdomain option (i.e. i see calls for
URLs like this):


but I get 404's for those tiles (I may not be authorized though).


On Sat, Aug 1, 2015 at 3:42 AM, Erich Subscriptions
<erich.subs at neuwirth.priv.at> wrote:
> I am creating clickable maps with leaflet and experiencing a problem.
> The documentation seems not to indicate how to specify an urlTemplate for multiple urls
> I want to use
> http://maps{s}.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png <http://maps{s}.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png>
> with the possible values for {s}
> '','1','2','3','4'
> How do I specify this?
>         [[alternative HTML version deleted]]
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

More information about the R-sig-Geo mailing list