I would like to set a (lon, lat) info as a default query in basic Search Widget through JS.
Please help.
Bulbul,
Here is a thread that answers that:
GeoForm- Geolocate a Field
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.
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.
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.
for the future.... your guide to GeoNet GeoNet Community Structure
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.