-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8374d0d
commit 5638ad3
Showing
2 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
<meta name="author" content="PTV Group"> | ||
<meta content="yes" name="apple-mobile-web-app-capable"> | ||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"> | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" /> | ||
<style> | ||
body { | ||
padding: 0; | ||
|
@@ -24,9 +24,9 @@ | |
|
||
<body> | ||
<div id="map" /> | ||
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<!-- <script src="https://unpkg.com/[email protected].7/dist/NonTiledLayer.js"></script> --> | ||
<script src="./dist/NonTiledLayer-src.js"></script> | ||
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"></script> | ||
<script src="https://unpkg.com/[email protected].8/dist/NonTiledLayer.js"></script> | ||
<!-- <script src="./dist/NonTiledLayer-src.js"></script> --> | ||
<script src="./token.js"></script> | ||
<script> | ||
if(!window.token) { | ||
|
@@ -51,7 +51,7 @@ | |
map.setView(L.latLng(49.01, 8.4), 16.5); | ||
|
||
// using the xserver-internet WMS adapter | ||
var xMapWmsUrl = 'https://xmap-eu-n-test.cloud.ptvgroup.com/WMS/WMS?xtok=' + token; | ||
var xMapWmsUrl = 'https://api-test.cloud.ptvgroup.com/WMS/WMS?xtok=' + token; | ||
var xMapAttribution = '<a href="http://www.ptvgroup.com">PTV<\/a>, TOMTOM'; | ||
|
||
// add (tiled) background layer | ||
|
@@ -92,7 +92,7 @@ | |
attribution: xMapAttribution | ||
}).addTo(map); | ||
|
||
// add bus stops. Default - insert at overlayPane | ||
// add contours, on tile pane | ||
var contour = L.nonTiledLayer.wms('https://ows.terrestris.de/osm/service', { | ||
maxZoom: 19, | ||
minZoom: 4, | ||
|
@@ -102,6 +102,7 @@ | |
format: 'image/png', | ||
transparent: true, | ||
attribution: 'terrestris', | ||
pane: 'tilePane', | ||
bounds: L.latLngBounds([-56.0, -180], [60.0, 180]) | ||
}).addTo(map); | ||
|
||
|
@@ -118,7 +119,7 @@ | |
format: 'image/png', | ||
zIndex: 3, | ||
bounds: L.latLngBounds([-77.0,-77.0], [77.0,77.0]), | ||
detectRetina: true | ||
detectRetina: true // double the requested image size | ||
}).addTo(map); | ||
|
||
// add layer selector | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
<body> | ||
<div id="map" /> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | ||
<script src="https://unpkg.com/[email protected].7/dist/NonTiledLayer.js"></script> | ||
<script src="https://unpkg.com/[email protected].8/dist/NonTiledLayer.js"></script> | ||
<!-- <script src="./dist/NonTiledLayer.js"></script> --> | ||
<script src="./token.js"></script> | ||
<script> | ||
|
@@ -89,17 +89,19 @@ | |
attribution: xMapAttribution | ||
}).addTo(map); | ||
|
||
// add bus stops. Default - insert at overlayPane | ||
var busStops = L.nonTiledLayer.wms('http://ows.terrestris.de/osm-haltestellen', { | ||
// add contours, on tile pane | ||
var contour = L.nonTiledLayer.wms('https://ows.terrestris.de/osm/service', { | ||
maxZoom: 19, | ||
minZoom: 14, | ||
minZoom: 4, | ||
zIndex: 2, // setting a zIndex enforces the layer ordering after adding/removing multiple layers | ||
opacity: 1.0, | ||
layers: 'OSM-Bushaltestellen', | ||
layers: 'SRTM30-Contour', | ||
format: 'image/png', | ||
transparent: true, | ||
attribution: 'terrestris' | ||
}).addTo(map); // doesn't seem to work anymore - find another one | ||
attribution: 'terrestris', | ||
pane: map.getPanes().tilePane, | ||
bounds: L.latLngBounds([-56.0, -180], [60.0, 180]) | ||
}).addTo(map); | ||
|
||
// insert airmass layer, at tile pane between background and labels | ||
var airmass = L.nonTiledLayer.wms("http://eumetview.eumetsat.int/geoserv/wms", { | ||
|
@@ -112,8 +114,9 @@ | |
opacity: 0.75, | ||
pane: map.getPanes().tilePane, | ||
format: 'image/png', | ||
zIndex: 2, | ||
bounds: L.latLngBounds([-77.0,77.0], [77.0,-77.0]) | ||
zIndex: 3, | ||
bounds: L.latLngBounds([-77.0,77.0], [77.0,-77.0]), | ||
detectRetina: true // double the requested image size | ||
}).addTo(map); | ||
|
||
// add layer selector | ||
|