0

Im following this article to get a geojson file from an excel using Google Refine. http://support.mapbox.com/kb/tilemill/converting-addresses-in-spreadsheets-to-custom-maps-in-tilemill

Now I've got the weird issue that I sometimes get the error message that the Datasource could not be loaded, while I'm using the exact same template everytime. The only thing different seems to be the data I'm loading. Also if I compare the 2 geojson files (1 that is working and 1 that is not) I can see no difference.

Does anyone know what the problem could be? .. is it the use of spaces/breaks or whatever perhaps??

This one is working:

    {
        "type": "FeatureCollection",
        "features": [
        { 
          "type": "Feature",
          "id": 25.019909,
          "geometry": { "type": "Point", "coordinates": [121.365599, 25.019909] }, 
          "properties":


      {
          "Users" : 1
        }
    },
        { 
          "type": "Feature",
          "id": 24.446706,
          "geometry": { "type": "Point", "coordinates": [117.818197, 24.446706] }, 
          "properties":


      {
          "Users" : 1
        }
    },
        { 
          "type": "Feature",
          "id": 25.100632,
          "geometry": { "type": "Point", "coordinates": [117.03403, 25.100632] }, 
          "properties":


      {
          "Users" : 1
        }
    },
        { 
          "type": "Feature",
          "id": 47.354348,
          "geometry": { "type": "Point", "coordinates": [123.918186, 47.354348] }, 
          "properties":


      {
          "Users" : 1
        }
    },
        { 
          "type": "Feature",
          "id": 30.199652,
          "geometry": { "type": "Point", "coordinates": [115.03852, 30.199652] }, 
          "properties":


      {
          "Users" : 3
        }
    },
...
...
...

}
  ]
}

While this one is giving me the error;

{
    "type": "FeatureCollection",
    "features": [    { 
      "type": "Feature",
      "id": 25.019909,
      "geometry": { "type": "Point", "coordinates": [121.365599, 25.019909] }, 
      "properties":


  {
      "Users" : 1
    }
},
    { 
      "type": "Feature",
      "id": 24.446706,
      "geometry": { "type": "Point", "coordinates": [117.818197, 24.446706] }, 
      "properties":


  {
      "Users" : 1
    }
},
    { 
      "type": "Feature",
      "id": 25.100632,
      "geometry": { "type": "Point", "coordinates": [117.03403, 25.100632] }, 
      "properties":


  {
      "Users" : 1
    }
},
...
...
...
}
  ]
}
4

2 回答 2

1

你在第二个中有一个额外的'}'。但是,当然,这可能只是因为您在添加 ... 时删除的内容而看起来如此,所以除非您发布整个不起作用的东西,否则不可能说出来。

提示:找到一个突出匹配大括号的文本编辑器 - 如果您告诉编辑器您正在查看 javascript 或 json 代码,大多数人应该这样做。

于 2011-07-15T21:17:29.073 回答
0

对不起..它毕竟是数据中的东西:( .. tilemill 在它接受的内容和显然不接受的内容方面非常严格..

于 2011-07-28T14:55:52.673 回答