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?

  • 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, 2010 at 16:34
  • Hi Tim, happy to hear how you resolved this issue. cheers
    – scw
    Feb 28, 2011 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, 2011 at 17:07

2 Answers 2


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

  • 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, 2011 at 21:16

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

  • 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, 2011 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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