久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='HBiGR'></tfoot>

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

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

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

        使用傳單獲取 geojson 大陸/國家/州的中心

        Get center of geojson Continent/Country/State with leaflet(使用傳單獲取 geojson 大陸/國家/州的中心)
      2. <i id='FOZNl'><tr id='FOZNl'><dt id='FOZNl'><q id='FOZNl'><span id='FOZNl'><b id='FOZNl'><form id='FOZNl'><ins id='FOZNl'></ins><ul id='FOZNl'></ul><sub id='FOZNl'></sub></form><legend id='FOZNl'></legend><bdo id='FOZNl'><pre id='FOZNl'><center id='FOZNl'></center></pre></bdo></b><th id='FOZNl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FOZNl'><tfoot id='FOZNl'></tfoot><dl id='FOZNl'><fieldset id='FOZNl'></fieldset></dl></div>
        • <legend id='FOZNl'><style id='FOZNl'><dir id='FOZNl'><q id='FOZNl'></q></dir></style></legend>

                <tbody id='FOZNl'></tbody>
              <tfoot id='FOZNl'></tfoot>
              • <bdo id='FOZNl'></bdo><ul id='FOZNl'></ul>
                • <small id='FOZNl'></small><noframes id='FOZNl'>

                • 本文介紹了使用傳單獲取 geojson 大陸/國家/州的中心的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  有沒有辦法為由多個多邊形對象組成的國家/大陸(例如美國、加拿大,除了主要陸地部分還有一個島嶼)找到一個中心?我試圖使用傳單的 Layer.getCenter() 甚至 Layer.getBounds().getCenter(),但這些方法肯定不適用于這類國家并返回no-go"結果.

                  可以通過以下鏈接(傳單游樂場)查看示例.只需滾動并單擊美國或加拿大,然后查看 circleMarker 將出現的位置.然后嘗試點擊較小的實體,例如美國南部的一些島嶼,他們會將此標記精確地放置在它們的中心:


                  (來源:postgis.net)

                  (圖 1.根據 PostGIS 的 ST_Centroid 文檔的多邊形質心)

                  所以我猜你真正想問的是:

                  <塊引用>

                  給定一個多邊形或多多邊形,我如何計算一個中心(或類似中心的點),它保證在多邊形內并在視覺上看起來在它的中心,以便使用 Leaflet 將符號器添加到該點?

                  為此,答案是 極難訪問" 由 實現polylabel:?多邊形輪廓最遠的內部點?.

                  Is there a way of finding a center for countries/continents which consist of more than one polygon object(ex. USA, Canada, which have an islands besides main land part)? I was trying to use leaflet's Layer.getCenter() or even Layer.getBounds().getCenter(), but those methods certainly don't work for this type of countries and return a "no-go" results.

                  Example can be seen by the following link (leaflet playground). Just scroll and click on US or Canada and see where circleMarker will appear. Then try clicking on smaller entities, like some islands on south of US, they shall place this marker precisely on center of'em:

                  http://playground-leaflet.rhcloud.com/voyi/1/edit?html,output

                  解決方案

                  Leaflet can only calculate the center of the bounding box of a feature. With a bit of help from other libraries (such as Turf.js) you can calculate the centroid of the polygon or (multipolygon).

                  In any case, you are getting confused because sometimes the centroid is not within the polygon (or multipolygon):


                  (source: postgis.net)

                  (Figure 1. Centroid of a polygon as per PostGIS's ST_Centroid documentation)

                  So I guess that what you really wanted to ask is:

                  Given a polygon or multipolygon, how can I calculate a center (or center-like point) which is guaranteed to be within the polygon and looks visually in the center of it, in order to add symbolizers to that point with Leaflet?

                  And for that, the answer is "pole of inaccessibility" as implemented by polylabel: ?the most distant internal point from the polygon outline?.

                  這篇關于使用傳單獲取 geojson 大陸/國家/州的中心的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發點擊傳單標記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)

                        <tbody id='H1MWx'></tbody>
                    • <tfoot id='H1MWx'></tfoot>
                        <bdo id='H1MWx'></bdo><ul id='H1MWx'></ul>

                          <legend id='H1MWx'><style id='H1MWx'><dir id='H1MWx'><q id='H1MWx'></q></dir></style></legend>

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

                            <i id='H1MWx'><tr id='H1MWx'><dt id='H1MWx'><q id='H1MWx'><span id='H1MWx'><b id='H1MWx'><form id='H1MWx'><ins id='H1MWx'></ins><ul id='H1MWx'></ul><sub id='H1MWx'></sub></form><legend id='H1MWx'></legend><bdo id='H1MWx'><pre id='H1MWx'><center id='H1MWx'></center></pre></bdo></b><th id='H1MWx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='H1MWx'><tfoot id='H1MWx'></tfoot><dl id='H1MWx'><fieldset id='H1MWx'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 国产一区二区三区久久 | 日韩欧美网 | 日韩欧美在线播放 | 日韩欧美精品在线 | 综合久 | 国产精品久久久久久久久久软件 | 欧美男人亚洲天堂 | 日韩欧美精品 | 亚洲成人在线免费 | 亚洲国产成人精品久久久国产成人一区 | 国产精品女人久久久 | 精品毛片视频 | 精品久久久久久久久久久久久久 | 精品在线99 | 久久偷人| 成人免费视频在线观看 | 久久成人国产精品 | 精品国产精品一区二区夜夜嗨 | 免费一级毛片 | 久久久久久九九九九 | 亚洲一区中文 | 91精品国产自产精品男人的天堂 | 色一情一乱一伦一区二区三区 | 国产91在线播放 | 成人在线精品视频 | 亚洲福利在线视频 | 一区二区免费高清视频 | 欧美极品一区二区 | 91久久久久久久久久久 | 国产成人91视频 | 国产精品美女久久久久久免费 | 不卡的av一区 | 91一区二区三区 | av一级久久 | 成人一区在线观看 | 91久久久久久 | 超碰日本 | 成人一区二区三区在线 | 美女久久久久久久 | 国产真实精品久久二三区 | 91丨九色丨国产在线 |