max geometry (width + height)

git-svn-id: http://svn.code.sf.net/p/staticmaplite/code@4 3c7674d3-d6c2-4d0e-87b7-95661b9333b9
This commit is contained in:
rac98 2009-10-13 13:48:13 +00:00
parent a1298e267e
commit eda405aafe

View File

@ -30,6 +30,9 @@ ini_set('display_errors','off');
Class staticMapLite { Class staticMapLite {
protected $maxWidth = 1024;
protected $maxHeight = 1024;
protected $tileSize = 256; protected $tileSize = 256;
protected $tileSrcUrl = array( 'mapnik' => 'http://tile.openstreetmap.org/{Z}/{X}/{Y}.png', protected $tileSrcUrl = array( 'mapnik' => 'http://tile.openstreetmap.org/{Z}/{X}/{Y}.png',
'osmarenderer' => 'http://c.tah.openstreetmap.org/Tiles/tile/{Z}/{X}/{Y}.png', 'osmarenderer' => 'http://c.tah.openstreetmap.org/Tiles/tile/{Z}/{X}/{Y}.png',
@ -78,7 +81,9 @@ Class staticMapLite {
if($_GET['size']){ if($_GET['size']){
list($this->width, $this->height) = split('x',$_GET['size']); list($this->width, $this->height) = split('x',$_GET['size']);
$this->width = intval($this->width); $this->width = intval($this->width);
if($this->width > $this->maxWidth) $this->width = $this->maxWidth;
$this->height = intval($this->height); $this->height = intval($this->height);
if($this->height > $this->maxHeight) $this->height = $this->maxHeight;
} }
if($_GET['markers']){ if($_GET['markers']){
$markers = split('%7C|\|',$_GET['markers']); $markers = split('%7C|\|',$_GET['markers']);