Display Moving objects on Map in ASP.net

whenry6000
10-25-2006, 09:51 AM
I am building an ASP.net web application using the Mappoint Web service 4.1 to display a map with a moving vehicle shown on the map. This requires the data for the vehicle to update every 3-6 seconds, but without refeshing the map itself (until the vehicle scrolls to a certain point). Can someone explain how they would go about doing this, or point me towards an example??

Thanks,
Wallace

Mark - MSFT
10-25-2006, 06:36 PM
Hey whenry6000

Consider using AJAX to handle the graphic on top of the map, that will handle your requirement for not refreshing the page. You can put a graphic (icon) in a div tag and just update the positional information based on your vehicle’s Lat/Long which can then be converted into an x,y (then plotted on the map image) coordinate using the convertToPoint() method. The bounding box your map is in has known coordinates, so you can set your map to pan when you are x pixels from the edge.

Hope that helps,

Mark - MSFT

kirkdybvik
01-17-2007, 01:47 PM
Is there any sample code that could be shared regarding this? Seems simple in concept but that it might get tricky to keep the two images in sync (zoom in/out, pan or possible differences in map projection when zoomed out and trying to draw a polygon).

I wonder how hard it would be to "intercept" the image from MapPoint and draw whatever you wanted on top of the background map? Are there any examples of this type of custom drawing available?

 
Web mp2kmag.com
mapforums.com