5

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?

asked Dec 1, 2010 at 2:32
3
  • 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. Commented Dec 3, 2010 at 16:34
  • Hi Tim, happy to hear how you resolved this issue. cheers Commented 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. Commented Mar 30, 2011 at 17:07

2 Answers 2

1

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

answered Apr 20, 2011 at 6:22
1
  • 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. Commented Apr 25, 2011 at 21:16
0
1
  • 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. Commented Sep 6, 2011 at 13:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.