wp-plugin-leaflet-map
wp-plugin-leaflet-map copied to clipboard
Subdomain as array
Does the plugin support subdomain as an array of strings? LeafletJS accepts subdomains as an array, cf. https://leafletjs.com/reference-1.7.1.html#tilelayer
I have a target that is approximately https://{s}.mapdataserv.ext/{x}/{y}/{z}
In this problem case, the subdomains are not single letters but "cache", "cache2" and "cache3".
I have the option of using e.g. subdomains="23"
and https://cache{s}.mapdataserv.ext/{x}/{y}/{z}
, but this seems to fail. No map is loaded and the console shows an No value provided for variable s
error. Even if it worked, it would ignore the "cache" subdomain (no postfix).
Alternatively I can use an array like subdomains=["cache", "cache2", "cache3"]
, but this currently does not work (breaks the tags). This entails having to set the subdomains in JS, amirite?
How would I proceed to make sure requests span all 3 subdomains?
Right. Currently this plugin only accepts the first type for the subdomains property: https://leafletjs.com/reference.html#tilelayer-subdomains which is just a String.
It does not accept String[], but it should.