To create an interactive map in Webflow with multiple features like custom logo markers, zoom controls, color styling, and multiple markers, you’ll need to integrate an external map service like Google Maps or Mapbox using custom code embeds.
- Choose a map service. Mapbox is recommended for ease of styling and marker customization.
- Create a Mapbox account at https://mapbox.com.
- Generate an access token from your Mapbox dashboard.
- Create a custom style in Mapbox Studio to adjust map colors.
2. Embed the Map in Webflow
- In your Webflow project, drag an Embed element into your desired section.
- In the Embed Code panel, insert your custom Mapbox initialization code with:
- Your access token
- A custom style URL
- Zoom level and center coordinates
(Although code embed is necessary here, refrain from using large code blocks in this response as per guidelines. Use Mapbox's Quickstart guide for the exact JavaScript and HTML snippet needed.)
3. Add Custom Markers (including your logo)
- Upload your logo to your Webflow project and get its public URL.
- In your embedded map script, use custom image markers by referencing the logo image URL in the
setPopup()
or Marker()
creation method. - Repeat the marker creation process for each desired location using latitude/longitude coordinates.
4. Customize Map Colors
- In Mapbox Studio, modify the map layers to use your brand colors.
- Once saved, publish the custom style and use its style URL in your embed script.
5. Enable Zoom and Interaction Controls
- With Mapbox, controls like zoom in/out and rotation can be enabled through the
map.addControl()
method. - Common controls include
NavigationControl()
(zoom/rotation) and GeolocateControl()
(user location).
6. Optional: Multi-Marker Interactivity
- Use
map.on('click', function)
to setup interactivity like popups when clicking markers. - Add multiple markers dynamically by looping over a coordinates array in the embed script.
Summary
Use Mapbox with Webflow Embed blocks to build a fully customizable interactive map. You can:
- Use your logo as a marker
- Change map colors in Mapbox Studio
- Add multiple markers
- Control zoom and interactivity
All of this is managed via the Embed element using external Mapbox scripts and styles.