[mapserver-users] MapScript and ZoomRectangle (and rectObj problems)
Jelmer Baas
Baas at speerit.nl
Sun May 3 04:20:54 PDT 2009
Jim, List,
Thanks for the reply. I'm afraid that eventually I'll be working with
more than one coord system, so I don't believe your solution can work
for me.
I've been continueing my testing, and it seems like all MapScript zoomto
functions either work unlike I expect them, or are completely broken. I
tried to following:
In the immediate pane in VB .Net:
? map.setCenter(new pointObj(143000,485437,0,0))
0
? map.extent
{OSGeo.MapServer.rectObj}
maxx: 143397.59497452341
maxy: 485654.62790724094
minx: 142602.40502547659
miny: 485219.37209275906
This seems to work properly. Now the following:
? map.zoomScale(1000, new pointObj(143000,485437,0,0),mapwidth,
mapheight,map.extent, nothing)
0
? map.extent
{OSGeo.MapServer.rectObj}
maxx: 225008.64025899942
maxy: 207042.5828362515
minx: 224520.10434931691
miny: 206775.17742509485
When I change map.extent to fullExtent (which is set after loading, in
this case the extents of the Netherlands)
? map.zoomScale(1000, new pointObj(143000,485437,0,2),mapwidth,
mapheight,FullExtent, nothing)
0
? map.extent
{OSGeo.MapServer.rectObj}
maxx: 85315130.06053336
maxy: -353386875.22545278
minx: 85314641.524623737
miny: -353387142.6308639
These numbers are completely unexpected. Even though I'm not sure about
the zoomscale of 1000, the extent returned doesn't make any sense.
MapWidth = 1384. mapHeight = 758
This is really a huge problem for us at the moment. I hope someone can
shed some light on this.
Thanks in advance,
Jelmer Baas
More information about the MapServer-users
mailing list