简体   繁体   English

传单js奇怪的地图行为

[英]leaflet js strange map behavior

I am having some strange behavior with my leafletjs map. 我的leafletjs地图有一些奇怪的行为。 I've tried plotting a few polylines between north america and asia, but get the polyline split into two pieces. 我尝试在北美和亚洲之间绘制一些折线,但是将折线分为两部分。

Is there a way to fix this? 有没有办法解决这个问题?

在此处输入图片说明

You did not add any code with your request so it is no easy to respond you correctly 您没有在请求中添加任何代码,因此正确回复您并不容易

Likely you need to split each polyline in two parts, else they directly jump to the other part of the world passing over the europe. 您可能需要将每条折线分为两部分,否则它们会直接跳到穿越欧洲的世界的另一部分。 Then try to center the map on the pacific ocean and not in the europe in order to get a better map. 然后尝试将地图的中心放在太平洋而不是欧洲的中心,以获得更好的地图。

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

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