Changeset 17901
- Timestamp:
- 05/03/09 18:29:39 (4 years ago)
- Files:
-
- plugins/sfEasyGMapPlugin/trunk/lib/GMap.class.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfEasyGMapPlugin/trunk/lib/GMap.class.php
r17900 r17901 11 11 protected $default_options = array( 12 12 'double_click_zoom' => true, 13 'control' => 'new google.maps.LargeMapControl()',13 'control' => array('new google.maps.LargeMapControl()'), 14 14 'zoom' => 10, 15 15 'center_lat' => 48.845398, … … 264 264 * @return $string 265 265 * @author Fabrice Bernhard 266 * @since 2009-04-23 tomr changed control from string to array 267 * @since 2009-05-03 fabriceb added backwards compatibility 266 268 */ 267 269 public function getJavascript() … … 279 281 $init_events[] = $this->getJsName().'.enableDoubleClickZoom();'; 280 282 } 281 if ($options['control']!='') 283 if (is_array($options['control'])) 284 { 285 foreach ($options['control'] as $control) 286 { 287 $init_events[] = $this->getJsName().'.addControl('.$control.');'; 288 } 289 } 290 else if ($options['control'] != '') 282 291 { 283 292 $init_events[] = $this->getJsName().'.addControl('.$options['control'].');';