@here/harp-examples
Version:
harp.gl Examples
1 lines • 3.42 kB
JavaScript
(()=>{"use strict";var e={725:(e,t,r)=>{t.H=void 0;const n=r(2636),o=r(8937),a=r(8957),i=r(5636),s=r(3074),p=r(2998),l=r(4565);!function(e){function t(e){if(e.styles)for(const t in e.styles)e.styles.hasOwnProperty(t)&&e.styles[t].forEach((e=>{o.isJsonExpr(e)||("urban area"===e.description?(e.technique="standard",e.attr={color:"#ffffff",map:"resources/wests_textures/paving.png",mapProperties:{repeatU:10,repeatV:10,wrapS:"repeat",wrapT:"repeat"},textureCoordinateType:n.TextureCoordinateType.TileSpace}):"park"===e.description?(e.technique="standard",e.attr={color:"#ffffff",map:"resources/wests_textures/clover.png",mapProperties:{repeatU:5,repeatV:5,wrapS:"repeat",wrapT:"repeat"},textureCoordinateType:n.TextureCoordinateType.TileSpace}):"building_geometry"===e.description&&(e.technique="none"))}));return e}!function(){document.body.innerHTML+='\n<style>\n #mapCanvas {\n top: 0;\n }\n #texture-license{\n margin: 10px;\n padding: 10px;\n color: #cccccc;\n }\n</style>\n<p id="texture-license">Textures by\n<a href="https://opengameart.org/content/wall-grass-rock-stone-wood-and-dirt-480" target="_blank">\nWest</a>.</p>';const e=function(e){const r=document.getElementById("mapCanvas"),n=s.ThemeLoader.load("resources/berlin_tilezen_base.json"),o=new s.MapView({canvas:r,theme:n.then(t)}),p=new a.GeoCoordinates(40.705,-74.01);o.lookAt({target:p,zoomLevel:16.1,tilt:30}),s.CopyrightElementHandler.install("copyrightNotice",o);const l=new i.MapControls(o),c=new i.MapControlsUI(l);return r.parentElement.appendChild(c.domElement),o.resize(window.innerWidth,window.innerHeight),window.addEventListener("resize",(()=>{o.resize(window.innerWidth,window.innerHeight)})),o}(),r=new p.VectorTileDataSource({baseUrl:"https://vector.hereapi.com/v2/vectortiles/base/mc",apiFormat:p.APIFormat.XYZOMV,styleSetName:"tilezen",authenticationCode:l.apikey,authenticationMethod:{method:p.AuthenticationMethod.QueryString,name:"apikey"},copyrightInfo:l.copyrightInfo});e.addDataSource(r)}()}(t.H||(t.H={}))},4428:e=>{e.exports=THREE}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.m=e,r.x=e=>{},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.j=207,(()=>{var e={207:0,738:0},t=[[725,592]],n=e=>{},o=(o,a)=>{for(var i,s,[p,l,c,d]=a,u=0,h=[];u<p.length;u++)s=p[u],r.o(e,s)&&e[s]&&h.push(e[s][0]),e[s]=0;for(i in l)r.o(l,i)&&(r.m[i]=l[i]);for(c&&c(r),o&&o(a);h.length;)h.shift()();return d&&t.push.apply(t,d),n()},a=self.webpackChunk_here_harp_examples=self.webpackChunk_here_harp_examples||[];function i(){for(var n,o=0;o<t.length;o++){for(var a=t[o],i=!0,s=1;s<a.length;s++){var p=a[s];0!==e[p]&&(i=!1)}i&&(t.splice(o--,1),n=r(r.s=a[0]))}return 0===t.length&&(r.x(),r.x=e=>{}),n}a.forEach(o.bind(null,0)),a.push=o.bind(null,a.push.bind(a));var s=r.x;r.x=()=>(r.x=s||(e=>{}),(n=i)())})(),r.x()})();