How to progress with ESRI JS API...on possible project

465
2
01-26-2012 06:48 AM
AndyBurns
Occasional Contributor
Hi

We are looking at replacing a app we have setup with google where users can search for the property which gets passed to google to find the closest bus stop to their location.

I would like to get this under ESRI and the JS API but unsure how to progress forward and what to look at first.

We would have an address database lookup which is already integrated with the JS API and is a REST service. This will take the user to the location on the map where they live or are at the moment (geolocations will also be available if the user wants to enable it)

during the pass of the address to the map, i would like it to find features on a map from a distance specified and the first 5 found and highlight the results on the map.

user can click on each result on map or full results table of 1-5 available below map - okay with this.

Just wondering what i should be looking at, looking at the samples, the find features on map seems to be a good start..would anyone have any feedback or advice for me?

thanks
0 Kudos
2 Replies
derekswingley1
Frequent Contributor
Hi Andy,

I would dive right in and start prototyping. Build something and iterate.

For specific things, checkout the geolocation sample as well as a few showing how to use a query task (probably what you want to use when you're searching for features, as long as you're searching a single layer at a time). The query with buffer or the query for polygon and adjacent polygons sample might be what you need.
0 Kudos
MattMoyles
New Contributor III
Check out this dojo mvc boilerplate code. Just clone the code with git and start hacking. I've been building our ESRI powered app with this framework and have had great results. It forces you to keep your code organized and loosely coupled to dom elements. We are running multiple map widgets in tab containers, firing off multiple async geoprocessors and re-routing output back to the dom and all sorts of neat stuff. Especially powerful in the application is the router which allows you to control application state using regular old < a href="#/datasets/12" type tags. Other parts of dojo are worth looking into such as the JsonRestStore which makes it super easy to code up a rest api in a server side language (rails,php etc) and communicate with your relational database on the backend for user management and the likes.

https://github.com/rmurphey/dojo-demo
0 Kudos