[Mapserver-users] Maximum Extent

Stefan Schwarzer stefan.schwarzer@grid.unep.ch
Wed, 15 Jan 2003 09:00:23 +0100


--=====================_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@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 &gt; -20=B0, east &lt; 180=B0).<br><br>
I tried to verify the coordinates after the
<font color=3D"#FF0000">&quot;$map -&gt; zoompoint($zoom_factor, $my_point,
$map -&gt; width, $map -&gt; height, $my_extent);&quot;</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>___=
____________________________________<br><br>
</font><font size=3D2><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;</x-tab><b>Stefan
Schwarzer<br>
</b><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Consultan=
t
on GEO<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>UNEP/DEWA/GRI=
D-Geneva<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Chemin des
Anemones 11<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>CH - 1219
Chatelaine<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Switzerland<b=
r><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Tel: (+41)
22.917.83.49<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Fax: (+41)
22.917.80.29<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Email:
stefan.schwarzer@grid.unep.ch<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>___=
____________________________________</font></body>
</html>

--=====================_176873700==.ALT--


_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users