Skip to content

Commit

Permalink
updated sample to 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverheilig committed Dec 20, 2019
1 parent 8374d0d commit 5638ad3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
15 changes: 8 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -102,6 +102,7 @@
format: 'image/png',
transparent: true,
attribution: 'terrestris',
pane: 'tilePane',
bounds: L.latLngBounds([-56.0, -180], [60.0, 180])
}).addTo(map);

Expand All @@ -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
Expand Down
21 changes: 12 additions & 9 deletions test.0.7.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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", {
Expand All @@ -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
Expand Down

0 comments on commit 5638ad3

Please sign in to comment.