UNPKG

@here/harp-examples

Version:
1 lines 2.81 kB
(()=>{"use strict";var e={8353:(e,t,n)=>{t.q=void 0;const o=n(8957),r=n(5636),s=n(3074),i=n(2998),a=n(3860),l=n(4565);!function(e){const t=function(e){const t=document.getElementById("mapCanvas"),n=new s.MapView({canvas:t});s.CopyrightElementHandler.install("copyrightNotice",n);const i=new r.MapControls(n);i.maxTiltAngle=60;const a=new o.GeoCoordinates(40.707,-74.01);n.lookAt({target:a,zoomLevel:16.1,tilt:60}),n.zoomLevel=16.1;const l=new r.MapControlsUI(i);return t.parentElement.appendChild(l.domElement),n.resize(window.innerWidth,window.innerHeight),window.addEventListener("resize",(()=>{n.resize(window.innerWidth,window.innerHeight)})),n}(),n=new i.VectorTileDataSource({baseUrl:"https://vector.hereapi.com/v2/vectortiles/base/mc",apiFormat:i.APIFormat.XYZOMV,styleSetName:"tilezen",authenticationCode:l.apikey,authenticationMethod:{method:i.AuthenticationMethod.QueryString,name:"apikey"},copyrightInfo:l.copyrightInfo});t.addDataSource(n);const c=new a.GUI({width:300}),u={theme:{streets:"resources/berlin_tilezen_effects_streets.json",outlines:"resources/berlin_tilezen_effects_outlines.json"},postEffects:{"resources/berlin_tilezen_effects_streets.json":"resources/effects_streets.json","resources/berlin_tilezen_effects_outlines.json":"resources/effects_outlines.json"}};c.add(u,"theme",u.theme).onChange((async e=>{await t.setTheme(e),t.loadPostEffects(u.postEffects[e])})).setValue(u.theme.streets)}(t.q||(t.q={}))},4428:e=>{e.exports=THREE}},t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.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 o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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=172,(()=>{var e={172:0,738:0},t=[[8353,592]],o=e=>{},r=(r,s)=>{for(var i,a,[l,c,u,h]=s,f=0,p=[];f<l.length;f++)a=l[f],n.o(e,a)&&e[a]&&p.push(e[a][0]),e[a]=0;for(i in c)n.o(c,i)&&(n.m[i]=c[i]);for(u&&u(n),r&&r(s);p.length;)p.shift()();return h&&t.push.apply(t,h),o()},s=self.webpackChunk_here_harp_examples=self.webpackChunk_here_harp_examples||[];function i(){for(var o,r=0;r<t.length;r++){for(var s=t[r],i=!0,a=1;a<s.length;a++){var l=s[a];0!==e[l]&&(i=!1)}i&&(t.splice(r--,1),o=n(n.s=s[0]))}return 0===t.length&&(n.x(),n.x=e=>{}),o}s.forEach(r.bind(null,0)),s.push=r.bind(null,s.push.bind(s));var a=n.x;n.x=()=>(n.x=a||(e=>{}),(o=i)())})(),n.x()})();