Skip to content

Instantly share code, notes, and snippets.

@manutheblacker
Created June 15, 2021 10:36
Show Gist options
  • Save manutheblacker/716b644313eedb019c1f5ed7ecb1d940 to your computer and use it in GitHub Desktop.
Save manutheblacker/716b644313eedb019c1f5ed7ecb1d940 to your computer and use it in GitHub Desktop.
HERE & Leaflet // source https://jsbin.com/mocunul
<html>
<head>
<title>HERE & Leaflet</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<style>
body, html { border: 0; padding: 0; margin: 0; }
#map { width: 100vw; height: 100vh; }
</style>
</head>
<body>
<div id="map"></div>
<script>
/* Javascript from section below goes here */
</script>
<script id="jsbin-javascript">
const here = {
apiKey:'PCPrBgO4-arY5c2kQOMAg4ZuYkD4RFAcg-Y7H8VFoL4'
}
const style = 'reduced.day';
const hereTileUrl = `https://2.base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/${style}/{z}/{x}/{y}/512/png8?apiKey=${here.apiKey}&ppi=320`;
const map = L.map('map', {
center: [6.3793, 2.4130],
zoom: 11,
layers: [L.tileLayer(hereTileUrl)]
});
map.attributionControl.addAttribution('&copy; HERE 2019');
</script>
<script id="jsbin-source-html" type="text/html"><html>
<head>
<title>HERE & Leaflet</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"><\/script>
<style>
body, html { border: 0; padding: 0; margin: 0; }
#map { width: 100vw; height: 100vh; }
</style>
</head>
<body>
<div id="map"></div>
<script>
/* Javascript from section below goes here */
<\/script>
</body>
</html>
</script>
<script id="jsbin-source-javascript" type="text/javascript">const here = {
apiKey:'PCPrBgO4-arY5c2kQOMAg4ZuYkD4RFAcg-Y7H8VFoL4'
}
const style = 'reduced.day';
const hereTileUrl = `https://2.base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/${style}/{z}/{x}/{y}/512/png8?apiKey=${here.apiKey}&ppi=320`;
const map = L.map('map', {
center: [6.3793, 2.4130],
zoom: 11,
layers: [L.tileLayer(hereTileUrl)]
});
map.attributionControl.addAttribution('&copy; HERE 2019');
</script></body>
</html>
const here = {
apiKey:'PCPrBgO4-arY5c2kQOMAg4ZuYkD4RFAcg-Y7H8VFoL4'
}
const style = 'reduced.day';
const hereTileUrl = `https://2.base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/${style}/{z}/{x}/{y}/512/png8?apiKey=${here.apiKey}&ppi=320`;
const map = L.map('map', {
center: [6.3793, 2.4130],
zoom: 11,
layers: [L.tileLayer(hereTileUrl)]
});
map.attributionControl.addAttribution('&copy; HERE 2019');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment