[mapserver-users] Initially centering the map

Stephen Woodbridge woodbri at swoodbridge.com
Wed May 8 09:08:47 EDT 2002


James,

You have to set the extents to be a box about the that point. So if you
want to zoom to some x,y and you want you zoom window to be dx wide and
dy high, then you would set your xmin, ymin, xmax, ymax to x-dx/2,
y-dy/2, x+dx/2, y+dy/2

-Steve

James Jefferson wrote:
> 
> Hello everyone,
> 
> How can I have mapserver center the image around a point? My users can add
> points to the map by passing in a new layer. As the manual describes:
> 
> "Here's a snippet from a GET request that addsa feature to a webuser layer:
> ...&map_webuser_feature=new&map_webuser_feature_points=12345.6789+12345.6789
>          +map_webuser_feature_text=My+House!&..."
> 
> I need the map to pan and zoom into and around that point automatically. I'm
> guessing this is really easy to do, but I haven't figured it out quite yet.
> 
> Thanks in advance,
> 
> -James Jefferson
> 
> PS - Thanks for the help last week regarding tiling maps. That was exactly
> what I needed. I now have street level mapping for the US based around the
> census tiger files ... all 10+ gigabytes worth.



More information about the mapserver-users mailing list