[Mapserver-users] Maximum Extent
Stefan Schwarzer
stefan.schwarzer at grid.unep.ch
Wed Jan 15 00:00:23 PST 2003
--=====================_176873700==.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
Hi everybody,
is there a possibility to specify the maximum extent within MS?
In my case I use layers covering the whole world. The default extent to be=
=20
displayed (the first map-image shown) is only Western Europe. If someone=20
zooms out from here I don't want the map to zoom out more then the extent=20
of Europe (west > -20=B0, east < 180=B0).
I tried to verify the coordinates after the "$map ->=20
zoompoint($zoom_factor, $my_point, $map -> width, $map -> height,=20
$my_extent);" (MapScript/PHP) event and to re-zoom if the coordinates=20
extend over the max/min values. But this seems to be not very elegant.=20
There should be a nicer solution. The EXTENT command in the map file only=20
gives the coordinates to start with, but not the max/min values, right?
Thanks for any hints,
Stefan
_______________________________________
Stefan Schwarzer
Consultant on GEO
UNEP/DEWA/GRID-Geneva
Chemin des Anemones 11
CH - 1219 Chatelaine
Switzerland
Tel: (+41) 22.917.83.49
Fax: (+41) 22.917.80.29
Email: stefan.schwarzer at grid.unep.ch
Internet: http://geodata.grid.unep.ch/
_______________________________________=20
--=====================_176873700==.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<body>
Hi everybody,<br><br>
is there a possibility to specify the maximum extent within MS?<br><br>
In my case I use layers covering the whole world. The default extent to
be displayed (the first map-image shown) is only Western Europe. If
someone zooms out from here I don't want the map to zoom out more then
the extent of Europe (west > -20=B0, east < 180=B0).<br><br>
I tried to verify the coordinates after the
<font color=3D"#FF0000">"$map -> zoompoint($zoom_factor, $my_point,
$map -> width, $map -> height, $my_extent);"</font>
(MapScript/PHP) event and to re-zoom if the coordinates extend over the
max/min values. But this seems to be not very elegant. There should be a
nicer solution. The EXTENT command in the map file only gives the
coordinates to start with, but not the max/min values, right?<br><br>
Thanks for any hints,<br><br>
Stefan<br><br>
<br>
<x-sigsep><p></x-sigsep>
<font=
size=3D3><x-tab> </x-tab>___=
____________________________________<br><br>
</font><font size=3D2><x-tab>  =
;</x-tab><b>Stefan
Schwarzer<br>
</b><x-tab> </x-tab>Consultan=
t
on GEO<br><br>
<x-tab> </x-tab>UNEP/DEWA/GRI=
D-Geneva<br>
<x-tab> </x-tab>Chemin des
Anemones 11<br>
<x-tab> </x-tab>CH - 1219
Chatelaine<br>
<x-tab> </x-tab>Switzerland<b=
r><br>
<x-tab> </x-tab>Tel: (+41)
22.917.83.49<br>
<x-tab> </x-tab>Fax: (+41)
22.917.80.29<br><br>
<x-tab> </x-tab>Email:
stefan.schwarzer at grid.unep.ch<br>
<x-tab> </x-tab>Internet:
<a href=3D"http://geodata.grid.unep.ch/"=
eudora=3D"autourl">http://geodata.grid.unep.ch/</a><br>
</font><font=
size=3D3><x-tab> </x-tab>___=
____________________________________</font></body>
</html>
--=====================_176873700==.ALT--
More information about the MapServer-users
mailing list