项目作者: pauloamgomes

项目描述 :
Cockpit CMS Addon that provides integration with google map via embedded iframe or dynamically using the Maps API
高级语言: PHP
项目地址: git://github.com/pauloamgomes/cockpit-cms-googlemapfield.git
创建时间: 2019-01-17T22:52:39Z
项目社区:https://github.com/pauloamgomes/cockpit-cms-googlemapfield

开源协议:MIT License

下载


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:

  1. google:
  2. maps:
  3. 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.:

  1. groups:
  2. editor:
  3. googlemapsfield:
  4. 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 2019 pauloamgomes under the MIT license.