tsellste

LocateButton on locate event

Discussion created by tsellste Champion on Jan 23, 2014
Latest reply on Jan 25, 2014 by pepatosp
Greetings!

I am working with the LocateButton and trying to get some information about the point when the on 'locate' event fires.  It looks like it is supposed provide graphic, position and scale information, but I guess I am not sure what the proper syntax is to return this information.  This is my code:

var geoLocate = new LocateButton({
   map: map,
   setScale: false,
   centerAt: false
}, "LocateButton");
geoLocate.startup();
geoLocate.on('locate',gpsUpdate);
  
function gpsUpdate(gps) {
   // do fun things with GPS info
}


Thanks for any help!

Outcomes