In some view file dubai.php I’m calling the map widget and passing it some values
<?php $this->widget('Map', array('lat' => 25.126223, 'lon' => 55.208809, 'frameWidth' => 652, 'frameHeight' => 412)); ?>
The widget I have created has a view file location.php in the views folder of components folder. The Map widget class Map.php. Map class is to receive data and pass on to location.php file which does the work of displaying google map
<?php
class Map extends CWidget
{
public function run()
{
$this->render('location', array('lat' => $lat, 'lon' => $lon, 'frameWidth' => $frameWidth, 'frameHeight' => $frameHeight));
}
}
I get this error Property "Map.lat" is not defined.
Is the array data passed as $_GET variables ?
$this->render('location', array('lat' => What do I need to write here ?,