googlemaps / js-samples

Samples for the Google Maps JavaScript v3 API
https://developers.google.com/maps/documentation/javascript/
Other
762 stars 823 forks source link

Use of FontAwesome without all.js depencency? #1827

Open solsticesurfer opened 2 months ago

solsticesurfer commented 2 months ago

I have a map with AdvancedMarkerElements working great. Unfortunately, the sample scripts in the repo here depend on the use of FontAwesome's all.js package. In addition to being a 15MB download, it conflicts with the general CSS-based implementation, overwriting some CSS glyphs with question marks.

Removing the library dependency results in the rendering of the AdvancedMarkerElement having the name of the glyph removed from the content.

I've searched through the API documentation for Maps and extensively online but can't find a way to prevent the AdvancedMarkerElement from trying to replace the glyph and forcing SVG, as well as preventing it from conflicting with the standard FA Pro CSS implementation.

To further complicate things, I am trying to use a pin highlight for interaction, so the basic PinElement approach doesn't seem like it will work. Basically, I'm trying to recreate the example found at https://developers.google.com/maps/documentation/javascript/advanced-markers/html-markers#interactive_markers but without the SVG library dependency.

Any suggestions on how to address this or what I am overlooking?

solsticesurfer commented 2 months ago

This ended up being a user error due to a red herring. It turned out to be a template parser conflict unrelated to Google Maps.

Please disregard/delete this issue.