Egmap Not Displaying Map

Help please. this is my view:



$gMap = new EGMap();



$gMap->zoom = 6;

$mapTypeControlOptions = array(

  'position' => EGMapControlPosition::RIGHT_TOP,




$gMap->mapTypeId = EGMap::TYPE_ROADMAP;

$gMap->mapTypeControlOptions = $mapTypeControlOptions;


// Preparing InfoWindow with information about our marker.

$info_window_a = new EGMapInfoWindow("<div class='gmaps-label' style='color: #000;'>Hi! I'm your marker!</div>");


// Setting up an icon for marker.

$icon = new EGMapMarkerImage("/files/car.png");


$icon->setSize(32, 37);

$icon->setAnchor(16, 16.5);

$icon->setOrigin(0, 0);


// Saving coordinates after user dragged our marker.

$dragevent = new EGMapEvent('dragend', "function (event) { $.ajax({



                                            'data'<img src='' class='bbc_emoticon' alt=':(' />{'lat':, 'lng': event.latLng.lng()}),


                                        });}", false, EGMapEvent::TYPE_EVENT_DEFAULT);


// If we have already created marker - show it

if ($map) {


    $marker = new EGMapMarker($map->lat, $map->lng, array('title' => Yii::t('catalog', $items->type->name),

            'icon'=>$icon, 'draggable'=>true), 'marker', array('dragevent'=>$dragevent));



    $gMap->setCenter($map->lat, $map->lng);

    $gMap->zoom = 16;


// If we don't have marker in database - make sure user can create one

} else {

    $gMap->setCenter(38.348850, -0.477551);


    // Setting up new event for user click on map, so marker will be created on place and respectful event added.

    $gMap->addEvent(new EGMapEvent('click',

            'function (event) {var marker = new google.maps.Marker({position: event.latLng, map: '.$gMap->getJsName().

            ', draggable: true, icon: '.$icon->toJs().'}); '.$gMap->getJsName().

            '.setCenter(event.latLng); var dragevent = '.$dragevent->toJs('marker').

            '; $.ajax({'.



              '"data"<img src='' class='bbc_emoticon' alt=':(' />{"lat":, "lng": event.latLng.lng()}),'.


            '}); }', false, EGMapEvent::TYPE_EVENT_DEFAULT_ONCE));


$gMap->renderMap(array(), Yii::app()->language);


my action:

 public function actionSavecoords()



        // Uncomment the following line if AJAX validation is needed


        // $this->performAjaxValidation($model);

            if(isset ($_GET['lat']))

                $model->lat = $_GET['lat'];

            if(isset ($_GET['lat']))

                $model->lng = $_GET['lng'];



                    echo 'Thank you for registring your place with '.Yii::app()->name;  






But map not displaying, i watch brown zone

did you try with just