Skip to content

nasr/sonata-spatial

 
 

Repository files navigation

Sonata Spatial Bundle

Spatial support for Sonata Admin with Google Maps

This package is a Sonata Admin integration of djlambert/doctrine2-spatial.

Installation

$ php composer.phar require looptribe/sonata-spatial dev-master
<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Looptribe\SonataSpatialBundle\LooptribeSonataSpatialBundle(),
        // ...
    );
}

Usage

Simply add to your Sonata admin class

// src/Looptribe/MyBundle/Admin/FooAdmin.php

<?php

// Fields to be shown on create/edit forms
protected function configureFormFields(FormMapper $formMapper)
{
    $formMapper
        // ...
        ->add('location', 'point')
        // ...
    ;
}

Development

At the moment only the Point type is supported.

About

SonataSpatialBundle - Spatial support for Sonata Admin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 54.4%
  • HTML 45.6%