0
votes

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 enter image description here

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?

2

2 Answers

2
votes

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

2
votes

Set wrapX option to false when you create the source to prevent this.