Hi,
I wrote a function before which is to check whether a point where a user clicks intersects with a layer, like:
view.on("click", function(event)
{
... //my handling of the event inside
queryEarthquakeLayer(event).then(function(y)
...
}
I recently added a search widget so that a user can type in the coordinates/address. How to mimic a mouse
click event inside the function handling the returned results from search:
search.on('search-complete', function(result){
...
//how to trigger a click event here so that I can use my previous function directly by just
//feeding the click event?
}
I found this in our community but it doesn't work:
map.emit('click', {mapPoint: new esri.geometry.Point(myLong,myLat, esri.SpatialReference({wkid:102100}))
Any idea? Thank you!