|
Hello,
There probably isn't a real good way to do this for several reasons:
1. When you get a result set containing directions it will include the lat/longs for the starting and ending points of a particular street segment. The problem here is that it doesn't not include lat/longs or pixel coords along that segment. So, if you have a long street segment there's really no way to know the pixels or lat/longs to pass in. The problem would show itself when that street is long and has a curve. Because you only have the start and end points you would have to figure the lat/longs (if you were getting a new image from MapPoint constantly as you moved along the segment) or pixels (if you were drawing on the client side) your self and there would be know way for you to know that the street curved. This would cause your simulated vehicle to cut across this curve and depending on the street could look pretty ugly.
Note: Drawing the vehicle each time it moves using the web service is not a good idea because first, it a billable transaction for every getmap call and it also would be slow if you want make the vehicle movement look smooth. You would almost be forced to draw the movement on the client side.
2. How are you determining/finding the 'lighted intersection'?
The only part that is easy to determining the distance between the simulated vehicle and the intersection (if you can find a good way to determine these coords to start with). The SDK includes the code for calculating Great Circle Distance.
Steven Pushee
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2003 Microsoft Corporation. All rights
reserved. |