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

Hi,

Has there been any changes in this?

I am running the openremote/custom-project template.
I have an instance of it running, I downloaded an mbtiles map file and added it to the custom-project/deployment/map/ directory as stated in the documentation here.

I would like to add custom geojson layers to my map. So far I merged two geojson files that I had, into one and the only way I can manage to get it working is by using the manager UI Settings–>Appearance section using this button:
image

That in turn updates my mapsettings.json file and stores it in the containers storage directory based on the docker logs after clicking save:

“Saving map_settings.json to: /storage/manager/mapsettings.json”

That was okay, however I cannot understand how to edit the map, to add colours as in the example above by @Denis .

I have tried the above, with no luck. I also noticed that if I try to add a source and geojson information to customise it, as above, it doesn’t work. My geojson file is in the same directory as the mapsettings.json file. In fact, if I copy the mapsettings.json file after adding the geojson data over the manager UI, and replace the mapsettings.json file in the deployment/map directory with this, restart my containers it doesn’t show the geojson data at all.

The documentation seems a little confusing as I am new to all this, I did see a post here that mentioned editing the manager_config.json and not the mapsettings.json here.

I must be missing something very obvious here.