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

Map rendering and style improvements #53

Merged
merged 11 commits into from Sep 22, 2017
Merged

Map rendering and style improvements #53

merged 11 commits into from Sep 22, 2017

Conversation

@edmundoa
Copy link
Member

@edmundoa edmundoa commented Sep 22, 2017

This PR helps fixing some of the map visualization's quirks. A summary of the changes is:

  • Updated react-leaflet and leaflet dependencies
  • Fixed issues when resizing the map container, ensuring tiles are loaded afterwards and markers are in the right place
  • Add styles to ensure map is looking good on media print
  • Allow consumers to customize map interactivity
  • Provide a callback to notify customers when the map is fully rendered
edmundoa added 11 commits Sep 22, 2017
Sometimes resizing the map container ends in markers out of their
correct coordinates or map tiles not being loaded. This commits adds a
workaround to avoid it, sending a `resize` event and invalidating the
previous size.
- Check if tiles are fully loaded
- Disable all animations if map is not interactive, so transitions do
  not get in the way
- No need to trigger a resize on componentDidMount
- First trigger resize event, then invalidate size
As leaflet is not particularly made to toggle options, we disable
controls by using a good-old div overlay.
@mariussturm mariussturm merged commit 0d7d029 into master Sep 22, 2017
2 checks passed
Loading
@mariussturm mariussturm deleted the improvements branch Sep 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants