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

Google Maps: Custom Markers (AdvancedMapMarker) #244

Closed
abigailojeda opened this issue Sep 4, 2024 · 0 comments
Closed

Google Maps: Custom Markers (AdvancedMapMarker) #244

abigailojeda opened this issue Sep 4, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@abigailojeda
Copy link

abigailojeda commented Sep 4, 2024

📚 Is your documentation request related to a problem?

I'm trying to add some markers with icon to my map but I can't find the issue. I'm not getting an error or anything, it just does not show.

This is what I have tried:

<script> const handleReady = async () => { console.log(maps.value.map); markers.value.forEach((marker) => { const markerContent = document.createElement('div'); markerContent.innerHTML = `

`; maps.value.createAdvancedMapMarker({ position: marker.position, content: markerContent.firstChild as Node, }).then((mapMarker: any) => { mapMarker.setMap(maps.value.map); // console.log('Marker added:', mapMarker.map); }).catch((error: any) => { console.error('Error adding marker:', error); }); }); } </script>

Thanks for your help!

🔍 Where should you find it?

This is the only thing I have found on the docs(Guide section) but it is quite vage.

ℹ️ Additional context

No response

@abigailojeda abigailojeda added the documentation Improvements or additions to documentation label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant