[ka-Map-users] Looking for a very simple panning code (js)

Christopher Schmidt crschmidt at crschmidt.net
Fri Sep 21 11:52:24 EDT 2007


On Fri, Sep 21, 2007 at 05:44:53PM +0200, Andreas Delleske wrote:
> Dear mapserver-users,
> 
> I have admired the ka-map functionality but come to the conclusion
> that I'll need only a very simple JavaScript code for my mapserver - I
> do not have MapScript.
> 
> Could someone please help me with some lines of code who do only the following:
> 
> - Mouseclick on the map defines the beginning of a panning operation.
> - While the mouse button is pressed, the underlying image (e.g. the
> "old" mapimage) is moved with the cursor, maybe cropped to the window
> limits of the "old" mapimage
> - When letting go the mousebutton,
> - the old image should remain at the "new" location (until a new page
> is rendered)
> - From both coordinates, a panning location (x,y) is calculated and we
> run a new GET operation in order to get a new map image.
> 
> It should just work like a very simple version of Google Maps. I can
> draw a zoom slider outside the image window, but I need the code for
> panning.
> 

Sounds kind of like you want a small build profile of OpenLayers. You
might look into going that route. It's designed to allow you to build an
app which does exactly that, and talks to any WMS server you want.

Regards,
-- 
Christopher Schmidt
Web Developer


More information about the ka-Map-users mailing list