0

例を mapbox.js https://www.mapbox.com/mapbox.js/example/v1.0.0/filtering-marker-clusters/から変更したいと思います。今私の問題は、代わりにローカルの geojson 変数を使用したいということです

    .loadURL('/mapbox.js/assets/data/stations.geojson') 

お気に入り

var geojson = {
"features": [
{
  "type": "Feature",
  "properties": {
    "name": "Van Dorn Street",
    "marker-color": "#0000ff",
    "marker-symbol": "rail-metro",
    "line": "blue"
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      -77.12911152370515,
      38.79930767201779
    ]
  }
},
{
  "type": "Feature",
  "properties": {
    "name": "Franconia-Springfield",
    "marker-color": "#0000ff",
    "marker-symbol": "rail-metro",
    "line": "blue"
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      -77.16797018042666,
      38.766521892689916
    ]
  }
}

]

4

1 に答える 1