I am sorry I had to attach the file here, because Yii site says I’m too new to add extensions, funny thing I’m not too new to make one ![]()
Things you might like to know about it:
-
loosely based on http://www.yiiframework.com/extension/gmap [removed a bit of useless code]
-
works with Google Maps JS API v3 (instead of v2 in gmaps extension)
[size="5"]Install[/size]
just extract to protected/extensions/ directory
[size="5"]How to use?[/size]
[list=1]
[*]open you view file
[*]add the code
<?php
$this->widget('application.extensions.gmapv3.GMap', array(
'id' => 'gmap3',
'key' => 'my google maps API key',
'address' => array(
'address' => 'Some nice street address here', //address of the place
'city' => 'Varna',
//'state' => 'CA',
'country' => 'Bulgaria'
//'zip' => 'XXXXX' - zip or postal code
),
'zoom' => 14, //0 to 17
'height' => '250px',
'width' => '250px',
));
?>
[*]edit the values to suit your purposes, you can comment/remove the city/state/country/zip lines and give full human readable address
[/list]