To add a custom map marker to Google Maps in Webflow, you’ll need to embed custom JavaScript using an Embed element and include your marker’s image URL.
Here’s an example you can insert inside the Embed element:
<div id="map" style="width:100%; height:400px;"></div><script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script><script> function initMap() { var location = { lat: 40.7128, lng: -74.0060 }; // Example: New York City var map = new google.maps.Map(document.getElementById('map'), { zoom: 12, center: location }); var marker = new google.maps.Marker({ position: location, map: map, icon: 'https://yourdomain.com/path-to-custom-marker.png' // Replace with your custom icon URL }); } window.addEventListener('load', initMap);</script>
YOUR_API_KEY
with your actual Google Maps API key.icon
URL with your hosted image URL.400px
) or it may not appear.To add a custom map marker in Webflow, use an Embed element with Google Maps API code that sets a marker’s icon property to your marker’s image URL. Be sure to include your API key, coordinate values, and correct path to the custom icon.