<!DOCTYPE html>
<html>
<head>
<title>basemap.de Web Vektor - MapLibre GL JS Demo</title>
<script src='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js'></script>
<link href='https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css' rel='stylesheet'/>
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map" class="map"></div>
<script>
var map = new maplibregl.Map({
container: 'map',
style: 'https://sgx.geodatenzentrum.de/gdz_basemapde_vektor/styles/bm_web_col.json',
center: [10, 51],
zoom: 6,
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>basemap.de Web Vektor - Mapbox GL JS Demo</title>
<script src="https://api.mapbox.com/mapbox-gl-js/v1.13.2/mapbox-gl.js"></script>
<link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/v2.3.0/mapbox-gl.css">
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map" class="map"></div>
<script>
// For Mapbox GL JS > Version 2 you need an access token to make the map appear
mapboxgl.accessToken = '<your access token here>';
var map = new mapboxgl.Map({
container: 'map',
style: 'https://sgx.geodatenzentrum.de/gdz_basemapde_vektor/styles/bm_web_col.json',
center: [10, 51],
zoom: 6,
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>basemap.de Web Vektor - Leaflet Demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css" />
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js"></script>
<script src="https://unpkg.com/leaflet@1.8.0/dist/leaflet.js"></script>
<script src="https://unpkg.com/@maplibre/maplibre-gl-leaflet@0.0.17/leaflet-maplibre-gl.js"></script>
<script>
var map = L.map('map', {
minZoom: 6,
maxZoom: 18,
});
var gl = L.maplibreGL({
style: 'https://sgx.geodatenzentrum.de/gdz_basemapde_vektor/styles/bm_web_col.json',
}).addTo(map);
map.setView([51, 10], 6);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>basemap.de Web Vektor - OpenLayers Demo</title>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.js"></script>
<link rel="stylesheet" href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.css">
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/build/ol.js"></script>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/css/ol.css" type=text/css>
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map" class="map"></div>
<script>
var center = [10, 51];
var mbMap = new mapboxgl.Map({
style: 'https://sgx.geodatenzentrum.de/gdz_basemapde_vektor/styles/bm_web_col.json',
center: center,
container: 'map',
});
var mbLayer = new ol.layer.Layer({
render: function (frameState) {
var canvas = mbMap.getCanvas();
var viewState = frameState.viewState;
mbMap.jumpTo({
center: ol.proj.toLonLat(viewState.center),
zoom: viewState.zoom - 1,
animate: false
});
return canvas;
}
});
var map = new ol.Map({
layers: [mbLayer],
target: 'map',
view: new ol.View({
center: ol.proj.fromLonLat(center),
zoom: 6
})
});
</script>
</body>
</html>