<div id="RTEContent">Hallo Stefan, <br> <br> ich habe selber eine Mapscript-Anwendung und bei mir funktioniert das zoomen ganz gut. <br> Hab deinen Code mal überflogen und er weicht an manchen Stellen schon von meinem ab.<br> Ich schick dir mal einfach meinen Quellcode-Ausschnitt übers zoomen mit, dann kannst du mal vergleichen.....<br> <br> <?php<br> <br> dl('php_mapscript.so');<br> <br> // Karte definieren: Pfad und Mapfile<br> $check_zin="CHECKED";<br> $map_path="/data/web/bgd/";<br> $map_file="webgis.map";<br> <br> <br> <br> <br> <br> $map = ms_newMapObj($map_path.$map_file);<br> <br> //Werkzeuge: Zoomen, Verschieben<br> <br> if ( isset($_POST["map_x"]) && isset($_POST["map_y"])<br> && !isset($_POST["full"]) ) <br> <br> { //Hauptanweisung!!!<br> <br> $extent_to_set = explode(" ",$_POST["extent"]);<br> <br>
$map->setextent($extent_to_set[0],$extent_to_set[1],<br> $extent_to_set[2],$extent_to_set[3]);<br> <br> $my_point = ms_newpointObj();<br> $my_point->setXY($_POST["map_x"],$_POST["map_y"]);<br> <br> $my_extent = ms_newrectObj();<br> <br> $my_extent->setextent($extent_to_set[0],$extent_to_set[1],<br> $extent_to_set[2],$extent_to_set[3]);<br> <br> <br> $Info="Benutzen Sie das Info-Werkzeug, um hier Informationen zu einzelnen Objekten abzurufen.";<br>
$Ausgabe=$Info;<br> if ($_POST["zoom"] == "pan") {<br> $zoom_factor = 1;<br> $check_pan = "CHECKED";<br> $check_zout = "";<br> $check_zin = "";<br> $check_abfrage ="";<br> $Ausgabe=$Info;<br> $check_koor = "";<br> $map->zoompoint($zoom_factor,$my_point,$map->width,$map->height,<br>
$my_extent); }<br> <br> else if ($_POST["zoom"] == "zout") {<br> $zoom_factor = -2;<br> $check_pan = "";<br> $check_zout = "CHECKED";<br> $check_zin = "";<br> $check_abfrage ="";<br> $Ausgabe=$Info;<br> $check_koor = "";<br>
$map->zoompoint($zoom_factor,$my_point,$map->width,$map->height,<br> $my_extent); } <br> <br> else if ($_POST["zoom"] == "zin") {<br> $zoom_factor = 2;<br> $check_pan = "";<br> $check_zout = "";<br> $check_zin = "CHECKED";<br> $check_abfrage ="";<br> $Ausgabe=$Info;<br>
$check_koor = "";<br> $map->zoompoint($zoom_factor,$my_point,$map->width,$map->height,<br> $my_extent); }<br> <br> } //Ende Entscheidung zoom/pan/abfrage<br> <br> } //Ende map_x, map_y / Klick in Karte hat stattgefunden<br> <br> $image=$map->draw();<br> $image_url=$image->saveWebimage(MS_PNG,1,1,0);<br> <br> $extent_to_html = $map->extent->minx." ".$map->extent->miny." "<br> .$map->extent->maxx." ".$map->extent->maxy;<br> <br> .phtml:<br> <br> #!/usr/local/bin/php<br> <!-- Hier wird die PHP-Datei in die Seite eingebunden--><br> <br> <?<br> include ("webgis.php")<br>
?><br> <br> <div id="werkzeuge"><br> <table valign="center" border="0"><br> <tr><br> <td><img src="../bgd/img/da_pan.gif" alt="verschieben" title="verschieben"><br> <input type=radio name="zoom" value="pan" <?php echo $check_pan?>><br> <img src="../bgd/img/spacer.gif" width="31" height="1" border=0></td><br> <td><img src="../bgd/img/da_zoomin.gif" alt="reinzoomenvergr&ouml;&szlig;
ern"
title="vergr&ouml;&szlig;ern"><br> <input type=radio name="zoom" value="zin" <?php echo $check_zin?>><br> <img src="../bgd/img/spacer.gif" width="31" height="1" border=0></td><br> <td><img src="../bgd/img/da_zoomout.gif" alt="verkleinern" title="verkleinern"><br> <input type=radio name="zoom" value="zout" <?php echo $check_zout?>><br> <img src="../bgd/img/spacer.gif" width="31" height="1" border=0></td><br>
<td><img src="../bgd/img/da_info.gif" alt="Information" title="Information"><br> <input type=radio name="zoom" value="abfrage"<?php echo $check_abfrage?>><br> <img src="../bgd/img/spacer.gif" width="31" height="1" border=0></td><br> <td> <input type=image name="full" src="../bgd/img/welt.gif" size=2 alt="Gesamtansicht" title="Gesamtansicht"><br> <img src="../bgd/img/spacer.gif" width="31" height="1" border=0></td><br>
<td width="20" height="20"><a href="#" onclick="MM_showHideLayers('hilfe','','show')"><br> <img src="../bgd/img/help.gif" width="20" height="23" border="0" alt="Hilfe anzeigen" title="Hilfe anzeigen" ></a><br> <img src="../bgd/img/spacer.gif" width="31" height="3" border=0></td><br> <br> </tr><br> <br> </table><br> </div><br> <br> <br> <br> <!-- ende div werkzeuge --><br> <br> Mapfile:<br> <br> #<br> # Start of map file - created Mi D
ez 01
18:48:23 2004<br> #<br> NAME 'webgis'<br> STATUS ON<br> SIZE 450 320<br> EXTENT 4557609.475 5257792.457 4582049.275 5280266.410<br> SHAPEPATH "data"<br> UNITS meters<br> SYMBOLSET 'img/symbset'<br> FONTSET 'fonts/fonts.fnt'<br> IMAGECOLOR 255 255 255<br> <br> #<br> # Start of web interface definition<br> #<br> WEB<br> TEMPLATE ../bgd/webgis.html<br> IMAGEPATH '/data/web/tmp/'<br> IMAGEURL 'http://maps.la.fh-weihenstephan.de:8080/tmp/'<br> LOG /data/web/bgd/webgis.log<br> METADATA<br> WMS_ONLINERESOURCE 'http://maps.la.fh-weihenstephan.de:8080/cgi/mapserv401max?map=/data/web/bgd/webgis.map'<br> WMS_SRS 'epsg:31468'<br> WMS_ACCESSCONSTRAINTS 'none'<br> WMS_TITLE 'webgis'<br> WMS_FEATURE_INFO_MIME_TYPE 'text/html'<br> WMS_ABSTRACT 'daSFS GHDS JHDF FSSWQW'<br> END #METADATA<br> <br> END #HEADER<br> <br> #<br> # Properties for the querymap<br> #<br> QUERYMAP
<br>
SIZE 200 200<br> STATUS ON #OFF<br> STYLE HILITE<br> COLOR 255 0 0<br> END<br> <br> PROJECTION<br> 'init=epsg:31468'<br> END<br> <br> OUTPUTFORMAT<br> NAME png<br> DRIVER "GD/PNG"<br> MIMETYPE "image/png"<br> IMAGEMODE RGB<br> EXTENSION "png"<br> <br> END<br> <br> #<br> # Start of reference map<br> #<br> REFERENCE<br> STATUS ON<br> IMAGE img/webgis.png<br> SIZE 125 89<br> EXTENT 4557609.475 5257792.457 4582049.275 5280266.410<br> COLOR -1 -1 -1<br> OUTLINECOLOR 255 0 0<br> MINBOXSIZE 10<br> MAXBOXSIZE 100<br> END #REFERENCE<br> <br> #<br> # Start of legend<br> #<br> LE
GEND<br>
STATUS ON<br> KEYSIZE 16 8<br> LABEL<br> COLOR 120 120 120<br> END # ENDE LABEL<br> END #LEGEND<br> <br> #<br> # Start of scalebar<br> #<br> SCALEBAR<br> STATUS OFF<br> POSITION ll<br> STYLE 0<br> INTERVALS 4<br> IMAGECOLOR 255 255 255<br> LABEL<br> COLOR 0 0 0<br> SIZE SMALL<br> END #ENDE LABEL<br> SIZE 300 3<br> TRANSPARENT ON<br> COLOR 255 170 0<br> BACKGROUNDCOLOR 255 255 190<br> OUTLINECOLOR 100 100 100<br> UNITS KILOMETERS<br> END #SCALEBAR<br> <br> #<br> # Start of layer definitions<br> #<br> <br> <br> etc....<br> </div><p>
                <hr size=1>Telefonieren Sie ohne weitere Kosten mit Ihren Freunden von PC zu PC!<br>Jetzt <a href=http://de.messenger.yahoo.com>Yahoo! Messenger</a> installieren!