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
Fixes Missing Map Icons #482
Conversation
@naknomum Would love your thoughts on the fix. |
@@ -1293,9 +1294,17 @@ if(CommonConfiguration.showProperty("showCountry",context)){ | |||
%> | |||
|
|||
marker = new google.maps.Marker({ | |||
icon: 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=<%=markerText%>|<%=haploColor%>', | |||
//icon: 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=<%=markerText%>|<%=haploColor%>', | |||
icon: " ", |
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.
am guessing the space must be needed here (versus just dropping the icon
element from the json entirely).
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.
I believe the space is needed according to some reading I did on this issue. But I also didn't test without it.
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.
seems like a solid workaround until we update to advanced marker api.
Thanks to @goddesswarship for a quick QA on a test deployment. Fix looks good there too. |
Fixes Missing Map Icons # Conflicts: # src/main/webapp/encounters/encounter.jsp
Fixes Missing Map Icons # Conflicts: # src/main/webapp/encounters/encounter.jsp
Fixes Missing Map Icons # Conflicts: # src/main/webapp/encounters/encounter.jsp
Wildbook color-coded its Google Maps pins using a Google Charts API that was turned off in 2019 yet still kept working until...now-ish. With that API now completely turned off for good, our maps pins are missing.
This is the old call:
icon: 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=<%=markerText%>|<%=colorToUseForMarker%>',
The short-term fix is to replace the icon attribute with a Materials font family character label. This actually adds a bit of diversity in the symbols we can use and ended up being somewhat of an improvement in that we can tweak more of the infill, color, size, and display of the icon.
Longer-term, we need to migrate Marker to AdvancedMarkerElement, but that is a major overhaul.
Tested successfully in Chrome and Firefox.
PR fixes #435