this.map = new esri.Map("map", { slider: false }); var basemap = new esri.layers.ArcGISTiledMapServiceLayer(url); this.map.addLayer(basemap); var featureLayer = new esri.layers.FeatureLayer(url, { mode: FeatureLayer.MODE_ONDEMAND }); this.map.addLayer(featureLayer); //when the map is clicked create a buffer around the click point of the specified distance. var sr = this.map.spatialReference; this.map.on("click", function (evt) { var query = new Query(); var extent = new esri.geometry.Extent(evt.mapPoint.x - 20, evt.mapPoint.y - 20, evt.mapPoint.x + 20, evt.mapPoint.y + 20, sr); query.geometry = extent; query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS; featureLayer.selectFeatures(query, FeatureLayer.SELECTION_ADD); });
utils.createMap(this.webmap, "map", {mapOptions: this.mapOptions}).then(dojo.hitch(this, function (response) { this.map = response.map; }));
Solved! Go to Solution.
utils.createMap(this.webmap, "map", {mapOptions: this.mapOptions}).then(dojo.hitch(this, function (response) { this.map = response.map; response.clickEventHandle.remove(); }));
utils.createMap(this.webmap, "map", {mapOptions: this.mapOptions}).then(dojo.hitch(this, function (response) { this.map = response.map; response.clickEventHandle.remove(); }));