UNPKG

crepuscule

Version:

Sunlight raster tile layer, with twilight, dynamically generated for MapLibre GL and MapTiler SDK.

40 lines (33 loc) 1.07 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Crepuscule</title> <script src="https://cdn.maptiler.com/maptiler-sdk-js/v1.1.1/maptiler-sdk.umd.min.js"></script> <link href="https://cdn.maptiler.com/maptiler-sdk-js/v1.1.1/maptiler-sdk.css" rel="stylesheet" /> <style> body { margin: 0; padding: 0; font-family: sans-serif; } #map { position: absolute; top: 0; bottom: 0; width: 100%; } #theimg { z-index: 3; position: absolute; } </style> </head> <body> <div id="map"></div> <script src="../build/crepuscule.umd.js"></script> <script> maptilersdk.config.apiKey = 'bod4IIn9bwK8mnZIk49v'; const map = new maptilersdk.Map({ container: 'map', // container's id or the HTML element to render the map style: maptilersdk.MapStyle.BACKDROP, hash: true, maxPitch: 85, terrainControl: true, }); const crepusculeLive = new crepuscule.CrepusculeLive(map, {debug: false}); </script> </body> </html>