center map on x,y coordinates
Jan Hartmann
j.l.h.hartmann at UVA.NL
Mon Oct 4 05:50:41 PDT 2004
Elisabeth Nolz wrote:
> dear jan,
>
> thanks for your help. you were right, there were some problems in my mapfile.
> now the map can be displayed with
> "http://localhost/cgi-bin/mapserv?map=map.map&mode=map". but unfortunately it
> can't be centered with "..&mode=map&mapxy=339989.20+1646.20&scale=20000".
>
> your hint to center the map by changing the extent sounds good, but i need to
> do it with this link, because the coordinates are a result of a
> database-query. the variables are passed through this link.
>
> perhaps someone knows how i could do this.
>
You can put the extent in the url:
http://...?map=map.map&mode=map&mapext=1400 336900 1600 337100
I find this easier, but if you want to to this with mapxy, you should
put x before y. Also, try out wat the actual scale is for the full map
(use the [scale] template, so you have a reference from which to compute
the zoom-scale
Jan
More information about the MapServer-users
mailing list