nthmedia / entry-gps-coordinates
Entry GPS Coordinates plugin for Craft CMS 3.x
Installs: 4 943
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 5
Open Issues: 4
Type:craft-plugin
Requires
- php: ^8.0
- craftcms/cms: ^4.0.0 || ^5.0.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/rector: dev-main
- phpstan/phpstan: ^1.6
README
Pick a GPS location for an entry
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project and tell composer to install the plugin
composer require nthmedia/entry-gps-coordinates
-
Activate the plugin in Craft through the command line or through the Control Panel under Settings → Plugins
./craft install/plugin entry-gps-coordinates
-
Add a Coordinates field under Settings → Fields and add this field to a Section under Settings → Sections
Usage in Twig
{{ entry.fieldName | searchQuery }} => Van Gogh Museum
{{ entry.fieldName | coordinates }} => 52.3584159,4.8810756
{{ entry.fieldName | latitude }} => 52.3584159
{{ entry.fieldName | longitude }} => 4.8810756
{{ entry.fieldName | zoomLevel }} => 13
{{ entry.fieldName | address }} => Paulus Potterstraat 7, 1071 CX Amsterdam, Netherlands