Etch component
Map 2
A map from OpenStreetMap with one or more markers, with no Google embed: visitors move and zoom it, and each marker shows its place's name and a link that opens the place in Google Maps.
Documentation
A map from OpenStreetMap with one or more markers, with no Google embed: visitors move and zoom it, and each marker shows its place's name and a link that opens the place in Google Maps.
How to use it
- Add a Markers row for each place: its Name, its Coordinates as Google Maps gives them (right-click the place there and click the numbers to copy them, such as "44.4268, 26.1025"), and when needed its Address and a Link to its page.
- With one marker, Zoom sets how close the map shows it (15 by default); with several, the map fits them all.
- Give each map on a page its own Label, such as "Our offices": screen readers announce the map by it.
Good to know
- The map loads as it comes near the screen, with nothing to click, and sets no cookies. Its tiles are OpenStreetMap's, which ask for their credit on the map and light use: a site with a lot of traffic moves to a tile service. The site's privacy policy names jsDelivr, which serves the map's code, and OpenStreetMap, which serves its tiles.
- The mouse wheel scrolls the page, and on a phone one finger scrolls past the map; the zoom buttons, or two fingers, zoom it.
- A button under the map, such as "Open in Google Maps", is a MAC CTA 1 linked to the same place.
- The CSS variables set the map's shape on wide and narrow screens, its corners, border, ground and the markers' color.
Reference
Read from the component's JSON, so it's always current.
Loading the reference