Maplace.js

Live examples on Google Maps and MapLibre

Every example by feature, each a live map with its code for HTML, a script, a bundler and React.

Markdown

Map images: © OpenStreetMap contributors, © OpenMapTiles, OpenFreeMap.

Markers and popups

One pin, your own icons and HTML markers, place cards in popups, and a click to add one.

Lists and menus

A list, a select menu, a list of your own or tabs: beside the map or on it.

  • List beside the map

    The list outside the map, where it goes by default, grouped by region, with an entry for all.

  • Dropdown of places

    A native select on the map, grouped by region, with an entry for all.

  • Custom list

    A list of your own markup: here a radio per place, and one to fit all, on the map.

  • List with a details panel

    The list outside the map; a details panel follows the selection.

Search and filters

Tags, nested groups, a search box, nearest first, and only what's in view.

  • Filter by tags

    Places with several tags: tick some to see those with all of them.

  • Filter by group

    Offices by region and country, nested in the list, with a checkbox for each region and country.

  • Search box

    A box above the list that narrows the list and the map as you type.

  • Sort by distance

    A button on the map that sorts the list by distance from the visitor.

  • Search this area

    A switch above the list: every place, or only those in view as the map moves.

Circles and polygons

Circles, an editable polygon, and shapes with markers.

  • Circles

    Circles in their own colours, with popups; resize the third and see its radius.

  • Editable polygon

    A polygon to edit: drag a corner, and the edit is written back.

  • Markers and shapes together

    A marker, a circle, an area and a line on one map and in one list.

Lines and routes

An editable polyline, great circles, lanes by colour, and a driving route.

  • Editable polyline

    A polyline to edit: a trail, with places along it.

  • Flight paths

    Great circles from one city to eight, the scheduled ones dashed; slide the flight to New York along its way.

  • Trade routes

    Air and sea trade lanes by colour; hover one, pick one for its volume.

  • Driving route

    A drive through your own places, with directions by leg: Google computes it live; on MapLibre it's one stored route, as your own routing service would answer.

Clusters and heatmaps

Points clustered into badges, and a month of earthquakes as a heatmap.

  • Marker clustering

    Markers near each other clustered into one badge counting them, split apart as you zoom in.

  • Heatmaps

    A month of earthquakes as a heatmap by magnitude, dots when zoomed in, volcanoes as pins, a checkbox for each.

Data dashboards

Cards with a period switch, shares by country, bubbles, and a choropleth.

  • Audience dashboard

    Viewers by region as cards on the map, arcs from the studio, and a period switch.

  • Share by country

    Six countries in their own colours, a badge with each one's share, the list as legend.

  • Bubble map

    Cities as bubbles sized by population, a legend, and a count of what is in view.

  • Choropleth of the world

    Every country filled by its GDP per person, its value on hover, with a legend on the map.

Live data and loading

Data swapped in live, a GeoJSON layer, a map loaded on a press, and a link to a place.

  • Live data from JSON

    Data sets fetched as JSON and swapped in live: markers, an area, a circle, and on Google a route.

  • GeoJSON layer

    A GeoJSON file as the map's layer: points as markers, a line, an area, each with a popup.

  • Load the map on click

    A panel in the map's place: the map loads only when the visitor presses its button.

  • Shareable link to a place

    A shareable link to the place picked, shown under the map, that opens the map on it.

Styling

Your map's look: the provider's own styles, and Maplace.js's parts drawn your way.

  • Restyled venue map

    A dark frame, pins coloured by category, a legend that filters them and a card of the venues, or of the one picked.

  • A team around the world

    Faces for markers, list entries of your own with each person's local time, filtered by team.

  • Map styles

    The provider's own map styles to choose from, and on Google the map-type control.

  • Brand colours

    One palette across the delivery areas, the cluster badges and the list.

  • Default styles off

    Maplace.js's styles off and nothing in their place: the map and its list as your page shows them, with no CSS but a height.