# Changelog

Every change to the Maplace.js library that a reader would notice, newest first, with the issue it closed if any.

## 1.2.0 (2026-11-19)

- <time datetime="2026-11-18">2026-11-18</time> Added dashed and dotted lines: `strokeDash` (`"solid"`, `"dashed"`, `"dotted"`) in a polyline's style and the route's, scaled by the line's width and kept in every state, on Google and MapLibre.
- <time datetime="2026-11-18">2026-11-18</time> Added a line's travelled part: `progress` (0 to 1) and `travelledStyle` on a polyline and on the route, drawing the part travelled at 40% of the line's opacity and the rest as the line, without computing a route again; on Google, the route is then drawn by Maplace.js in Google's look.
- <time datetime="2026-11-18">2026-11-18</time> Added `pointAlong(line, fraction)`, the point a fraction of the way along a polyline as drawn or a route result's path, for a marker of your own moving along a line.
- <time datetime="2026-11-18">2026-11-18</time> Added `active` and `activeStyle` on shapes (the `active` and `active-style` attributes of `<maplace-location>`) and the store's `activeStyle` option: a shape the page marks as its current one is drawn in the hovered look, under hovered and selected.
- <time datetime="2026-11-18">2026-11-18</time> Changed `ShapeStyle` to no longer extend `LineStyle` whole (it leaves out `strokeDash`, as a closed shape's outline is solid) and the drawable an adapter draws to carry `strokeDash`, `active`, `activeStyle`, `progress` and `travelledStyle`; the conformance suite's new `line-looks` group checks them, so an adapter running every group draws them.
- <time datetime="2026-11-18">2026-11-18</time> Added routes on MapLibre through your own routing: `createMapLibreAdapter({ computeRoute })`, `createMapLibreMap`'s `computeRoute` and `<maplace-map>`'s `computeRoute` property, a function given each stop where it is drawn (`RouteRequest`) and answering the route's legs and path (`RouteAnswer`), so `setRoute`, `via`, `travelMode`, `avoid`, `routeChange` and `route-failed` work on MapLibre as on Google; the route draws under every location and takes no click
- <time datetime="2026-11-17">2026-11-17</time> Added group paths: a location's `group` can be a path of up to 3 names, outermost first (`group: ["Europe", "Italy"]`; on `<maplace-location>`, `group='["Europe","Italy"]'`, and a GeoJSON feature's `group` property as a list): the list nests a subgroup's section in its parent's, each a group, a native select naming it by its path ("Europe › Italy"); a group in `setFilter` or a heatmap's `groups` takes its subgroups, matched from the top; and with `groupCounts` a heading counts everything under it
- <time datetime="2026-11-17">2026-11-17</time> Added `groupFilter` and `groupFilterLabel` to the list view (`group-filter` and `group-filter-label` on `<maplace-map>`, props of `<LocationList>`): a "Groups" button above the list, saying how many are ticked, that opens a checkbox for each group, subgroups nested and a group partly ticked when some of its subgroups are, setting the filter's groups and keeping its query and tags
- <time datetime="2026-11-17">2026-11-17</time> Changed the types of `Location.group`, `LocationFilter.groups` and `HeatmapOptions.groups` to take a path (`string | readonly string[]`), so TypeScript code reading them as a string narrows them first; and `<maplace-location group>` starting with `[` is read as a JSON path, so a name such as "[Draft] Rome" is misuse there (it still works as a string in `locations`)
- <time datetime="2026-11-17">2026-11-17</time> Added a heatmap of a store's markers on Google and MapLibre (`heatmap: { groups, maxZoom }`, a marker's `weight`, and `heatmap` and `heatmap-max-zoom` on `<maplace-map>`, `weight` on `<maplace-location>`): the markers in its groups drawn as heat weighted against the heaviest when zoomed out, fading into a dot per marker, sized by its weight, over the 2 zooms before `maxZoom`; the list, search and filter narrow the heat, other groups stay pins, and the selected or hovered one is drawn as a pin over it. A marker in the heat can't have an `icon` or be `editable`; with the `heatmap` capability an adapter declares, and not with `cluster`
- <time datetime="2026-11-15">2026-11-15</time> Changed a hovered or selected shape's outline to draw over the shapes stacked in front of it on Google and MapLibre, the hovered one's on top, then the selected one's, so a smaller neighbour no longer hides half of it; the shape itself keeps its place, so what the pointer reaches is unchanged, and on Google an editable shape's outline stays where it is
- <time datetime="2026-11-15">2026-11-15</time> Changed a popup opened by hover (`openOn: "hover"`) to let the pointer through to the map while it shows the hovered location rather than the selected one, on Google and MapLibre: what it covers answers hover and click as if it were not there, so moving between neighbouring shapes no longer sticks to the last one or, on MapLibre, flickers over its own shape; the selected location's popup still takes the pointer, for its close button and links
- <time datetime="2026-11-15">2026-11-15</time> Added `type: "multipolygon"` locations (`polygons`, each a polygon's `path` and `holes`): several polygons drawn, hovered, selected and listed as one location on Google and MapLibre, shown at their largest polygon, never editable, with the `multipolygon` capability an adapter declares to draw them; code with an exhaustive `switch` or `Record` over a location's or a `Geometry`'s `type`, an adapter's among them, gains a case
- <time datetime="2026-11-15">2026-11-15</time> Changed `locationsFromGeoJSON` to read a `MultiPolygon` feature as one multipolygon location instead of refusing it
- <time datetime="2026-11-15">2026-11-15</time> Added `popup-open-on` on `<maplace-map>`: `hover` opens a location's popup under the pointer, as the store's `popup.openOn` does
- <time datetime="2026-11-15">2026-11-15</time> Fixed a pressed button of the list's area switch, or of the "My location" box, losing its tint under the pointer on a MapLibre map: the tints are background images now, so a page's own colour for the pressed button needs `background` or `background-image` to replace them
- <time datetime="2026-11-15">2026-11-15</time> Fixed a tap on a touch screen leaving the list's area switch, or the "My location" box, tinted as if hovered
- <time datetime="2026-11-13">2026-11-13</time> Fixed a MapLibre map under 256px tall, zoomed all the way out, reporting a zoom below 0, which the store refused with an uncaught `invalid-input`: it reports 0
- <time datetime="2026-11-13">2026-11-13</time> Added `globe` on MapLibre maps (`createMapLibreAdapter`, `createMapLibreMap`, and `globe`, `globe-position` and `globe-label` on `<maplace-map>`): the map opens as a globe, with a toggle on the map that flattens it and turns it back

## 1.1.0 (2026-11-13)

- <time datetime="2026-11-13">2026-11-13</time> Fixed a Google popup's content sitting 12px from the bubble's left edge but 30px from its right and bottom in Chromium and Safari: its sides and bottom now match the room Google keeps for its scrollbars, 18px there, 12px where it keeps none, and its title lines up with it
- <time datetime="2026-11-13">2026-11-13</time> Added `geodesic` on a polyline: each segment drawn along its great circle, the shortest way, the same on Google and MapLibre
- <time datetime="2026-11-13">2026-11-13</time> Added `curve` on a polyline: each segment bowed, for the look, the same on Google and MapLibre

## 1.0.2 (2026-11-09)

- <time datetime="2026-11-09">2026-11-09</time> Fixed `whenReady()` and `loadState` `ready` on MapLibre (and its adapter's `apply`) resolving before the locations were drawn when MapLibre was slow to load them (its workers starting, a busy machine): they now wait for the load, up to 10 s, and give only the drawing its 1 s cap, so a click or a hover right after finds what was added

## 1.0.1 (2026-11-08)

- <time datetime="2026-11-08">2026-11-08</time> Changed the MapLibre CDN script to bundle maplibre-gl 6.16.0, and `Maplace.maplibre` with it
- <time datetime="2026-11-08">2026-11-08</time> Fixed MapLibre maps on maplibre-gl 6.16 and later saying nothing when its worker can't start (a page opened as a file, a content security policy without `worker-src`): the map fails with `provider-load-failed` again
- <time datetime="2026-11-08">2026-11-08</time> Fixed tools that read only `package.json`'s top-level `types` field, such as npm's types badge, finding no TypeScript types: the field now names the core entry's declarations

## 1.0.0 (2026-11-07)

- <time datetime="2026-11-07">2026-11-07</time> Changed everything: Maplace.js 1.0 is a rewrite with no jQuery. A list of locations becomes a map with a list kept in sync beside it, on Google Maps or MapLibre, from HTML, a page's own script, a bundler or React; see [the README](/getting-started/), [MIGRATION.md](/migrating/) for moving a 0.2 page, and [the 1.0 RFC](https://github.com/danielemoraschi/maplace.js/blob/5dd17eac33e258107f91c7a4d4d05bc2673e17bd/docs/rfc-1.0.md)
- <time datetime="2026-11-07">2026-11-07</time> Changed the npm package's name to `@maplacejs/maplace` (0.2 was `maplace-js`)
- <time datetime="2026-11-07">2026-11-07</time> Changed the licence from MIT to Apache-2.0
- <time datetime="2026-11-07">2026-11-07</time> Changed what Maplace.js needs: evergreen browsers (ES2022) and ES modules only, with no CommonJS build; React 19 for `@maplacejs/maplace/react`, and `maplibre-gl` installed beside `@maplacejs/maplace/maplibre`, both optional peers
- <time datetime="2026-11-07">2026-11-07</time> Removed 0.2's API: `new Maplace(options).Load()`, its options and its callbacks each have a 1.0 replacement, named in [MIGRATION.md](/migrating/)
- <time datetime="2026-11-07">2026-11-07</time> Added a headless store, `createMaplace`, holding the locations, the selection, hover, a filter, a route and the view, with an event for each change, drawn on a map by a provider's adapter
- <time datetime="2026-11-07">2026-11-07</time> Added `<maplace-map>` and `<maplace-location>` (`@maplacejs/maplace/element`): a map, its list and its locations written in HTML, with `maplace-*` DOM events, and template types for Vue and Svelte
- <time datetime="2026-11-07">2026-11-07</time> Added three CDN scripts and no build step: Google's, Google's with clustering, and MapLibre's with maplibre-gl bundled, each pinnable with an integrity hash and setting a `Maplace` global for a page's own script
- <time datetime="2026-11-07">2026-11-07</time> Added `@maplacejs/maplace/google`: Google Maps through its current libraries (advanced markers, map IDs, Routes), `createGoogleMap` as 0.2's one call, and Maps JS added to the page by Maplace.js itself given `apiKey`
- <time datetime="2026-11-07">2026-11-07</time> Added `@maplacejs/maplace/maplibre`: MapLibre GL JS on OpenFreeMap's tiles or any style, with no key, drawing everything Google does but routes
- <time datetime="2026-11-07">2026-11-07</time> Added `@maplacejs/maplace/react`: `<MaplaceProvider>`, `<MaplaceMap>`, `<LocationList>`, `<MapControl>`, `<MyLocation>` and `useMaplace()`, popups and markers as React content, ready for Server Components
- <time datetime="2026-11-07">2026-11-07</time> Added HTML popups made safe: `content` as text or a node of yours, and `html` passed through your sanitizer (`sanitize`), never written to the page as it came
- <time datetime="2026-11-07">2026-11-07</time> Added support for a strict Content Security Policy: no inline styles (default styles are adopted stylesheets), a `nonce` for the Maps JS script Maplace.js adds, and the MapLibre script's worker started from a `blob:` URL
- <time datetime="2026-11-07">2026-11-07</time> Added the map's look per provider: on Google a map ID, a light, dark or system colour scheme and Google's map options (`color-scheme`, `map-options`); on MapLibre any style URL or style object (`map-style`)
- <time datetime="2026-11-07">2026-11-07</time> Added drawing on a map of your own: hand Maplace.js an existing Google or MapLibre map and it adds its markers, shapes and list without moving or removing your map
- <time datetime="2026-11-07">2026-11-07</time> Added markers (the provider's pin, an image or your own HTML), circles, polylines and polygons, each selectable and hoverable with styles of its own for both, and editable by dragging, the edit reported as it happens
- <time datetime="2026-11-07">2026-11-07</time> Added clustering on both providers (`cluster`), keeping thousands of points fast
- <time datetime="2026-11-07">2026-11-07</time> Added routes on Google: a drive through your locations, passing through via points, avoiding tolls, highways or ferries, with turn-by-turn steps for each leg
- <time datetime="2026-11-07">2026-11-07</time> Added the list view, in sync with the map either way: grouped, as a list or a native select, with a "fit all" entry, a heading and group counts, or a list view of your own through `defineListView`
- <time datetime="2026-11-07">2026-11-07</time> Added `mapClick`, a click on the map itself with its position, for a page adding a place where the visitor clicks, as 0.2's `listeners` allowed; and `listed: false`, a location on the map but in no list, as 0.2's `on_menu: false`
- <time datetime="2026-11-07">2026-11-07</time> Added search and filters: a search box over the list, `setFilter({ query, groups, tags })`, and a location's `tags` and `searchText`
- <time datetime="2026-11-07">2026-11-07</time> Added a list that follows the map: "This area" lists only what is in view, following the map as it moves
- <time datetime="2026-11-07">2026-11-07</time> Added "My location": the visitor's position asked for only on a press, and the list sorted by distance from it or from any point
- <time datetime="2026-11-07">2026-11-07</time> Added an Open in Maps link and a directions link at the end of a popup
- <time datetime="2026-11-07">2026-11-07</time> Added accessibility throughout: the list and the markers usable by keyboard, a link to skip the map, each selection announced and focus kept where it was; the site's accessibility statement says what was tested
- <time datetime="2026-11-07">2026-11-07</time> Added default styles that any rule of your page wins over, classes and custom properties to style by, and `data-maplace-unstyled` to turn the defaults off
- <time datetime="2026-11-07">2026-11-07</time> Added consent-friendly loading: `hold`, with a ready-made "Load map" panel naming the provider, and `loading="lazy"`, so nothing reaches the provider until the visitor allows it or scrolls to the map
- <time datetime="2026-11-07">2026-11-07</time> Added `url-state`: the selection kept in the page's address, a link to share, back and forward stepping through it
- <time datetime="2026-11-07">2026-11-07</time> Added the map's first view from HTML: `center` and `zoom`, `selected-id`, or a location's own `zoom`
- <time datetime="2026-11-07">2026-11-07</time> Added `locationsFromGeoJSON`, turning a GeoJSON FeatureCollection's points, lines and polygons into locations [#188](https://github.com/danielemoraschi/maplace.js/issues/188)
- <time datetime="2026-11-07">2026-11-07</time> Added a recipe for addresses: a short Node script that geocodes a file of places once, before the page ships [#174](https://github.com/danielemoraschi/maplace.js/issues/174)
- <time datetime="2026-11-07">2026-11-07</time> Added maps that cope with real pages: a map in a closed tab or a hidden panel, or resized, shows its view again when it comes back, and a page with many maps doesn't run out of WebGL contexts
- <time datetime="2026-11-07">2026-11-07</time> Added TypeScript types for the whole API, and errors with a code and the field at fault for every misuse
- <time datetime="2026-11-07">2026-11-07</time> Added `@maplacejs/maplace/testing`: the conformance suite Maplace.js's own adapters pass, for proving an adapter of your own
- <time datetime="2026-11-07">2026-11-07</time> Added a new site at maplacejs.com: 25 examples, each run live as HTML, Script, Bundler and React on both providers; a reference page for each part of the API; a snippet builder taking CSV, JSON, GeoJSON or a 0.2 config; and the docs in Markdown with an agent skill for AI tools
- <time datetime="2026-11-07">2026-11-07</time> Added contributing rules, a security policy, a code of conduct and forms for bug reports and feature requests

## 0.2.10 (2017-04-02)

- <time datetime="2017-04-02">2017-04-02</time> Fixed `afterRoute` not passing the status or location of a dragged route [#147](https://github.com/danielemoraschi/maplace.js/issues/147) [#139](https://github.com/danielemoraschi/maplace.js/issues/139)
- <time datetime="2017-04-02">2017-04-02</time> Added a listener for `insert_at` polygon events [#164](https://github.com/danielemoraschi/maplace.js/issues/164)

## 0.2.9 (2017-03-26)

- <time datetime="2017-03-26">2017-03-26</time> Fixed `afterCloseInfowindow` not firing after a close [#137](https://github.com/danielemoraschi/maplace.js/issues/137)
- <time datetime="2017-03-26">2017-03-26</time> Changed every event function to run with the current Maplace instance as `this`

## 0.2.8 (2017-03-26)

- <time datetime="2017-03-26">2017-03-26</time> Fixed controls duplicated by `SetLocations` [#161](https://github.com/danielemoraschi/maplace.js/issues/161)
- <time datetime="2017-03-26">2017-03-26</time> Fixed setting the info windows' `maxWidth` [#160](https://github.com/danielemoraschi/maplace.js/issues/160)

## 0.2.7 (2016-03-12)

- <time datetime="2016-03-12">2016-03-12</time> Fixed 0.2.6 not loading maps [#132](https://github.com/danielemoraschi/maplace.js/issues/132)
- <time datetime="2016-03-12">2016-03-12</time> Fixed the documented listener example [#127](https://github.com/danielemoraschi/maplace.js/issues/127)

## 0.2.0 (2015-12-21)

- <time datetime="2015-12-21">2015-12-21</time> Changed to jQuery ~2.1
- <time datetime="2015-12-21">2015-12-21</time> Changed the build's output directory from `src` to `dist`, built with Grunt
- <time datetime="2015-12-21">2015-12-21</time> Changed the in-map menu's default border colour to match Google Maps' new UI

## 0.1.3 (2014-07-12)

- <time datetime="2014-07-12">2014-07-12</time> Added circles, mixed with markers
- <time datetime="2014-07-12">2014-07-12</time> Removed the `hide_marker` option, for consistency with `visible`
- <time datetime="2014-07-12">2014-07-12</time> Added the map's initial centre and zoom
- <time datetime="2014-07-12">2014-07-12</time> Fixed editable polylines and polygons with visible markers
- <time datetime="2014-07-12">2014-07-12</time> Added drag events for markers, circles, polylines and polygons
- <time datetime="2014-07-12">2014-07-12</time> Changed public functions to return `this`, for chaining
- <time datetime="2014-07-12">2014-07-12</time> Changed the `commons` option to `shared`, which each location's own options override
- <time datetime="2014-07-12">2014-07-12</time> Changed the debug output

## 0.1.2 (2014-01-07)

- <time datetime="2014-01-07">2014-01-07</time> Fixed several bugs

## 0.1.0 (2013-02-22)

- <time datetime="2013-02-22">2013-02-22</time> Added Maplace.js: Google Maps locations with a menu, from a list
