Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

First of all, let me specify that this is for the JavaScript API 2.1 or later only, not ADF/Google/Virtual Earth/Silverlight/Flex or any of the other extensions.

We've been creating geometry from a road geometry service to display travel routes on our map. We also have a layer of known routes. We're working on trying to speed things up by using the known routes in a JSAPI map, and calling the road geometry service only when we need to update or add routes.

Using the road geometry service, we can draw the route so that when a vehicle is shown on the route, the road already traveled can be red, and the remaining route as green. Has anybody tried to render lines with different symbols on different parts of the line?

share|improve this question
    
OK, so it looks like nobody's done it. I think I'm going to have to create an overlay of the already-traveled route and put it on top of the full route. I'll post the resolution here if anybody wants to see it - or can suggest improvements. –  Tim Rourke Dec 3 '10 at 16:34
    
Hi Tim, happy to hear how you resolved this issue. cheers –  scw Feb 28 '11 at 8:07
    
I tried this, but as it involved walking through line segments which can traverse a continent, and comparing points to position along a line provide to be too much for good performance in a browser on the client side. For now, we're just drawing two lines - the full route with a thick line, and a thin line showing the route traveled so far drawn on top of the first line. When we get the time we'll probably look at implementing something on the server side. –  Tim Rourke Mar 30 '11 at 17:07
add comment

2 Answers

up vote 0 down vote accepted

If you have an ArcGIS Server Advanced License, you "should" be able to create a model in ArcGIS Desktop. Add the model to a Tool Layer and then publish it to a Map Service. This should allow you to use the Linear Referencing Toolbox in ArcGIS Desktop in your JavaScript Application. Is this a possible solution?

Have a great day, CDB

share|improve this answer
    
That's where we're headed, but we've put it aside during rolling out our web application. I'll mark this as the answer. Thanks for the input. –  Tim Rourke Apr 25 '11 at 21:16
add comment

you can see http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2011/08/19/A-server-object-extension-for-performing-dynamic-segmentation.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ArcgisServerDevelopmentBlog+%28ArcGIS+Server+Development+Blog%29

share|improve this answer
    
I saw that blog entry last week, but thanks for posting it here for others who find this question. We haven't been able to get any SOE to work in our environment, so this isn't a solution for us. Hopefully it will help someone though. –  Tim Rourke Sep 6 '11 at 13:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.