looptribe/form-spatial
最新稳定版本:v0.0.3
Composer 安装命令:
composer require looptribe/form-spatial
包简介
Spatial support for Symfony2 forms with Google Maps
README 文档
README
Spatial support for Symfony2 forms with Google Maps.
This package is a Symfony2 forms integration of creof/doctrine2-spatial.
It adds a new form type point to edit spatial Point types with Google Maps.
Installation
$ php composer.phar require looptribe/form-spatial dev-master
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Looptribe\FormSpatialBundle\LooptribeFormSpatialBundle(), // ... ); }
# app/config/parameters.yml parameters: looptribe.formspatial.google_maps_api_key: YOUR_API_KEY
Usage
When you create a form set your Point field type as Looptribe\FormSpatialBundle\Form\Type\PointType:
<?php public function buildForm(FormBuilderInterface $builder, array $options) { $builder // ... ->add('location', Looptribe\FormSpatialBundle\Form\Type\PointType::class) // ... ; }
Development
At the moment only the geography Point type is supported.
统计信息
- 总下载量: 2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-21