I would like to set a (lon, lat) info as a default query in basic Search Widget through JS.
Please help.
Solved! Go to Solution.
Bulbul,
Here is a thread that answers that:
Thank you for this useful thread. I am trying to use the code available here. I need to run sql query within java script. Any help.
In more detail
I need to access a database through sql-query and get longitude and latitude of a certain location. That (lon, lat) info will go to the search widget via java script.
Bulbul,
Unless the database table/featurelayer is coming from ArcGIS Server then your only option is to develop a web service that will have access to the data. JavaScript is a client side language and does not provide access to query databases on its own.
for the future.... your guide to GeoNet GeoNet Community Structure