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

WAITP-1209: Map entities part 2 #4682

Merged
merged 19 commits into from
Jun 28, 2023
Merged

Conversation

tcaiger
Copy link
Contributor

@tcaiger tcaiger commented Jun 26, 2023

Issue #: WAITP-1209: Map entities part 2

Changes:

  • Re-organise map overlays files
  • Add interactive polygon component
  • Add bounds to map

Screenshots:

image

image

@tcaiger tcaiger changed the title WAITP-1209 map entities WAITP-1209: Map entities part 2 Jun 27, 2023
Copy link
Contributor

@alexd-bes alexd-bes left a comment

Choose a reason for hiding this comment

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

This is looking really nice!

this.map?.fitBounds(bounds, {
animate: true,
});
this.map?.fitBounds(bounds, { animate: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you end up finding a nice animation for this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did get it working pretty nicely with map.fitToBounds and it while it was nice and smooth it was much less snappy and a very different feel from how it currently works. So I just went for feature parity and added a note to the list of polish as a reminder to look at it later with Edwin.

export const useEntitiesWithLocation = (projectCode?: string, entityCode?: string) =>
useEntities(projectCode, entityCode, {
params: { fields: ['parent_code', 'code', 'name', 'type', 'bounds', 'region'] },
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, I like this

@tcaiger tcaiger merged commit 25ad724 into epic-frontend-rewrite Jun 28, 2023
@tcaiger tcaiger deleted the waitp-1209-map-entities branch June 28, 2023 03:43
tcaiger added a commit that referenced this pull request Jul 12, 2023
* setup map entites

* wip

* wip

* re organise project view

* mobile search layout

* polygon layer

* map animation

* fix mini map

* Update Dashboard.tsx

* merging

* map overlay data

* add Map overlays feature folder

* useEntitiesWithLocation

* typescript

* remove test code

* Update InteractivePolygon.tsx
tcaiger added a commit that referenced this pull request Jul 12, 2023
* setup map entites

* wip

* wip

* re organise project view

* mobile search layout

* polygon layer

* map animation

* fix mini map

* Update Dashboard.tsx

* merging

* map overlay data

* add Map overlays feature folder

* useEntitiesWithLocation

* typescript

* remove test code

* Update InteractivePolygon.tsx
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