2017 © Pedro Peláez
 

library charcoal-geolocation

Charcoal geolocation tools

image

locomotivemtl/charcoal-geolocation

Charcoal geolocation tools

  • Monday, July 23, 2018
  • by JoelAlphonso
  • Repository
  • 2 Watchers
  • 0 Stars
  • 16 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Charcoal Geolocation

![License][badge-license] Latest Stable Version ![Code Quality][badge-scrutinizer] Coverage Status ![Build Status][badge-travis], (*1)

A Charcoal service provider my cool feature., (*2)

Table of Contents

Installation

The preferred (and only supported) method is with Composer:, (*3)

$ composer require locomotivemtl/charcoal-geolocation

Dependencies

Required

Configuration

Add the views and the metadata paths to the config file., (*4)

"metadata": {
       "paths": [
           "...",
           "vendor/locomotivemtl/charcoal-geolocation/metadata/"
       ]
   },
   "view": {
       "paths": [
           "...",
           "vendor/locomotivemtl/charcoal-geolocation/views/"
       ]
   }

Usage

The module is basically a collection of properties, inputs and widgets. All you have to do is use them., (*5)

  • GeolocationCollection widget implementation example for an object's dashboard :
"map": {
    "type": "charcoal/geolocation/widget/geolocation-collection",
    "geometry_property": "geometry",
    "infobox_template": "project/widget/example-infobox",
    "priority": 10
}

To use the properties provided by this Module, you have to refer to them with their full PHP path from the object metadata : Charcoal\\Geolocation\\Property\\MapStructureProperty Charcoal\\Geolocation\\Property\\PointProperty Charcoal\\Geolocation\\Property\\PolylineProperty Charcoal\\Geolocation\\Property\\PolygonProperty, (*6)

Widgets

The following base widgets are available to build the various admin templates:, (*7)

  • GeolocationCollection
    • Widget That can show a collection of object that has a property that implements GeolocationInterface
    • Specify the property ident to use
    • Specify a template to show the

Property Inputs

The following property inputs are available to build forms in the admin module:, (*8)

  • MapStructure, (*9)

    • A specialized widget to add and edit geolocation data on a map.
      • Supported geolocation types:
        • Point
        • Polyline
        • Polygon
    • Cannot be multiple
    • Requires google-map.
    • Requires gmap.
    • Extends StructureProperty from charcoal-property.
    • Implements GeolocationInterface.
  • AbstractGeolocation, (*10)

    • Base property for:
      • Point
      • Polyline
      • Polygon
    • Extends AbstractProperty from charcoal-property.
    • Implements GeolocationInterface.
  • Point, (*11)

    • A specialized widget to add and edit Point geolocation data on a map.
    • Requires google-map.
    • Requires gmap.
  • Polyline, (*12)

    • A specialized widget to add and edit Polyline geolocation data on a map.
    • Requires google-map.
    • Requires gmap.
  • Polygon, (*13)

    • A specialized widget to add and edit Polygon geolocation data on a map.
    • Requires google-map.
    • Requires gmap.

Development

To install the development environment:, (*14)

$ composer install

To run the scripts (phplint, phpcs, and phpunit):, (*15)

$ composer test

API Documentation

Development Dependencies

  • [php-coveralls/php-coveralls][phpcov]
  • [phpunit/phpunit][phpunit]
  • [squizlabs/php_codesniffer][phpcs]
  • [seld/jsonlint][jsonlint]

Coding Style

The charcoal-geolocation module follows the Charcoal coding-style:, (*16)

Coding style validation / enforcement can be performed with composer phpcs. An auto-fixer is also available with composer phpcbf., (*17)

Credits

License

Charcoal is licensed under the MIT license. See LICENSE for details., (*18)

The Versions

23/07 2018

dev-master

9999999-dev https://locomotivemtl.github.io/charcoal-geolocation/

Charcoal geolocation tools

  Sources   Download

MIT

The Requires

 

The Development Requires

framework geolocation map charcoal locomotive