How to change View center without triggering layer requests
See original GitHub issueIs your feature request related to a problem? Please describe.
Hi, I’d like to know if it is possible to change a View
center without automatically triggering layer requests (WMS, WMTS…).
I have tried map.getView().set('center', [ lon, lat], true);
using the opt_silent
parameter but the view is not moving at all.
Describe the solution you’d like
In OL2 you could use setCenter
on a Map
object with the dragging
parameter set to false
. Is there any equivalent in OL6? Thanks.
setCenter: function( lonlat,
zoom,
dragging, // {Boolean} Specifies whether or not to trigger movestart/end events
forceZoomChange )
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
OpenLayers v7.2.2 API - Class: View
A View object represents a simple 2D view of the map. This is the object to act upon to change the center, resolution,...
Read more >Configuring CC and follower permissions - Zendesk help
In Admin Center, click Objects and rules in the sidebar, then select Tickets > Settings. In the CCs and followers section, select the...
Read more >MapView | API Reference | ArcGIS Maps SDK for JavaScript ...
To render a map and its layers in 3D, see the documentation for SceneView. ... Represents the view's center point; when setting the...
Read more >Triggering click event on Leaflet map? - GIS Stack Exchange
One approach that I have tried (and which works) is to identify the object in the leaflet layer and to trigger a click...
Read more >Adding Interactivity - deck.gl
Controlling the Camera. Out of the box, deck.gl offers viewport controllers that map keyboard, mouse or touch input to camera state change. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nboisteault What @mike-000 said only applies to tile layers. In your case the layer is an image layer, which usually does not load new images during panning. You can see that in https://openlayers.org/en/latest/examples/wms-image.html. I’m surprised to see the requests in your example. Looks like you might have some custom loading behavior that triggers this.
Yes. a standard ImageWMS source behaves in a similar way to the previous vector source with bbox strategy example when an animating state is maintained https://codesandbox.io/s/wms-image-forked-k7xcjz?file=/main.js