UNPKG

@here/harp-examples

Version:
1 lines 2.92 kB
(()=>{"use strict";var e={3406:(e,t,n)=>{t.p=void 0;const o=n(8957),r=n(5636),i=n(3074),a=n(2998),l=n(3838),s=n(4565);!function(e){let t;!function(e){e[e.Omv=0]="Omv",e[e.Satellite=1]="Satellite"}(t||(t={})),function(){const e=function(e){const t=document.getElementById("mapCanvas"),n=new i.MapView({canvas:t,projection:o.sphereProjection,theme:"resources/berlin_tilezen_base_globe.json"});return i.CopyrightElementHandler.install("copyrightNotice",n),n.resize(window.innerWidth,window.innerHeight),window.addEventListener("resize",(()=>{n.resize(window.innerWidth,window.innerHeight)})),n}();let n;n=(window.location.href.toLowerCase().includes("datasource=omv")?t.Omv:t.Satellite)===t.Omv?new a.VectorTileDataSource({baseUrl:"https://xyz.api.here.com/tiles/herebase.02",apiFormat:a.APIFormat.XYZOMV,styleSetName:"tilezen",maxZoomLevel:17,authenticationCode:s.apikey,authenticationMethod:{method:a.AuthenticationMethod.QueryString,name:"apikey"},copyrightInfo:s.copyrightInfo}):new l.HereWebTileDataSource({apikey:s.apikey,tileBaseAddress:l.HereTileProvider.TILE_AERIAL_SATELLITE}),e.addDataSource(n);const p=new r.MapControls(e);p.maxTiltAngle=90;const c=new r.MapControlsUI(p,{zoomLevel:"input"});e.canvas.parentElement.appendChild(c.domElement);const{camera:h,projection:d,mapAnchors:u}=e;new i.MapViewAtmosphere(u,h,d,e.renderer.capabilities,(()=>e.update())).lightMode=i.AtmosphereLightMode.LightDynamic;const m=new o.GeoCoordinates(10,-10);e.lookAt({target:m,distance:2.1*o.EarthConstants.EQUATORIAL_RADIUS})}()}(t.p||(t.p={}))},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=448,(()=>{var e={448:0,738:0},t=[[3406,592]],o=e=>{},r=(r,i)=>{for(var a,l,[s,p,c,h]=i,d=0,u=[];d<s.length;d++)l=s[d],n.o(e,l)&&e[l]&&u.push(e[l][0]),e[l]=0;for(a in p)n.o(p,a)&&(n.m[a]=p[a]);for(c&&c(n),r&&r(i);u.length;)u.shift()();return h&&t.push.apply(t,h),o()},i=self.webpackChunk_here_harp_examples=self.webpackChunk_here_harp_examples||[];function a(){for(var o,r=0;r<t.length;r++){for(var i=t[r],a=!0,l=1;l<i.length;l++){var s=i[l];0!==e[s]&&(a=!1)}a&&(t.splice(r--,1),o=n(n.s=i[0]))}return 0===t.length&&(n.x(),n.x=e=>{}),o}i.forEach(r.bind(null,0)),i.push=r.bind(null,i.push.bind(i));var l=n.x;n.x=()=>(n.x=l||(e=>{}),(o=a)())})(),n.x()})();