googlemaps / googlemaps/js-samples

Use of FontAwesome without all.js depencency?

Open
#1,827 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
805
Forks
836
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.