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

Improve layout for querying neighbour addresses by polygon search #1243

Merged
merged 3 commits into from
Sep 11, 2023

Conversation

benbaumann95
Copy link
Member

@benbaumann95 benbaumann95 commented Sep 4, 2023

Description of change

This PR allows multiple geojson features to be stored on a single map as part of a "FeatureCollection". This enables us to have the consultation polygon overlay the planning application red line boundary. In theory, if we allowed multiple geojson features for the polygon search we could combine this in one map too. We are also able to draw in a specified colour using drawColor and drawFillColor props.

The colour is now set differently for the polygon boundary to distinguish from the red line boundary. This has been done by setting a colour property attribute on the feature which the map component will dynamically set.

Some updates were necessary on the map component to achieve the above.
See: theopensystemslab/map#381 & theopensystemslab/map#379

Story Link

https://trello.com/c/IQsb3WNF/1908-improve-content-and-layout-for-querying-neighbour-addresses-by-polygon-search

Screenshots

Drawn polygon boundary is saved in another colour

Screenshot 2023-09-10 at 21 06 37

Drawing the consultation polygon in another colour

Screenshot 2023-08-31 at 16 27 09

"#{polygon_colour}20"
end

def concatenate_geojsons(*geojsons)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need this to represent one geosjon FeatureCollection with all the geosjon features (planning application red line boundary, consultation boundary etc) so we can present this on one map.

If the column type is polygon_geojson we insert the polygon colour so that the map component can distinguish the type of feature

extend ActiveSupport::Concern

class_methods do
def format_geojson_epsg(column_name)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the map component introduces a breaking change here - https://github.com/theopensystemslab/map/pull/256/files

This is to ensure compatibility with the previous way we store geojson

@benbaumann95 benbaumann95 changed the title Wip Improve layout for querying neighbour addresses by polygon search Sep 4, 2023
@benbaumann95 benbaumann95 force-pushed the update-map branch 5 times, most recently from ddcf3a8 to d9872da Compare September 4, 2023 16:32
@benbaumann95 benbaumann95 marked this pull request as ready for review September 4, 2023 16:49
@benbaumann95 benbaumann95 force-pushed the update-map branch 8 times, most recently from a550b24 to 90afc77 Compare September 10, 2023 20:31
Benjamin Baumann added 2 commits September 11, 2023 10:01
- Update previous longitude / latitude string values to use this new geographic format
- These legacy columns are to be removed in a subsequent PR
@benbaumann95 benbaumann95 merged commit 1884c7b into main Sep 11, 2023
@benbaumann95 benbaumann95 deleted the update-map branch September 11, 2023 09:14
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