Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geographical map: Add GeoJSON layers to map from config #4280

Closed
geppyz opened this issue Mar 1, 2023 · 1 comment · Fixed by #4302
Closed

Geographical map: Add GeoJSON layers to map from config #4280

geppyz opened this issue Mar 1, 2023 · 1 comment · Fixed by #4302
Assignees
Labels
Alliander Issues needed for alliander Enhancement New feature

Comments

@geppyz
Copy link
Contributor

geppyz commented Mar 1, 2023

In the geographical map it would be nice to have a feature to add a custom overlay of geographical data in the form of GeoJSON. This should be configured in the config file and have a feature displayed on the map in combination with OpFab cards that have geographical features.

@geppyz geppyz added Enhancement New feature Alliander Issues needed for alliander labels Mar 1, 2023
@geppyz geppyz self-assigned this Mar 8, 2023
@geppyz
Copy link
Contributor Author

geppyz commented Mar 9, 2023

Example, in Day and Night mode:
Schermafbeelding 2023-03-09 om 15 32 50
Schermafbeelding 2023-03-09 om 15 33 00

Can be configured in web-ui.json:

 "geomap": {
      "enableMap": true,
      ...
      "layer": {
        "geojson": {
          "url": "http://localhost:8000/liander.geojson",
          "crossOrigin": "anonymous"
        }
      }
    },

GeoJSON data usually has a .geojson or .json file extension but this is not enforced.
Example of the structure:

{
  "type": "FeatureCollection",
  "name": "gelderland",
  "crs": {
    "type": "name",
    "properties": {
      "name": "EPSG:4326"
    }
  },
  "features": [
    {
      "type": "Feature",
      "properties": {
        "identificatie": "PV25",
        "naam": "Gelderland",
        "code": "25",
        "ligtInLandCode": "6030",
        "ligtInLandNaam": "Nederland",
        "fuuid": "provinciegebied.b20f6217-4ee2-41b4-9b4e-0b2a3df9458f"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [5.768972,51.752377],
            [5.769299,51.752347],
            [5.769529,51.752326],
            [5.770976,51.752232],
            [5.772424,51.752173],
            [5.772736,51.752162],
            ...
          ]
        ]
      }
    }
  ]
}

geppyz added a commit that referenced this issue Mar 9, 2023
@geppyz geppyz linked a pull request Mar 9, 2023 that will close this issue
freddidierRTE pushed a commit that referenced this issue Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Alliander Issues needed for alliander Enhancement New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant