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

        <bdo id='icp4m'></bdo><ul id='icp4m'></ul>
      <legend id='icp4m'><style id='icp4m'><dir id='icp4m'><q id='icp4m'></q></dir></style></legend>
      <i id='icp4m'><tr id='icp4m'><dt id='icp4m'><q id='icp4m'><span id='icp4m'><b id='icp4m'><form id='icp4m'><ins id='icp4m'></ins><ul id='icp4m'></ul><sub id='icp4m'></sub></form><legend id='icp4m'></legend><bdo id='icp4m'><pre id='icp4m'><center id='icp4m'></center></pre></bdo></b><th id='icp4m'></th></span></q></dt></tr></i><div id='icp4m'><tfoot id='icp4m'></tfoot><dl id='icp4m'><fieldset id='icp4m'></fieldset></dl></div>
    1. <tfoot id='icp4m'></tfoot>
    2. 将外部geojson添加到传单层

      时间:2023-08-09
    3. <small id='CBcuY'></small><noframes id='CBcuY'>

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

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

                <i id='CBcuY'><tr id='CBcuY'><dt id='CBcuY'><q id='CBcuY'><span id='CBcuY'><b id='CBcuY'><form id='CBcuY'><ins id='CBcuY'></ins><ul id='CBcuY'></ul><sub id='CBcuY'></sub></form><legend id='CBcuY'></legend><bdo id='CBcuY'><pre id='CBcuY'><center id='CBcuY'></center></pre></bdo></b><th id='CBcuY'></th></span></q></dt></tr></i><div id='CBcuY'><tfoot id='CBcuY'></tfoot><dl id='CBcuY'><fieldset id='CBcuY'></fieldset></dl></div>
              2. 本文介绍了将外部geojson添加到传单层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我是传单和 JavaScript 的新手.我在想我可以使用 geocommons 和 GeoJSON 来托管地图项目的数据.

                I am new to leaflet and JavaScript. I was thinking I could use geocommons and GeoJSON to host data for a mapping project.

                我发现 外部 GeoJSON 和 Leaflet:另一种方式).本教程使用传单插件读取外部 GeoJSON,但我无法获得它来获取要在我的地图上渲染的点.代码的地图部分渲染良好,但 GeoJSON 不会出现.

                I found External GeoJSON and Leaflet: The Other Way(s). This tutorial on reading external GeoJSON using a leaflet plugin but I haven't been able to get it to get the points to render on my map. The map portion of the code renders fine but the GeoJSON won't appear.

                var geojsonLayer = new L.GeoJSON.AJAX("http://geocommons.com/datasets/168923/features.json?lat=53.796&amp;lon=-1.551&amp;radius=3&amp;callback=?", {onEachFeature:popUp});
                
                function popUp(feature, layer) {
                  layer.bindPopup(feature.properties.name);
                }
                
                geojsonLayer.addTo(myMap);
                

                推荐答案

                保存leaflet.ajax plugin as leaflet.ajax.min.js 在与您的 html 页面相同的文件夹中,然后通过在其间添加此行来调用它<head> 标签

                Save the leaflet.ajax plugin as leaflet.ajax.min.js in the same folder as your html page, then call it by adding this line in between the <head> tags

                <script src="leaflet.ajax.min"></script>
                

                这篇关于将外部geojson添加到传单层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:将 Leaflet 图层控件添加到侧边栏 下一篇:如何更改 LeafletJS 中的默认加载磁贴颜色?

                相关文章

                最新文章

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

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

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

                    <tfoot id='SIwO2'></tfoot>

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