Skip to content
Cockpit CMS Addon that provides integration with google map via embedded iframe or dynamically using the Maps API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
.gitignore
LICENSE
README.md
admin.php
bootstrap.php

README.md

Google Maps Addon for Cockpit CMS

This addon enhances Cockpit CMS by providing two new field types (googlemap and googlemapiframe) that can be used to handle easily google maps information.

Installation

Download and unpack addon to <cockpit-folder>/addons/GoogleMapsField folder.

Configuration

Google API key/secret

You need to have a google map api key and configure it in config.yaml:

google:
  maps:
    api_key: xxxxxxx_GMAPS_API_KEY_xxxxxxxxx

Permissions

The field to be used by non admin users requires a permission defined at the group level, e.g.:

groups:
  editor:
    googlemapsfield:
      access: true

Usage

Googlemap

Having a new field in your collection you only need to type something or drag the marker:

interactive map

Its possible to provide extra details (e.g. marker title, infowindow text)

Details

And the resulting json that can be used in the frontend:

Map json

Google iframe map

The field works basically as a container/validator for a google embeded url (iframe), providing the possibility to preview the url:

Iframe Map

And the resulting field json:

Embeded map json

Copyright and license

Copyright 2019 pauloamgomes under the MIT license.

You can’t perform that action at this time.