Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

Commit

Permalink
feat(new layer): add support for new layers
Browse files Browse the repository at this point in the history
- add uni-heidelberg.de openstreetmap
- add otile1.mqcdn.com
- add stamen.com
- add opentopomap.org
  • Loading branch information
Dany Ralantonisainana committed Feb 9, 2017
1 parent 1672979 commit e2cb5fa
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions staticmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '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';
Expand Down

0 comments on commit e2cb5fa

Please sign in to comment.