Skip to content

Instantly share code, notes, and snippets.

@hpfast
Last active February 6, 2018 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hpfast/e6d45a7d13102c92ac12c819cf291501 to your computer and use it in GitHub Desktop.
Save hpfast/e6d45a7d13102c92ac12c819cf291501 to your computer and use it in GitHub Desktop.
simple mapbox-gl viewer
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>VISdata - PDOK</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="img/pdok_favicon.ico">
<link rel="stylesheet" href="css/mapbox-gl.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div id="map"></div>
<script>
// MAP OPTIONS
var options = {
container: "map",
hash: true,
style: 'https://geodata.nationaalgeoregister.nl/beta/topotiles-viewer/styles/achtergrond.json',
zoom: 8,
pitch: 0,
bearing: 0,
center: [5.19,52.33],
attributionControl: false
}
// INITIALIZE MAP
var map = new mapboxgl.Map(options);
map.addControl(new mapboxgl.AttributionControl(), "bottom-left");
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment