Deploy custom geoJSON (Example INDOOR 3D MAP)

Hi,

if you want to deploy a own *.geojson, here is a walktrough:

add to mapsettings.json after *mbtiles:


    "floorplan": {
      "type": "geojson",
      "data": "path_to/indoor.geojson"
    }

should look like:

 "version": 8,
  "sources": {
    "vector_tiles": {
      "type": "vector",
      "url": "mbtiles://mapdata.mbtiles"
    },
    "floorplan": {
      "type": "geojson",
      "data": "path_to/indoor.geojson"
    }
  },

then you have to add the geojson informations:

   {
      "id": "room-extrusion",
      "type": "fill-extrusion",
      "source": "floorplan",
      "paint": {
      "fill-extrusion-color": ["get", "color"],
      "fill-extrusion-height": ["get", "height"],
      "fill-extrusion-base": ["get", "base_height"],
      "fill-extrusion-opacity": 0.5
      }
    },

4 Likes