Replies: 4 comments
-
Please provide a jsbin/codepen reproduction. |
Beta Was this translation helpful? Give feedback.
-
Link: https://jsfiddle.net/bjycpa91/ You will notice that setUrl call will throw error in the console. And the request made when setting url to the wms was: where as the initial source setting will issue a request like: so the {epsg-3857-bbox} is usually replaced by actual bbox, when you add a source for wms service, but the setUrl does not correspond to the same. |
Beta Was this translation helpful? Give feedback.
-
url and tiles are different, I'm not sure the provided example is a valid use case. |
Beta Was this translation helpful? Give feedback.
-
Well, I needed to update the source periodically to poll on wms if they have new images to provide… so if I update tiles again and again and trigger repaint it would make the entire view port blank out and be drawn again (and you’d notice the blip every time I refresh tiles) For eg: A wms weather source with cloud imagery being able to be show clouds moving around the map smoothly… So I had thought thats what this setUrl would do, by changing the source behind the curtains and supplant bbox with the tile bounds as the tiles are to be served. Do we have a setTiles method then (or in roadmap?) to do the same as one can do for a vector source? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Trying to use map-libre 4.1.0 to dynamically change images from a wms source when refreshed... but the source.setUrl(url) method does not dynamically replace {bbox-esg-3857} with the actual bounding box...
For eg:
the request made to wms is:
https://io.apps.fao.org/geoserver/wms/WAPOR_2/L3_MUV_E_A/v2?&service=WMS&request=GetMap&styles=&format=image/png&transparent=true&crs=EPSG:3857&height=512&width=512&bbox={bbox-epsg-3857}&version=1.3.0&layers=WATER_MM:YEAR:YEAR
while it should have been something like:
https://io.apps.fao.org/geoserver/wms/WAPOR_2/L3_MUV_E_A/v2?&service=WMS&request=GetMap&styles=&format=image/png&transparent=true&crs=EPSG:3857&height=512&width=512&bbox=3130860.6785608195,-626172.1357121654,3443946.7464169003,-313086.06785608083&version=1.3.0&layers=WATER_MM:YEAR:YEAR
maplibre-gl-js version: 4.1.0
browser: Chrome
Steps to Trigger Behavior
Link to Demonstration
Beta Was this translation helpful? Give feedback.
All reactions