添加数据geojson传单

时间:2019-12-05 18:04:29

标签: leaflet geojson

我正在尝试使用带有geojson脚本的传单创建地图,但是我可以更动态地添加属性,但不会完成

脚本如下:

var countries =
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "state_code": [1],
                "state_name": "Aguascalientes",
                "style": {
                    "fillColor": "# 00441B",
                    "popupContent": "Aguascalientes"
                }
            },
            "geometry": {
                ........

我可以添加以下信息:

var countries = 
{
    "type":"FeatureCollection",
    "features":[
        {
            "type":"Feature",
            "properties":{
                "media" : ? <-------------------------------------------------------------------
                "state_code": [1],
                "state_name":"Aguascalientes",
                "style":{
                    "fillColor":"#00441B",
                    "popupContent":"Aguascalientes"
                }
            },
            "geometry":{

如果您能帮助我,我将不胜感激

0 个答案:

没有答案