AnsweredAssumed Answered

How do I click a map dynamically.

Question asked by muralidhar.moka on Apr 15, 2019
Latest reply on Apr 16, 2019 by muralidhar.moka



Here is a method which will querying for a point. 

QueryTask returns the point and then we add the point to the map.

I would like to dynamically click at the point location.

How can I do that.



showFacilityGeometry :function(facilityId){

  var queryTask = new QueryTask("");
var query = new Query();
query.where = "FACILITY_ID='" + facilityId + "'";
query.returnGeometry = true;;


//Here I get a point geometry and we create symbol for that point.
var geometry = feature.features[0].geometry;
var pointSymbol = new SimpleMarkerSymbol();
pointSymbol.setColor(new Color([255, 255, 0, 0.5]));

//create graphic and add graphic
var graphic = new Graphic(geometry, pointSymbol);;

//Here I want to dynamically click the map at the above point??? How to do this?

//zoom to the point geometry. added padding to the extension
var PointExtent = new Extent(geometry.x - 250, geometry.y - 250, geometry.x + 250, geometry.y + 250);
PointExtent.spatialReference = new SpatialReference({ wkid: 102736 });;