Il 08:47, venerdì 16 marzo 2007, Alessandro Pasotti ha scritto:
>
> I patched pmap_zoompoint() in map.php and now it works as expected:
>
> After:
> http://svn.pmapper.net/trac/browser/pmapper/trunk/incphp/map.php#L519
>
>         // ABP: check scale
>         $minscale = $this->map->web->minscale;
>         //error_log($minscale);
>         $new_scale =  ($this->zoom_factor > 0) ? $this->old_geo_scale /
> $this->zoom_factor : $this->old_geo_scale * ( - $this->zoom_factor);
>         if($new_scale < $minscale){
>             return $this->map->zoomscale($minscale + 0.1, $xy_pix,
> $this->mapwidth, $this->mapheight, $this->geoext0, $this->maxextent);
>         }
>
>

An additional check ($this->zoom_factor != 1) should be added to ensure we are 
really trying to zoom:


        // ABP: check scale
        $minscale = $this->map->web->minscale;
        $new_scale =  ($this->zoom_factor > 0) ? $this->old_geo_scale / 
$this->zoom_factor : $this->old_geo_scale * ( - $this->zoom_factor);
        if($this->zoom_factor != 1 && $this->old_geo_scale && $new_scale < 
$minscale){
            return $this->map->zoomscale($minscale + 0.1, $xy_pix, 
$this->mapwidth, $this->mapheight, $this->geoext0, $this->maxextent);
        }


-- 
Alessandro Pasotti
itOpen - "Open Solutions for the Net Age"
w3:  www.itopen.it
Linux User# 167502

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to