From cb529313523c57916f1590a410c7f8e49c7a0341 Mon Sep 17 00:00:00 2001 From: Dany Ralantonisainana Date: Thu, 9 Feb 2017 10:30:30 +0100 Subject: [PATCH] feat(new layer): add support for new layers - add uni-heidelberg.de openstreetmap - add otile1.mqcdn.com - add stamen.com - add opentopomap.org --- staticmap.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/staticmap.php b/staticmap.php index ac7b6db..82661fa 100644 --- a/staticmap.php +++ b/staticmap.php @@ -35,9 +35,26 @@ class staticMapLite protected $maxHeight = 1024; protected $tileSize = 256; - protected $tileSrcUrl = array('mapnik' => 'http://tile.openstreetmap.org/{Z}/{X}/{Y}.png', - 'osmarenderer' => 'http://otile1.mqcdn.com/tiles/1.0.0/osm/{Z}/{X}/{Y}.png', - 'cycle' => 'http://a.tile.opencyclemap.org/cycle/{Z}/{X}/{Y}.png', + + protected $tileSrcUrl = array( + 'mapnik' => 'http://tile.openstreetmap.org/{Z}/{X}/{Y}.png', + 'osm' => 'http://tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', + 'osmarenderer' => 'http://otile1.mqcdn.com/tiles/1.0.0/osm/{Z}/{X}/{Y}.png', + 'cycle' => 'http://a.tile.opencyclemap.org/cycle/{Z}/{X}/{Y}.png', + 'stamen-toner' => 'http://a.tile.stamen.com/toner-hybrid/{Z}/{X}/{Y}.png', + 'top' => 'http://opentopomap.org/{Z}/{X}/{Y}.png', + // OSM Roads layer + 'heidelberg-roads' => 'http://korona.geog.uni-heidelberg.de/tiles/roads/x={X}&y={Y}&z={Z}', + // OSM Semitransparent layer + 'heidelberg-hybrid' => 'http://korona.geog.uni-heidelberg.de/tiles/hybrid/x={X}&y={Y}&z={Z}', + // ASTER GDEM & SRTM Hillshade layer + 'heidelberg-asterh' => 'http://korona.geog.uni-heidelberg.de/tiles/asterh/x={X}&y={Y}&z={Z}', + // ASTER GDEM contour lines layer + 'heidelberg-asterc' => 'http://korona.geog.uni-heidelberg.de/tiles/asterc/x={X}&y={Y}&z={Z}', + // OSM Administrative Boundaries layer + 'heidelberg-adminb' => 'http://korona.geog.uni-heidelberg.de/tiles/adminb/x={X}&y={Y}&z={Z}', + // OSM Roads Grayscale Layer + 'heidelberg-roadsg' => 'http://korona.geog.uni-heidelberg.de/tiles/roadsg/x={X}&y={Y}&z={Z}', ); protected $tileDefaultSrc = 'mapnik';