title: jquery-gmap yii
body: <p>I'm using this extension <a href="http://www.yiiframework.com/extension/jquery-gmap/" rel="nofollow">Yii Framework: Jquery-gmap</a>
  Im my application I've used <code>$gmap-&gt;updateMarkerAddressFromModel</code> &amp; <code>$marker-&gt;capturePosition</code>. </p>
  
  <p>But <code>$gmap-&gt;updateMarkerAddressFromModel</code> is not working when <code>$marker-&gt;capturePosition</code> is used, otherwise <code>$gmap-&gt;updateMarkerAddressFromModel</code> is working fine when used alone.</p>
  
  <p>My code</p>
  
  <pre><code>&lt;?php
                  Yii::import('ext.jquery-gmap.*');
                  $gmap = new EGmap3Widget();
                  $gmap-&gt;setSize(400, 234);
  
                  // base options
                  $options = array(
                      'scaleControl' =&gt; true,
                      'zoom' =&gt; 15,
                      'center' =&gt; array(0, 0),
                      'mapTypeId' =&gt; EGmap3MapTypeId::ROADMAP,
                      'mapTypeControlOptions' =&gt; array(
                          'style' =&gt; EGmap3MapTypeControlStyle::DROPDOWN_MENU,
                          'position' =&gt; EGmap3ControlPosition::TOP_CENTER,
                      ),
                  );
                  $gmap-&gt;setOptions($options);
  
                  // marker with custom icon
                  $marker = new EGmap3Marker(array(
                              'draggable' =&gt; true,
                          ));
                  $marker-&gt;address = 'London';
                  $marker-&gt;capturePosition(
                      // the model object
                      $businessModel,
                      // model's latitude property name
                      'lat',
                      // model's longitude property name
                      'longi',
                      array('drag')
                  );
                  // tell the gmap to update the marker from the model fields.
                  $gmap-&gt;updateMarkerAddressFromModel(
                          // the model object
                          $businessModel,
                          array('street','town','country'),
                          array('zoom'=&gt;16)
                  );
                  $marker-&gt;centerOnMap();
                  $gmap-&gt;add($marker);
                  $gmap-&gt;renderMap();
                  ?&gt;
  </code></pre>