Skip to content

Releases: Premiate-Edizioni/strapi-plugin-maplibre-field

v1.3.0

12 Apr 21:48
3fa88b9

Choose a tag to compare

What's New

Added

  • PMTiles POI sourcespoiSources now supports type: 'pmtiles' in addition to 'geojson'. PMTiles sources are rendered natively by MapLibre via HTTP range requests — no tile server required. Requires sourceLayer to identify the vector layer inside the archive.
  • Source type label in layer legend — The layer control panel now shows GEOJSON or PMTILES next to each layer name so editors know what kind of data they are toggling.
  • Improved field layout below map — Fields below the map use a native CSS flex layout: Address/POI Name (50%) + Longitude (25%) + Latitude (25%) on the first row; Full Address (100%) on a second row when a POI with address is selected.

Fixed

  • Layer control panel closes on toggle — Clicking a layer item to show/hide it no longer closes the panel. Root cause was a combination of document.addEventListener('click') accumulating across re-renders, an unstable handleLayerToggle reference causing the control to be recreated on every toggle, and stopPropagation() interfering with MapLibre's event system. Fixed by registering the outside-click listener once in onAdd() using mousedown instead of click, wrapping handleLayerToggle in useCallback, and removing all stopPropagation() calls.

Changed

  • Field layout uses native flex — Replaced Strapi Grid.Root/Grid.Item with a plain div flex container to avoid gridCols sizing inconsistencies inside the edit view.

PMTiles POI Example

poiSources: [
  {
    id: "skatespots",
    name: "Skatespots",
    apiUrl: "https://api.example.com/skatespots.geojson",
    color: "#cc0000",
    enabled: true,
  },
  {
    id: "skateparks",
    name: "Skateparks (World)",
    apiUrl: "https://cdn.example.com/pmtiles/skateparks-world.pmtiles",
    type: "pmtiles",
    sourceLayer: "skateparks",
    color: "#1dbff0",
    enabled: true,
  },
]

See the POI Integration Guide and Configuration Guide for full documentation.

Full Changelog

1.2.2...v1.3.0

v1.2.2

20 Mar 15:45
75737ce

Choose a tag to compare

Fixed

  • __publicField is not defined - Unpinned maplibre-gl from 5.16.0 now that class field declarations are fixed upstream (#7283 @maplibre/maplibre-gl-js) and compatibility for ES2020 is guaranteed.

npm: npm install @premiate/strapi-plugin-maplibre-field@1.2.2