geoJSON layer: handle hover, improve click handling, use icons#42
Open
qualitymanifest wants to merge 13 commits intoCodeForPittsburgh:fix-mapfrom
Open
geoJSON layer: handle hover, improve click handling, use icons#42qualitymanifest wants to merge 13 commits intoCodeForPittsburgh:fix-mapfrom
qualitymanifest wants to merge 13 commits intoCodeForPittsburgh:fix-mapfrom
Conversation
- Throttled the hover event so that it doesn't blow up slower computers - Changed click radius for computers. Once hovering was implemented it was clear that the click radius was way too wide for precise pointers. User agent sniffing might not be a guarantee but it is probably the best option, short of waiting for a touch event and changing the click radius.
Wanted to remove this now so that it doesn't get forgotten about. Roughly half of the points will appear in Antarctica until the coordinates are corrected in the database.
Merged
Obviously the images need to be changed and expanded upon. I grabbed these (free, no-attribution) icons from iconfinder.com just to use them as an example. Relevant issue CodeForPittsburgh#36 here for icon status, and issue CodeForPittsburgh#19 at food-access-map-data for info on location type attributes
I had previously assumed that the other site data was passed into foodSiteDetail, however after looking it is clear that it is intended to fetch that from the server. No point in processing it into an object then.
This fixes mapbox error 'Error removing layer of undefined' when navigating away from the map component I thought I had updated react-map-gl to the newest already but apparently not!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added hover handling. Throttled the hover event so that it doesn't blow up slower computersSpecified an interactive layer, which allows hovering to work properlytypeattributes