wp-plugin-leaflet-map icon indicating copy to clipboard operation
wp-plugin-leaflet-map copied to clipboard

Subdomain as array

Open sigg3 opened this issue 2 years ago • 1 comments

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?

sigg3 avatar Sep 02 '21 12:09 sigg3

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.

bozdoz avatar Feb 14 '22 19:02 bozdoz