Select to view content in your preferred language

Adding Geoprocessing to HTML or Java

5229
29
11-06-2015 02:46 AM
JasonSchelte
Deactivated User

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

0 Kudos
29 Replies
RobertScheitlin__GISP
MVP Emeritus

Jason,

   Do you have a service that would be used to represent the places youe are wanting to search for along your route (i.e Gas Stations, Restaurants, Stores)?

0 Kudos
JasonSchelte
Deactivated User

Robert, that is the part I am kind of trying to figure out. When I use the

Directions API for example I can get a few choices. Not sure if I can get a

specific list. Also is the buffer possible after the route is created? Do you

think that this is something that is possible?

Thanks for the help with this,

Jason

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jason,

   Sure you can get the routes geometry and then using the JS API you can buffer that route geometry. The issue would be having a mapservice that represents the desired stops for Gas Stations, etc.

0 Kudos
JasonSchelte
Deactivated User

Hmm, ok . Do you have any ideas on how we could accomplish that? Will it be

easier to go through ArcGIS online for something that. Or is there a way to do

the search after we have the buffer?

Jason

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jason,

   The only way I am familiar with is to have a map service that is a point feature for your Gas Stations, etc and use the QueryTask in the JS API to get the features of that map service that intersect the buffer.

0 Kudos
JasonSchelte
Deactivated User

Ok, that seems like it might work. Would I be able to get the info from the

point that was queried? For instance the address so I could re-input that in

the directions search. Are you able to create something like that? I am not

the strongest in writing Script.

Jason

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jason,

   I all boils down to you having a mapservice that represents your POIs (Gas, Food, etc.). If you find that then I might be able to find some time to provide you with some code example.

0 Kudos
JasonSchelte
Deactivated User

Would the ESRI query, work as a map service that could do the search?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jason,

   I am not sure what you are referring to when you say "ESRI query"...

0 Kudos