google-static-maps Widget for producing Google Static Maps

  1. Documentation
  2. Change Log

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

Sample image

See Google Static Maps API documentation for more information.

Change Log

March 11, 2010
  • Initial release.
    March 18, 2010
  • Added support for custom icons.
7 0
10 followers
1 350 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Tags:
Developed by: Alex Muir
Created on: Mar 11, 2010
Last updated: 8 years ago

Downloads

show all