是否有一个Leaflet Library可以在GeoJSON中显示其他属性?

时间:2019-01-28 14:16:22

标签: leaflet geojson

图书馆:

https://github.com/mapbox/togeojson

将KML转换为GeoJSON,并且每个功能都包含属性。但是,通过以下方式将功能添加到Leaflet映射中:

L.geoJSON(feature).addTo(map);

其中的功能是:

   {
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [
                -122.0857667006183,
                37.42156927867553,
                50
            ]
        },
        "properties": {
            "name": "Extruded placemark",
            "styleUrl": "#globeIcon",
            "styleHash": "-2ef4d3ae",
            "description": "Tethered to the ground by a customizable\n          \"tail\"",
            "stroke-width": 2,
            "visibility": "0"
        }
    }

属性将被忽略。我知道您可以通过使用属性中的值自己为GeoJSON添加名称和样式的弹出窗口,但是想知道是否有一个Leaflet库可以完成所有这些工作?

0 个答案:

没有答案