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

    • <bdo id='o5NA3'></bdo><ul id='o5NA3'></ul>

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

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

        <tfoot id='o5NA3'></tfoot>

        传单 js:将 POI 绘制为画布

        时间:2023-08-08

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

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

                  <tbody id='Tawxs'></tbody>
                  <bdo id='Tawxs'></bdo><ul id='Tawxs'></ul>
                • <i id='Tawxs'><tr id='Tawxs'><dt id='Tawxs'><q id='Tawxs'><span id='Tawxs'><b id='Tawxs'><form id='Tawxs'><ins id='Tawxs'></ins><ul id='Tawxs'></ul><sub id='Tawxs'></sub></form><legend id='Tawxs'></legend><bdo id='Tawxs'><pre id='Tawxs'><center id='Tawxs'></center></pre></bdo></b><th id='Tawxs'></th></span></q></dt></tr></i><div id='Tawxs'><tfoot id='Tawxs'></tfoot><dl id='Tawxs'><fieldset id='Tawxs'></fieldset></dl></div>
                • 本文介绍了传单 js:将 POI 绘制为画布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想用 Leaflet 绘制许多地理点.因此我想使用 HTML5 画布来提高性能.我的数据源是geoJSON.正如我在 Leaflet 的文档中看到的,目前还不能将地理位置绘制为画布.

                  I want to draw many geo points with Leaflet. Therefore I want to use HTML5 canvas to improve the performance. My datasoure is geoJSON. As I saw in the documention of Leaflet, it is not possible to draw the geo positions as canvas yet.

                  var anotherGeojsonLayer = new L.GeoJSON(coorsField, {
                          pointToLayer: function (latlng){
                              return new L.Marker(latlng, {
                                  icon: new BaseballIcon()
                              });
                          }
                      });
                  

                  我想我应该在这里联系:

                  I think I should hook up here:

                  pointToLayer: 函数 (latlng) { }

                  pointToLayer: function (latlng) { }

                  有人知道如何将我的 latlng 对象绘制为画布吗?

                  Does somebody know how to draw my latlng objects as canvas?

                  推荐答案

                  我是传单作者.您可以通过使用 L.CircleMarker 而不是常规 Marker 来做到这一点,也可以使用实验性 L_PREFER_CANVAS 开关将矢量渲染为画布(而不是 SVG),如下所示:https://github.com/CloudMade/Leaflet/blob/master/debug/vector/vector-canvas.html

                  I'm Leaflet author. You can do this by using L.CircleMarker instead of regular Marker, and also using an experimental L_PREFER_CANVAS switch to render vectors as Canvas (instead of SVG), like this: https://github.com/CloudMade/Leaflet/blob/master/debug/vector/vector-canvas.html

                  这篇关于传单 js:将 POI 绘制为画布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将传单地图导出到 geojson 下一篇:Leaflet React在功能组件中获取地图实例

                  相关文章

                  最新文章

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

                  • <bdo id='KofcQ'></bdo><ul id='KofcQ'></ul>

                • <small id='KofcQ'></small><noframes id='KofcQ'>

                  1. <tfoot id='KofcQ'></tfoot>