Not wanted zooming out

Artur Skalski artur.skalski at ACXIOM.COM
Mon Nov 28 05:19:56 EST 2005


Hi List

I'm using mapserver 44, with php mapscript, and I've got some problem
zooming.
In my application I've added an option to add point dynamicaly, the code
looks like this:

else if ($HTTP_FORM_VARS["CMD"] == "ADD_POINT")
     {

  $nClickGeoX = GMapPix2Geo($nClickPixX, 0, $dfWidthPix,
           $dfMinX, $dfMaxX, 0);
  $nClickGeoY = GMapPix2Geo($nClickPixY, 0, $dfHeightPix,
           $dfMinY, $dfMaxY, 1);
$spoint = ms_newPointObj();
      $spoint->setXY($nClickGeoX, $nClickGeoY);

  $slayer = $gpoMap->getLayerByName(selpoint);

  $sline = ms_newLineObj();
      $sline->add($spoint);

  $sshape = ms_newShapeObj(MS_SHAPE_POINT);
      $sshape->add($sline);

  $slayer->addFeature($sshape);

adding works wery well but I've got some unexpected behaviour which is that
after adding a point maps zooms out itself to the max extent, why?

the part of mapfile for this layer looks like this:

LAYER
    NAME selpoint
    TYPE POINT
    STATUS ON
   CLASS
       NAME "0"
       STYLE
         COLOR 0 0 180
          SYMBOL 'C:\Inetpub\wwwroot\mapserver\sopot\etc\tutaj.gif'
       END
   END
END

Do you have any idea why is this happening, and how can i avoide it?

regards

Artur



More information about the mapserver-users mailing list