1. <small id='dkxRQ'></small><noframes id='dkxRQ'>

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

        检查标记是否在视图中(地图) - mapbox

        时间:2023-08-09
          <tbody id='3FA1b'></tbody>
      4. <tfoot id='3FA1b'></tfoot>
      5. <legend id='3FA1b'><style id='3FA1b'><dir id='3FA1b'><q id='3FA1b'></q></dir></style></legend>

              • <bdo id='3FA1b'></bdo><ul id='3FA1b'></ul>

              • <small id='3FA1b'></small><noframes id='3FA1b'>

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

                  本文介绍了检查标记是否在视图中(地图) - mapbox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想检查标记是在地图视图上还是在地图外.我正在放置地图的标记,但无法检查它是否在 currentView 上.我试过下面的代码.this.map.getBounds().contains(e.layer.getLatLng());但它让我回归真实.地图正在返回其旧的 lat lng,即边界(我认为是这样)

                  I want to check if marker is on mapview or out of the map. I am putting marker of the map and not able to check if it on currentView or not. I have tried below code. this.map.getBounds().contains(e.layer.getLatLng()); but it is returning me true. map is returning its old lat lng i.e bounds (I think so)

                  推荐答案

                  map.getBounds().contains(myMarker.getLatLng())

                  • map.getBounds():返回当前地图视图的 LatLngBounds.

                  • map.getBounds(): Returns the LatLngBounds of the current map view.

                  latLngBounds.contains():如果矩形包含给定点,则返回 true.

                  myMarker.getLatLng():返回标记的当前地理位置.

                  myMarker.getLatLng(): Returns the current geographical position of the marker.

                  另请参阅:地图视点中的区域估计使用传单

                  这篇关于检查标记是否在视图中(地图) - mapbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使折线捕捉到传单中的道路 下一篇:如何在 Leaflet 中显示超出特定缩放级别的标签?

                  相关文章

                  最新文章

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

                  <tfoot id='zDbyK'></tfoot>