Changeset 3240 for trunk/modules
- Timestamp:
- 07/30/2008 04:42:43 PM (4 months ago)
- Files:
-
- 1 modified
-
trunk/modules/gmaps/libraries/Gmap.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/gmaps/libraries/Gmap.php
r3216 r3240 312 312 * 313 313 * @param string $template template name 314 * @param array $extra extra fields passed to the template 314 315 * @return string 315 316 */ 316 public function render($template = 'gmaps/javascript' )317 public function render($template = 'gmaps/javascript', $extra = array()) 317 318 { 318 319 // Latitude, longitude, zoom and default map type … … 342 343 // Map centering 343 344 $center = 'map.setCenter(new google.maps.LatLng('.$lat.', '.$lon.'), '.$zoom.', '.$default_type.');'; 344 345 // Render the Javascript 346 return View::factory($template, array 345 346 $data = array_merge($extra, array 347 347 ( 348 348 'map' => $map, … … 352 352 'icons' => $this->icons, 353 353 'markers' => $this->markers, 354 )) 355 ->render(); 354 )); 355 356 // Render the Javascript 357 return View::factory($template, $data)->render(); 356 358 } 357 359
