All integrations MapLibre Leaflet OpenLayers React Vue Svelte Angular React Native WordPress Webflow Squarespace Wix Shopify API docs
Replace YOUR_API_KEY with your key, and the two sets of numbers with your location. The numbers go longitude first, then latitude: [-0.1276, 51.5072] is London. If your map shows up in the sea off Africa or in Antarctica, the numbers are the wrong way round.
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@4.7.1/dist/maplibre-gl.css">
<script src="https://unpkg.com/maplibre-gl@4.7.1/dist/maplibre-gl.js"></script>
<div id="map" style="width:100%;height:400px;"></div>
<script>
var map = new maplibregl.Map({
container: "map",
style: "https://tiles.expressmaps.com/styles/standard.json?key=YOUR_API_KEY",
center: [-0.1276, 51.5072],
zoom: 13
});
map.addControl(new maplibregl.NavigationControl());
new maplibregl.Marker()
.setLngLat([-0.1276, 51.5072])
.setPopup(new maplibregl.Popup().setText("Our shop"))
.addTo(map);
</script> Rather not edit code by hand? The embed generator produces exactly this snippet (the HTML (MapLibre) tab) with your style, position, marker and key filled in.
webflow.io staging address or your live domain to see the map.The Designer shows a placeholder box rather than running scripts, so the map itself only appears in Preview or on the published site. If Preview shows nothing, publish to staging and check there.
Your key is visible to anyone who views the page source. That is normal for web maps; the domain restriction is what stops other sites from using it.
https:// or a path, for example www.yourbusiness.com, and click Add Restriction.yourbusiness.com, www.yourbusiness.com, and your Webflow staging address such as your-site.webflow.io.Once a key has restrictions, a page on any other domain gets a "403" error instead of the map, so keep the list up to date if you add or change domains.
YOUR_API_KEY, and that the exact domain in your browser's address bar (including or excluding www.) is in the key's restriction list. Staging on webflow.io counts as a separate domain.height:400px in the snippet; a percentage height such as 100% only works if the parent element has a fixed height too.[longitude, latitude].id. Change id="map" and container: "map" to map2 in the second snippet, and rename var map to var map2 in it.standard in the style address with any of the ten styles: basic, enhanced, darklands, greyscale, navigator, subtle, autobahn, lithium or mulberry.new maplibregl.Marker() lines once per address and change the numbers and popup text.cooperativeGestures: true, after zoom: 13,. Visitors then use two fingers (or Ctrl and scroll on desktop) to move the map, and normal scrolling moves the page.<link rel="stylesheet" href="https://unpkg.com/expressmaps@1.0.1/dist/expressmaps.css"> and <script src="https://unpkg.com/expressmaps@1.0.1/dist/expressmaps.umd.js"></script>, then use the snippet below.<div id="map" style="width:100%;height:400px;"></div>
<script>
expressmaps.createMap({ container: "map", key: "YOUR_API_KEY", center: [-0.1276, 51.5072], zoom: 13, marker: { popup: "Our shop" } });
</script>