geofield maplibre gl
This module replaces the Mapbox GL formatter for geofields with MapLibre GL, providing a new field formatter and widget for displaying geographic data on interactive maps. It also includes proximity filters for Drupal's Views and supports various marker styles, custom images, and tooltips.
Due to the changes of mapbox terms of use. This is a fork of module https://www.drupal.org/project/geofield_mapbox_gl to use maplibre instead of mapbox , more to read in https://www.maptiler.com/news/2021/01/maplibre-mapbox-gl-open-source-fork/ and https://maplibre.org/maplibre-gl-js/docs/
This will add a new field formatter and field form widget as map in a geofield field, using the maplibre services.
It also provides some proximity views filter plugins to be used in views. (since https://git.drupalcode.org/project/geofield_maplibre_gl/-/commit/2038ff3... )
The module https://www.drupal.org/project/maplibre_gl is mandatory.
After enabled you can choose the formatter or widget of a geofield as a "maplibre gl" , in manage display or manage form display of any
entity that has a geofield field.
To make it work you have to obtain an api key from maplibre. And then choose the representation
of the point:
- Marker: https://maplibre.org/maplibre-gl-js/docs/examples/add-a-marker/
- Circle: https://maplibre.org/maplibre-gl-js/docs/examples/multiple-geometries/
- Icon: https://maplibre.org/maplibre-gl-js/docs/examples/geojson-markers/
- Custom image: https://maplibre.org/maplibre-gl-js/docs/examples/add-image/
- Custom Image from other field in the same entity, with the choosen image view
mode.
All comes with tooltip with the choosen view mode of the same entity.
(https://maplibre.org/maplibre-gl-js/docs/examples/popup-on-click/)
If any error of recursive str_replace happens, make it sure that an apropiate view mode for
the entity is not using the geofield_maplibre_gl formatter.