[maplab-users] FW: May be a BUG ????

Swapan Mazumdar swapan at dataworld.co.za
Mon Jun 14 13:02:28 EDT 2004


Hi,
I am also experiencing a similar problem to keep a consistent state.
I am implementing zoomto feature using html controls. It works fine. But the moment I use zoomin/out etc, its starts from the previous extent which there before the zoomto action was triggered.
Look at the code from wrapper/drawmap.php. I think I am not able to figure out how to set the map extent globally. How could I be able to do this?
if ($http_form_vars["run_query"] == 1 ){
    runQuery( $oMapSession, $szQueryCoords, $szQueryLayers, $szURI );    
    $oImage = $oMapSession->oMap->drawQuery();
}elseif ($http_form_vars["sindex"]){
	$layerObj = $oMap->getLayer(1);
	$layerObj->open();
	$st = $layerObj->queryByAttributes("VA_SG_CODE", $http_form_vars["sitem"], MS_SINGLE);	
	$layerObj->close();$layerObj->open();
	$shpObject = ms_newShapeObj(MS_SHAPE_POLYGON);
	$shpObject = $layerObj->getShape(-1, intval($http_form_vars["sindex"]));	
	$rect = $shpObject->bounds;
	$oMapSession->oMap->setExtent($rect->minx, $rect->miny, $rect->maxx, $rect->maxy);
		$oImage = $oMapSession->oMap->drawQuery();
		//$oImage = $oMapSession->oMap->draw();
	}
	$layerObj->close();

Dear all,
 
Why is ROSA behaviour change when I insert a quick zoom tool to my application:
 
<SELECT name="comuni" onChange="CommuneSelected()">
   <option align="center">Zoom to Commune</option>
   <option>- - - - - - - - - - - </option>
   <option value="AGAZZANO">Agazzano</option>
   <option value="ALSENO">Alseno</option>
   <option value="ZIANO P.NO">Ziano P.no </option>
   </SELECT>
 
in my proj_contents.php?
 
What happens is the following: without this (select/select) it works fine, I can zoom in and zoom out as I wish 'correctly'. After inserting this quick zoom tool (i also added the necessary codes in my proj.phtml, and proj.php), the zoom gets crazy, zooming relative to the key map incorrectly. I spent days in figuring out this, but now I don-t undertstand why? I am very sure that the problem is no other. Any help is appreciated.
 
Regards,
 
Fikru Yifter
 
ps. the codes added for quick zoom can be found in one of my previous mails. 
 




More information about the Maplab-users mailing list