1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    15
    Vote Rating
    0
    sedoyksa is on a distinguished road

      0  

    Default Unanswered: add gmap

    Unanswered: add gmap


    hi
    i have code
    Code:
      GEvent.addListener(
      cont.items.map.Gmap_panel_test.gmap,
      'click',
      function(e,xy){
           var point = new GLatLng(xy.x, xy.y);
     var marker = new  GMarker(point, {draggable: true});
    this.addOverlay(marker);
    Ext.Msg.alert('You click at','lat: '+xy.x+',long:'+xy.y)
      }
    )
    but i haven't marker after click. something wrong?its just alert

  2. #2
    Ext JS Premium Member twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    223
    Vote Rating
    3
    Answers
    15
    twaindev is on a distinguished road

      0  

    Default


    Looks like you're using an older Google Maps API? I advise you to use the latest version.

    An example of adding a marker on mouse click using the latest API can be found here:

    http://code.google.com/intl/nl-NL/ap...EventArguments

Thread Participants: 1