Charcoal Geolocation
![License][badge-license]
![Code Quality][badge-scrutinizer]
![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)
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
The following property inputs are available to build forms in the admin module:, (*8)
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)