[Mapserver-users] navigation arrows around the map
Thorsten Fischer
thfischer at mapmedia.de
Mon Mar 24 05:52:33 PST 2003
On Mon, 2003-03-24 at 09:23, Michael Schulz wrote:
> you can use static urls as links for your navigation arrow images as the
> most simple way of implementing a fixed panning mechanism. I would
> prefer some javascript that is executed when the nav arrow is clicked,
> since it is more flexible,
Lots of people I know have javascript turned off, mostly because it
continues to pose a security risk, but also because it is usually used
to implement annoying 'features' such as popup windows, so this is a
solution that would only work for a subset of potential users.
Something I came up with was the following. You construct an url
including [imgext] (or was it [mapext]? I keep mixing them up) etc for
each of the arrows. In addition, you can hardcode img.x and img.y in
each of them, according to their position around the map. If you have 8
arrows around your map, you can tile the image into 3x3 squares in your
mind and the center image coordinate of each of these tiles is the
imaginary click-point you use for the url. I've done that, works
smoothly.
Downside is that you are in trouble if the user changes the layer
selection (you just cannot track changes in plain html), and you are
lost if you have the feature of changing the image size, using a
drop-down box for example. Again, you cannot track the user's changes in
the map layout.
hth,
thorsten
PS: It's unbelievably sunny in Berlin today, I hope all of you enjoy
their working day as much as I do ;)
More information about the MapServer-users
mailing list