Reputation: 81
Is it possible to disable several points duplication when rotating map horizontally.
For example here https://openlayers.org/en/latest/examples/cluster.html when zoomed out, we can see that there is duplication of the view
I actually do not want this, I need to disable that duplication and have so to say "one world", to be able to drag in only "one world". Any suggestions?
Upvotes: 0
Views: 734
Reputation: 17962
wrapX: false
needs to be specified for every layer, and even then you can still wrap onto empty space. In OpenLayers 6 it is easier to restrict the view extent to the default projection extent with the option
extent: new View().getProjection().getExtent();
https://codesandbox.io/s/cluster-forked-x73r9
Upvotes: 2
Reputation: 1421
Set wrapX option to false when you create the source to prevent this.
Upvotes: 2