ソースを参照

Merge pull request #14 from dsgraham/master

Added an option to set the animation property on a map marker.
Mark 12 年 前
コミット
f6cef24eae
1 ファイル変更4 行追加0 行削除
  1. 4 0
      View/Helper/GoogleMapV3Helper.php

+ 4 - 0
View/Helper/GoogleMapV3Helper.php

@@ -168,6 +168,7 @@ class GoogleMapV3Helper extends AppHelper {
 		),
 		),
 		'marker'=>array(
 		'marker'=>array(
 			//'autoCenter' => true,
 			//'autoCenter' => true,
+			'animation' => null,  # BOUNCE or DROP  https://developers.google.com/maps/documentation/javascript/3.exp/reference#Animation
 			'icon' => null, # => default (red marker) //http://google-maps-icons.googlecode.com/files/home.png
 			'icon' => null, # => default (red marker) //http://google-maps-icons.googlecode.com/files/home.png
 			'title' => null,
 			'title' => null,
 			'shadow' => null,
 			'shadow' => null,
@@ -524,6 +525,9 @@ class GoogleMapV3Helper extends AppHelper {
 		if (isset($options['zIndex'])) {
 		if (isset($options['zIndex'])) {
 			$params['zIndex'] = $options['zIndex'];
 			$params['zIndex'] = $options['zIndex'];
 		}
 		}
+		if (isset($options['animation'])) {
+			$params['animation'] = 'google.maps.Animation.'.$options['animation'];
+		}
 
 
 		// geocode if necessary
 		// geocode if necessary
 		if (!isset($options['lat']) || !isset($options['lng'])) {
 		if (!isset($options['lat']) || !isset($options['lng'])) {