I am working on a project and I am pretty stuck. I would like to create a route based on directions. That is the easy part. Then do a search for a particular service, Gas Stations, Restaurants, Stores. I want the particular location along my route. My guess would be to create a buffer around my route (based on how far I would be willing to go off my route), and then clip the services that fall within the buffer. The issue with most searches is that when I do the search it gives me a radius search from my location or beginning location. I would like to find services along my route to help me choose the best location for a ce to stop.
I added a script, which is basically the Directions API. I like the way it is formatted with the options on the right. I am open to some ideas if anyone has any.
Thanks for your help.
Jason
https://developers.arcgis.com/javascript/jssamples/search_basic.html
There is an example search query script in the samples part of the API
section. Maybe I am confused too. Do you know of a service that has a search
function like a google map search?
Jason,
That example is using a locator service not a map service. To be able to do a spatial search (i.e. intersection of a POI point and the buffer) you have to have a map service that contains those POIs.
I have done a quick search. I don't see anything that comprehensive without
paying for some sort of data bundle from a website. Have you seen any sort of
map service that has a pretty good amount of locations that would be useful. I
am heading home soon, I added my personal email, if possible can you reply to
all.
Jason,
I am not aware of such a service.
Robert, I have access to the data now and will start putting it together.
Should I try to sort the type of restaurant or group them? Also have you had a
chance to think about the way to set up this file?
Jason
Jason,
Should I try to sort the type of restaurant or group them
I don't have a clue. Consider what you goals are.
As far as the development and code. First let me warn you that this is going to be a challenge for a beginner/novice.
You have a long road ahead of learning the JS API to accomplish this.
Hey Robert, I have the beginning piece put together. I am working on getting
the data put together. The map did not show when I tried to run it. Can you
see any issues in it?
Jason
Jason,
What am I suppose to be looking at? Did you update the original attachment?
Robert, that is the updated script with the directions and the buffer portions
on it. I also have the data now, but it was more than 1000 points so I am
going to have to bring it down to a lesser amount. Unless I can get one of the
servers up and running. Are you able to review the script to see if I am on
the right track. Also now that I have the data what should I be doing to show
the points within the buffer?
Jason
Jason,
I don't see a thing different in the attached script. People in GeoNet will be more than happy to assist with coding when individuals get stuck, but this is not a place where you ask other to do the coding for you. You may needed to hire a consulting company for this as what you are wanting to do is not as simple as copy and pasting a couple of scripts together.