0

この記事に従って、GoogleRefineを使用してExcelからgeojsonファイルを取得します。 http://support.mapbox.com/kb/tilemill/converting-addresses-in-spreadsheets-to-custom-maps-in-tilemill

毎回まったく同じテンプレートを使用しているときに、データソースを読み込めないというエラーメッセージが表示されることがあるという奇妙な問題が発生しました。唯一違うのは、ロードしているデータのようです。また、2つのgeojsonファイル(1つは機能しているものと1つは機能していないもの)を比較すると、違いはわかりません。

誰かが問題が何であるか知っていますか?..それはスペース/休憩の使用またはおそらく何か??

これは機能しています:

    {
        "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
        }
    },
...
...
...

}
  ]
}

これが私にエラーを与えている間;

{
    "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

2番目のものには余分な'}'があります。しかし、もちろん、これは...を追加するときに削除したもののためにこのように見えるだけかもしれません。したがって、機能していないものすべてを投稿しない限り、言うことは不可能です。

ヒント:一致する中括弧を強調表示するテキストエディターを見つけてください。ほとんどの場合、JavaScriptまたはjsonコードを表示していることをエディターに伝える場合にこれを行う必要があります。

于 2011-07-15T21:17:29.073 に答える
0

申し訳ありませんが..それは結局のところデータにあるものでした:(..タイルミルは、受け入れるものとそうでないものが非常に厳密です..

于 2011-07-28T14:55:52.673 に答える