You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to plot an area using the RVectorLayer. I can get this to work nicely if the when the map loads for the first time but even after changing the url I am unable to get the refresh to work. So far I have the following working.
Given a coordinate I can load the map
Given a valid url to the wms service layer I can get the RVectorLayer to display
Given the coordinate changes I can get the RMap to reload at the new coordinate using [view, setView]
I can use a ref to the RVectorLayer to clear the existing source
What I haven't managed to work out is what I need to do to trigger the load with the new URL in place. The refresh method on the RVectorLayer is not working for me.
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered:
RVectorLayer.refresh() is not a public method and has a different meaning from source.refresh() in OpenLayers.
Reusing a source has practically no performance benefit at all - it would be the same if you removed the layer and added a new one. You can add a key= property an update it every time you change the URL - this way React will recreate this layer.
Maybe I should add this into rlayer too - transparently replacing the source every time the URL changes.
Hi,
I have been trying to plot an area using the RVectorLayer. I can get this to work nicely if the when the map loads for the first time but even after changing the url I am unable to get the refresh to work. So far I have the following working.
Given a coordinate I can load the map
Given a valid url to the wms service layer I can get the RVectorLayer to display
Given the coordinate changes I can get the RMap to reload at the new coordinate using [view, setView]
I can use a ref to the RVectorLayer to clear the existing source
What I haven't managed to work out is what I need to do to trigger the load with the new URL in place. The refresh method on the RVectorLayer is not working for me.
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: