[ka-Map-users] Drawing lines dynamically on top of kaMap

Stephen Woodbridge woodbri at swoodbridge.com
Fri Sep 15 15:19:51 EDT 2006


ramesh karra wrote:
> Hi,
> 
> Currently, I can successfully display a map generated
> from a map file using mapserver and kaMap. 
> 
> I would like to know what is the best way to draw a
> dynamic line(or route) as a layer on top of this map
> given that the data I have is a sequence of points
> represented by lattitude and longitude (and not in
> some shape file or postgres db)

Ramesh,

There has been a lot of discussion on this, you might want to search the 
archives. To summarize, there is no good way to do this on the client 
yet. You can do it for a few line segments, but performance rapidly 
degrades to unacceptable as you start pushing over about 50 points.

I think what a lot of people, well those that have actually implemented 
something are doing it server side. The scenario is as follows:

1) put your points into a session storage
2) modify the client to request a route image on viewport extents change
3) have a php, or cgi script read the session data and the viewport 
extents and scale and generate an image that is returned to the client
4) have the client pin the image to the viewport.

This is basically the way that google is doing it. You can get a little 
bit smarter on the client to not make requests when the view port 
extents change if you don't need to redraw the image.

-Steve W.


More information about the ka-Map-users mailing list