简体   繁体   English

OpenLayers 3地图可视化

[英]OpenLayers 3 Map Visualization

Sorry if it is not the right place to ask this, but I couldn't find a answer anywhere and this have been bugging me. 抱歉,如果不是在这个地方提出这个问题,但是我找不到任何答案,这一直困扰着我。 I'm using openLayers 3.8.2 to create a map, and when I zoom out, the maps shows repeatedly... If I zoom out I can see many Americas, many Europes... etc Does anyone know if there is a way to stop it from happening (besides defining a min zoom), because when I drag the map, sometimes, I can see the country I'm working one twice... 我正在使用openLayers 3.8.2创建地图,当我缩小地图时,地图会反复显示...如果缩小,我可以看到很多美洲,很多欧洲...等等有人知道是否有办法阻止它发生(除了定义最小缩放),因为当我拖动地图时,有时可以看到我正在两次工作的国家/地区...

I saw that in a lot of OL examples, like this one. 我在很多OL示例中都看到了这一点。

Thanks! 谢谢!

You can disable this using wrapX: false : 您可以使用wrapX: false禁用此wrapX: false

new ol.layer.Tile({
  source: new ol.source.OSM({
      wrapX: false
  })
})

See it in action: http://jsfiddle.net/war9k831/ 实际观看: http : //jsfiddle.net/war9k831/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM