var geoLocate = new LocateButton({ map:map }, "LocateButton"); geoLocate.startup(); geoLocate.on("locate", dothis); function dothis(locate){ //Put your buffer code here };
geoLocate.on("locate", dothat); function dothat(evt){ circle = new Circle({ center: evt.graphic.geometry, geodesic: true, radius: 5, radiusUnit: "esriMiles" }); map.graphics.clear(); map.infoWindow.hide(); var graphic = new Graphic(circle, circleSymb); map.graphics.add(graphic); var query = new Query(); query.geometry = circle.getExtent(); featureLayer.queryFeatures(query, selectInBuffer); };