@here/harp-examples
Version:
harp.gl Examples
1 lines • 2.71 kB
JavaScript
(()=>{"use strict";var e={2985:(e,t,n)=>{t.x=void 0;const r=n(8957),o=n(5636),i=n(3074),s=n(2998),a=n(3860),l=n(4565);!function(e){const t=function(){const e=document.getElementById("mapCanvas"),t=new i.MapView({canvas:e,theme:"resources/berlin_tilezen_base.json"});i.CopyrightElementHandler.install("copyrightNotice",t);const n=new o.MapControls(t);n.maxTiltAngle=50;const s=new r.GeoCoordinates(55.7525631,37.6234006);t.lookAt({target:s,zoomLevel:16.1,tilt:50,heading:300}),t.zoomLevel=16.1;const a=new o.MapControlsUI(n,{zoomLevel:"input",projectionSwitch:!0});return e.parentElement.appendChild(a.domElement),t.resize(window.innerWidth,window.innerHeight),window.addEventListener("resize",(()=>{t.resize(window.innerWidth,window.innerHeight)})),t}(),n=new s.VectorTileDataSource({baseUrl:"https://vector.hereapi.com/v2/vectortiles/base/mc",authenticationCode:l.apikey});t.addDataSource(n);const c={theme:{day:"resources/berlin_tilezen_base.json",reducedDay:"resources/berlin_tilezen_day_reduced.json",reducedNight:"resources/berlin_tilezen_night_reduced.json",streets:"resources/berlin_tilezen_effects_streets.json",outlines:"resources/berlin_tilezen_effects_outlines.json"}};new a.GUI({width:300}).add(c,"theme",c.theme).onChange((async e=>{await t.setTheme(e)})).setValue("resources/berlin_tilezen_base.json")}(t.x||(t.x={}))},4428:e=>{e.exports=THREE}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.m=e,n.x=e=>{},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=126,(()=>{var e={126:0,738:0},t=[[2985,592]],r=e=>{},o=(o,i)=>{for(var s,a,[l,c,u,d]=i,h=0,p=[];h<l.length;h++)a=l[h],n.o(e,a)&&e[a]&&p.push(e[a][0]),e[a]=0;for(s in c)n.o(c,s)&&(n.m[s]=c[s]);for(u&&u(n),o&&o(i);p.length;)p.shift()();return d&&t.push.apply(t,d),r()},i=self.webpackChunk_here_harp_examples=self.webpackChunk_here_harp_examples||[];function s(){for(var r,o=0;o<t.length;o++){for(var i=t[o],s=!0,a=1;a<i.length;a++){var l=i[a];0!==e[l]&&(s=!1)}s&&(t.splice(o--,1),r=n(n.s=i[0]))}return 0===t.length&&(n.x(),n.x=e=>{}),r}i.forEach(o.bind(null,0)),i.push=o.bind(null,i.push.bind(i));var a=n.x;n.x=()=>(n.x=a||(e=>{}),(r=s)())})(),n.x()})();