1. <legend id='YwVD4'><style id='YwVD4'><dir id='YwVD4'><q id='YwVD4'></q></dir></style></legend>

        <small id='YwVD4'></small><noframes id='YwVD4'>

        <tfoot id='YwVD4'></tfoot>
          <bdo id='YwVD4'></bdo><ul id='YwVD4'></ul>

        <i id='YwVD4'><tr id='YwVD4'><dt id='YwVD4'><q id='YwVD4'><span id='YwVD4'><b id='YwVD4'><form id='YwVD4'><ins id='YwVD4'></ins><ul id='YwVD4'></ul><sub id='YwVD4'></sub></form><legend id='YwVD4'></legend><bdo id='YwVD4'><pre id='YwVD4'><center id='YwVD4'></center></pre></bdo></b><th id='YwVD4'></th></span></q></dt></tr></i><div id='YwVD4'><tfoot id='YwVD4'></tfoot><dl id='YwVD4'><fieldset id='YwVD4'></fieldset></dl></div>

        如何在 180° 子午线附近显示传单标记?

        时间:2023-05-28

          <small id='Y6Mos'></small><noframes id='Y6Mos'>

            <legend id='Y6Mos'><style id='Y6Mos'><dir id='Y6Mos'><q id='Y6Mos'></q></dir></style></legend>
              <bdo id='Y6Mos'></bdo><ul id='Y6Mos'></ul>
              1. <tfoot id='Y6Mos'></tfoot>

              2. <i id='Y6Mos'><tr id='Y6Mos'><dt id='Y6Mos'><q id='Y6Mos'><span id='Y6Mos'><b id='Y6Mos'><form id='Y6Mos'><ins id='Y6Mos'></ins><ul id='Y6Mos'></ul><sub id='Y6Mos'></sub></form><legend id='Y6Mos'></legend><bdo id='Y6Mos'><pre id='Y6Mos'><center id='Y6Mos'></center></pre></bdo></b><th id='Y6Mos'></th></span></q></dt></tr></i><div id='Y6Mos'><tfoot id='Y6Mos'></tfoot><dl id='Y6Mos'><fieldset id='Y6Mos'></fieldset></dl></div>

                  <tbody id='Y6Mos'></tbody>
                  本文介绍了如何在 180° 子午线附近显示传单标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在使用 Leaflet 1.0.0-rc.2+e02b5c9.我知道默认将所有标记、折线...从经度 -180 到 180 渲染为此处的屏幕截图:

                  I am using Leaflet 1.0.0-rc.2+e02b5c9. I know the default is rendering all markers, polylines ... from longitude -180 to 180 as screen shot here:

                  但是,我想将地图显示为此时要显示的经度(它位于日本和美国之间的中海):

                  However, I want to show the map as this longitude I want to show at this point (It is middle sea between Japan and US):

                  但您会看到所有标记都未呈现在右侧.即使,如果我设置

                  but you see all the markers are not rendered on the right side. Even though, If i set

                  worldCopyJump: true
                  

                  当我向右拖动时,所有标记都出现在右侧,但它们在左侧消失,反之亦然.实际上,我希望它们同时出现.

                  when I drag to the right, all markers are appeared on the right but they are disappeared on the left and vice versa. Actually, I want they are appeared at the same time.

                  有什么办法可以解决这个问题吗?

                  Any ideas to fix that??

                  推荐答案

                  只要确保标记的经度在 0..360 范围内,而不是在 范围内 -180..180.查看工作示例.

                  Just make sure that the longitudes of your markers are in the range 0..360 instead of in the range -180..180. See a working example.

                  即而不是

                  L.marker([0,170]).addTo(map);
                  L.marker([0,-180]).addTo(map);
                  L.marker([0,-170]).addTo(map);
                  

                  做类似的事情

                  L.marker([0,170]).addTo(map);
                  L.marker([0,180]).addTo(map);
                  L.marker([0,190]).addTo(map);
                  

                  换句话说,如果经度小于零,则在其上加上 360.如果您打算一次过滤所有经度,则可能需要使用 L.Util.wrapNum(lng, [0,360], true).

                  In other words, if a longitude is smaller than zero, add 360 to it. You might want to use L.Util.wrapNum(lng, [0,360], true) instead, if you plan to filter all your longitudes at once.

                  这篇关于如何在 180° 子午线附近显示传单标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:传单事件:如何传播到重叠层 下一篇:如何让传单地图画布具有 100% 的高度?

                  相关文章

                  最新文章

                  1. <legend id='NlsSc'><style id='NlsSc'><dir id='NlsSc'><q id='NlsSc'></q></dir></style></legend>
                    • <bdo id='NlsSc'></bdo><ul id='NlsSc'></ul>
                    <i id='NlsSc'><tr id='NlsSc'><dt id='NlsSc'><q id='NlsSc'><span id='NlsSc'><b id='NlsSc'><form id='NlsSc'><ins id='NlsSc'></ins><ul id='NlsSc'></ul><sub id='NlsSc'></sub></form><legend id='NlsSc'></legend><bdo id='NlsSc'><pre id='NlsSc'><center id='NlsSc'></center></pre></bdo></b><th id='NlsSc'></th></span></q></dt></tr></i><div id='NlsSc'><tfoot id='NlsSc'></tfoot><dl id='NlsSc'><fieldset id='NlsSc'></fieldset></dl></div>

                    <small id='NlsSc'></small><noframes id='NlsSc'>

                    <tfoot id='NlsSc'></tfoot>