Ciao Luca,
I attached a function that should go eg. into common.php. Use then instead of
$this->mapURL = $mapImg->saveWebImage();
$this->scalebarURL = $scalebarImg->saveWebImage();
this
$this->mapURL = mapSaveWebImage($this->map, $mapImg);
$this->scalebarURL = mapSaveWebImage($this->map, $scalebarImg);
the same for the printing parts.
armin
>
> Hi Armin, Thanks for the code it fixes all. That's great!!
> At last I can use the ver 2 for production.
> I did few test but as soon I applied this patch the problem
> disappeared so why don't keep it in the pmapper code as default? there
> is some disadvantage on this approach for image name?
>
> Thanks for your code
>
> luca
>
> --
> luca marletta
--
Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer
-------------- next part --------------
function mapSaveWebImage($map, $mapImg)
{
$now = (string)microtime();
$now = explode(' ', $now);
$microsec = $now[1].str_replace('.', '', $now[0]);
unset($now);
$tmpImgBaseName = session_id() . $microsec . "." . $_SESSION["imgFormat"];
$tmpFileNameAbs = str_replace('\\', '/', $map->web->imagepath) .
$tmpImgBaseName ;
$imgURL = $map->web->imageurl . $tmpImgBaseName ;
$mapImg->saveImage($tmpFileNameAbs, $map);
return $imgURL;
}