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

Noter frontend integration with map #43

Merged
merged 2 commits into from
Dec 15, 2020

Conversation

timwaters
Copy link
Member

This PR adds in noter / annotations to the map where buildings with images in the noter are highlighted and images shown, and other buildings can be selected with prompt to edit them and add images and annotations

image

image

@timwaters
Copy link
Member Author

The last commit adds support for assigning the outer relation of a building multipolygon as a "feature-state" attribute to the map polygon used for showing which buildings have annotations and for getting the id in the results panel. This will make it easier to open the editor around a multipolygon feature but is not perfect.

We can make it better with 2 changes, to the tegola config and the mbgl style file.

The first, to the tegola-config.toml file in the Antique repo, would add a building_id as an extra feature property in the query for buildings.

  sql = "SELECT osm_id, osm_id as building_id, start_date, ... planet_osm_polygon WHERE building IS NOT NULL AND way && !BBOX!"

And second to the mbgl-antique-style.json file in this repo, add a promoteId entry to the sources in the style file to change the id for the buildings layer.

  "sources":{
    "antique":{
...
      "promoteId":{"buildings":"building_id"}
    }
  },

mbgl-photomap.js should work with or without the suggested changes.

@embeepea embeepea merged commit e8b9bf1 into kartta-labs:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants