carbon/geomapeditor

Geo Protomaps Inspector Editor for Neos CMS

Installs: 1 054

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:neos-carbon

0.1.5 2024-04-11 21:16 UTC

This package is auto-updated.

Last update: 2024-12-11 23:05:32 UTC


README

Latest stable version Total downloads License GitHub forks GitHub stars GitHub watchers

Geo Inspector Editor for Neos CMS

GeoMapEditor.mp4

Installation

Most of the time you have to make small adjustments to a package (e.g. configuration in Settings.yaml). Because of that, it is important to add the corresponding package to the composer from your theme package.

composer require carbon/geomapeditor --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Et voilĂ ! Your desired package is now installed correctly.

How to use it

'Foo.Bar:Map':
  properties:
    geo:
      type: array
      ui:
        label: Geo Location
        reloadIfChanged: true
        inspector:
          editor: 'Carbon.GeoMapEditor/Editor'
          editorOptions:
            zoom: 4

With editorOptions, you can alter each settings for a map.

Use Protomaps

If you want to use Protomaps you have to set the protomaps.url. You either need to configure your API Key on Protomaps or install Protomaps on your own server.

After that you have to set the correct url in the settings:

Neos:
  Neos:
    Ui:
      frontendConfiguration:
        'Carbon.GeoMapEditor':
          protomaps:
            url: 'https://api.protomaps.com/tiles/v3/{z}/{x}/{y}.mvt?key=YOUR_API_KEY'

Change global settings

The change the inital zoom or the position of the map change zoom and/or center. mapOptions is used to set the settings for the map

Neos:
  Neos:
    Ui:
      frontendConfiguration:
        'Carbon.GeoMapEditor':
          protomaps:
            url: null
          defaultTileLayer:
            url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
            attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
          mapOptions:
            scrollWheelZoom: false
            minZoom: 3
            maxZoom: 18
            attributionControl: true
          zoom: 13
          center:
            lat: 46.948
            lng: 7.459