-
Notifications
You must be signed in to change notification settings - Fork 14
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
geoJSON layer: handle hover, improve click handling, use icons #42
Open
qualitymanifest
wants to merge
13
commits into
CodeForPittsburgh:fix-map
Choose a base branch
from
qualitymanifest:fix-map
base: fix-map
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
geoJSON layer: handle hover, improve click handling, use icons #42
qualitymanifest
wants to merge
13
commits into
CodeForPittsburgh:fix-map
from
qualitymanifest:fix-map
Conversation
This file contains 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
- 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
qualitymanifest
changed the title
Handle hover over geoJSON features
Handle hover & improve click handling over geoJSON features
Jan 29, 2020
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!
qualitymanifest
changed the title
Handle hover & improve click handling over geoJSON features
geoJSON layer: handle hover, improve click handling, use icons
Jan 30, 2020
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 properlytype
attributes