A widget that quickly produces Google Static Maps.
Handles most features of the Static Maps API, with the exception of polylines
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/components/widgets
Usage ¶
See the following code example:
$this->widget('application.components.widgets.WGoogleStaticMap',array(
'center'=>'52.3214,2.34403', // Or you can use text eg. Dundee, Scotland
'alt'=>"Map for location of something", // Alt text for image (optional)
'zoom'=>0, // Google map zoom level
'width'=>250, // image width
'height'=>250, // image Height
'markers'=>array(
array(
'style'=>array('color'=>'green'),
'locations'=>array('Dundee, UK','Sydney, Australia'), // Or use lat/long pairs
),
array(
'style'=>array('color'=>'blue','label'=>'X'),
'locations'=>array('52.433432,-100.34322'),
),
),
'linkUrl'=>array('location/view'), // Where the image should link (optional)
'linkOptions'=>array('target'=>'_blank'), // HTML options for link tag (optional)
'imageOptions'=>array('class'=>'map-image'), // HTML options for img tag (optional)
));
Result ¶
See Google Static Maps API documentation for more information.
Change Log ¶
March 11, 2010 ¶
- Initial release.
March 18, 2010 ¶
- Added support for custom icons.
User Contributed Notes 2
A+
Great widget with swift support from the developer. Thumbs up!
Greate and very useful
Very good and useful widget.
Leave a comment
If you have any questions, please ask in the forum instead.
Join the conversation to share a note.