How can I set a default query in Search Widget?

2478
5
Jump to solution
01-14-2016 11:01 AM
BulbulMajumder1
New Contributor III

I would like to set a (lon, lat) info as a default query in basic Search Widget through JS.

Please help.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Bulbul,

   Here is a thread that answers that:

GeoForm- Geolocate a Field

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Bulbul,

   Here is a thread that answers that:

GeoForm- Geolocate a Field

BulbulMajumder1
New Contributor III

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.

0 Kudos
BulbulMajumder1
New Contributor III

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.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
DanPatterson_Retired
MVP Emeritus

for the future.... your guide to GeoNet GeoNet Community Structure