I'm implementing a feature for users to select a list item that corresponds to a point on the map. I am currently able to set the correct map center and the zoom level but the map tiles are blank until I cause a MouseWheelZoom interaction to occur on the map. How do I get my WMTS layers to update to the new zoom level and map extent?
标签:
openlayers-3
相关问题
- No such property: geometry when updating feature i
- How to make Stroke opacity work in OpenLayers 3
- Get all features from the Openlayers 3 viewport
- How to disable DragPan in OpenLayers 3?
- Creating Heatmap in OpenLayers with Vector Source
相关文章
- getFeatures() is empty
- Updating to OpenLayers 3 [closed]
- Display WFS layer in ol3
- Openlayers 3: add text label to feature
- Javascript editing WFS from GeoServer using OpenLa
- Performance test OpenLayers vs Leaflet
- OpenLayers. How to refresh cluster?
- How to get coordinates on double click on Openstre
In principle, changing the
tileUrlFunction
of a WMTS source will trigger a refresh, because that clears the tile cache. If you're lucky and your WMTS server makes proper use of Etags, just using the same url function again will work:If your WMTS server just sets expire headers, you'll have to append something to the url to force the browser to refetch it. Assuming you use KVP encoding to talk to your WMTS server, you could achieve this by doing something like