.: HosiriS :.

Informatica e non solo

Archive for 27 ottobre 2010

Lavoriamo con Google Maps tramite Symfony

Posted by hosiris su ottobre 27, 2010

$ svn co http://svn.symfony-project.com/plugins/sfEasyGMapPlugin/branches/v3 sfEasyGMapPlugin


    enabled_modules: [default, sfEasyGMapPlugin]

modifica ProjectConfiguration.class.php


$ php symfony cc

$ ln -s ../plugins/sfEasyGMapPlugin/web web/sfEasyGMapPlugin

In the action:

$this->gMap = new GMap();
$this->gMap->addMarker(new GMapMarker(51.245475,6.821373));
$this->gMap->addMarker(new GMapMarker(46.262248,6.115969));

In the template:

<?php use_helper('Javascript','GMap') ?>
<?php include_map($gMap,array('width'=>'512px','height'=>'400px')); ?>
<!-- Javascript included at the bottom of the page -->
<?php include_map_javascript($gMap); ?>

Posted in CMS&MVC, Programmazione, Symfony | Leave a Comment »