Given a lat lng or x,y coordinate, I need to specify whether it is in a land or sea in map using arcgis for javascript api. Can anyone help with this ? Thank you in advance.
Solved! Go to Solution.
Aarthi,
Use a public map service like this:
And yes you can use it in JS API or I would not have suggested it.
QueryTask:
QueryTask | API Reference | ArcGIS API for JavaScript 3.27
Query:
Query | API Reference | ArcGIS API for JavaScript 3.27
Sample of how to use Query and QueryTask with a mouse click:
Aarthi,
You would need to use a map service that represents land and query that map service to see if the clicked point intersects if the returned features are greater than 0 then you are on land.
Thank you Robert, for your response. Can you please explain what kind of map service it is and will I be able to make use of it in arcgis api for javascript ?
Aarthi,
Use a public map service like this:
And yes you can use it in JS API or I would not have suggested it.
QueryTask:
QueryTask | API Reference | ArcGIS API for JavaScript 3.27
Query:
Query | API Reference | ArcGIS API for JavaScript 3.27
Sample of how to use Query and QueryTask with a mouse click:
Thank you so much. I will have a look at these references and services.
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.