[pmapper-users] zoom to point and buffer problem
Brought to you by:
arminburger
From: Alessandro P. <al...@ti...> - 2006-11-22 12:10:36
|
Hi, this is a problem in ver. 2 and 3 with point layers: when I open the map with &zoomLayer=my_point_layer&zoomQuery=gid@1@241@1@0 The server issue a Fatal error: <i>[MapServer Error]: setExtent(): Given map extent is invalid. Check that it is in the form: minx, miny, maxx, maxy That's because the extent is set to the point itself (that obviously has no dimension). I thought that the pointBuffer was applied here too, but it isn't. Are there any workaround or maybe a patch in initmap.php applying pointBuffer to the extent is a better solution in this case? // Apply buffer (in units of features) //$buffer = 20000; // <<<<<<<<<<<<<<<<<<<<<< ADAPT VALUE <<<<<<<<<<<<<<<<< // ABP: set buffer for points if ($this->qLayerType == 0) { $buffer = $_SESSION["pointBuffer"]; } else { $buffer = 0.05 * ((($mExtMaxx - $mExtMinx) + ($mExtMaxy - $mExtMiny)) / 2); } -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502 |