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

Edit the UX for results map view, using infoBox.js. #397

Merged
merged 1 commit into from May 7, 2014
Merged

Conversation

ghost
Copy link

@ghost ghost commented May 7, 2014

In this branch, I made some UX changes to the results map view in response to Issue #365 ("Google Map rollover is cropped out of view some times."). I tried using infoBox.js from the Google Maps utility library, because it allows for easy customizability, including position and styling. Presently, the infoBox is displayed to the right of markers to decrease the likelihood of it being cropped out of the window. The infoBox can be styled either within its options object, or by linking to a CSS stylesheet. Some issues that I encountered along the way included the following:

(1) I had to set the marker's optimized property to false in order to prevent events from propagating through the infoBox onto the map (e.g. to prevent markers underneath an open infoBox from registering a mouseover event).

(2) I had to add a line to infoBox.js (line 274) to increase the z-index of the close box [x], because it was visible but not clickable. This doesn't seem to be a bug in infoBox in general, so I'm thinking it was conflicting with something else on the Ohana page.

(3) infoBox.js requires the google maps api to be fully loaded before it is loaded. This has presented some difficulties because of the asynchronous loading of the google maps api. I changed require.js shim to handle the fact that infoBox depends on google maps api. Unfortunately this problem is still not fully resolved. Presently, it works fine about 50% of the time, and the other 50% of the time it throws an error on page load, saying that infoBox could not find the google maps api.

anselmbradford added a commit that referenced this pull request May 7, 2014
Edit the UX for results map view, using infoBox.js.
@anselmbradford anselmbradford merged commit 5cc1cea into codeforamerica:365-map-infobox May 7, 2014
@anselmbradford
Copy link
Member

@millereric Thanks for your contribution!

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.

None yet

2 participants