-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add slippy tiles #71
Add slippy tiles #71
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@nachtm let me know if rest to-do will be on your other PR so we can merge or we should wait! |
I took the svg that @ahmouda12 created through d3 and added it directly to the map as the legend. Looks like this: |
More updates: we now have an open in iD editor button (the pencil logo on the right) and a switch-map-styles button (the layers button on the left). More specifically, here are the three different layers: @MonicaBrandeis can you confirm that these are correct? |
Not exactly
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
We now use mapbox-gl to display our data instead of static images. Users can zoom in/out and pan around to an extent:
Since we were concerned about potentially hitting our quota of map loads, I did some work to recycle the map instances as much as possible. Basically, the
<App/>
component stores a div and a<Map/>
associated with that div. The CityProfileCard needs access to that div, which I could have done by passing it down as a prop but decided to try using a Context instead. I think it's pretty clean but I'm happy to rework. Actually getting the CityProfileCard to show an element passed in to it took a little hacking/magic as seen in this comment.Thanks to @ahmouda12 for doing a lot of the initial legwork here!
Remaining TODOs on the map area: