curious-inc / map-form-type-bundle
Generic Map FormType for Symfony 3
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 737
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 6
Forks: 2
Language:JavaScript
Type:symfony-bundle
Requires
- php: ^7.4
- symfony/form: 4.4.*
- symfony/framework-bundle: 4.4.*
- symfony/security-bundle: 4.4.*
- twig/twig: 2.12.*
Requires (Dev)
- phpunit/phpunit: ~4.8|~5.0
- symfony/console: ^4.4
- symfony/phpunit-bridge: ^4.4
This package is not auto-updated.
Last update: 2023-04-30 15:45:41 UTC
README
Generic Map FormType for Symfony 3 and Sonata Project.
Set latitude, longitude and any other value from Nominatim on a form using Leaflet. Supports the configuration of a fallback layer, base layers and overlay layers. When a pin is dragged or an address is filled in, the fields are updated.
Branch | Travis |
---|---|
master | |
develop |
Installation
1) Install Prerequisites
Make sure bootstrap styles and scripts are included.
Note: when using bootstrap v4, make sure glyphicons are included too.
2) Install the Bundle
Install the bundle using composer:
composer require curious-inc/map-form-type-bundle
3) Enable the Bundle
Register the bundle in app/AppKernel.php
to enable it:
// app/AppKernel.php // ... class AppKernel extends Kernel { // ... public function registerBundles() { $bundles = [ // ... new CuriousInc\MapFormTypeBundle\CuriousIncMapFormTypeBundle(), ]; // ... } }
4) Configure the Bundle
Add the following configuration to app/config/config.yml
and change it to needs or wishes accordingly:
curious_inc_map_form_type: ~
5) Configure the MapType template
Add the MapType template to app/config/config.yml
under twig, like so:
# Twig Configuration twig: form_themes: - CuriousIncMapFormTypeBundle:Form:fields.html.twig