ttree/googlemapeditor

Last activity on 12 December 2020
  • 13
  • 2
  • 2900
composer require ttree/googlemapeditor

Google Map Inspector Editors for Neos CMS

1.1.2

Google Map Inspector Editors for Neos CMS

Version
1.1.2
Type
neos-package
Release Date
25.10.2019 10:06:17
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
MIT 4a42617556f46e66a3bda5cf08e25df3c5e03276

Google Map Inspector Editors for Neos CMS

This package provides a Neos CMS Inspector Editor to select geo coordinates from a Google Map.

Configuration

You need to configure your API key, see the editorOptions.key bellow. defaultPosition is required to see the initial marker.

Neos:
  Neos:
    userInterface:
      inspector:
        dataTypes:
          Ttree\GoogleMapEditor\GeoPoint:
            editorOptions:
              url: https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places
              key: use-a-valid-google-map-api-key
              defaultPosition: [-34.397, 150.644]
              defaultZoom: 8
              search: true
              searchPlaceholder: 'Enter address to search'
              defaultSearchTerm: 'Vienna'
              mapDefaultOptions:
                scrollwheel: false
                navigationControl: false
                mapTypeControl: false
                streetViewControl: false
                draggableCursor: default
                draggingCursor: pointer

The mapDefaultOptions accept any option accepted by the GoogleMap component from react-google-maps. So you can be fancy and override the provided styles globaly or for each node property, see bellow for the node property configuration.

Usage

The default configuration is quiet slim:

'Your.Package:Map':
  properties:
    geopoint:
      type: Ttree\GoogleMapEditor\GeoPoint

Tips: Don't disable the fullscreenControl, the editor work fine in full screen mode.

For each instance of the editor, you can also customize the default editorOptions:

'Your.Package:Map':
  properties:
    geopoint:
      type: Ttree\GoogleMapEditor\GeoPoint
      ui:
        inspector:
          editorOptions:
            defaultPosition: [-34.397, 150.644]
            defaultZoom: 14
            mapDefaultOptions:
                streetViewControl: true
                styles:
                  - featureType: all
                    elementType: geometry.fill
                    stylers:
                      - weight: 2.00

Acknowledgments

Development sponsored by visol & ttree ltd - neos solution provider.

We try our best to craft this package with a lots of love, we are open to sponsoring, support request, ... just contact us.

License

The MIT License (MIT). Please see LICENSE for more information.

The content of the readme is provided by Github
The same vendor provides 48 package(s).