UNPKG

@here/harp-examples

Version:
1 lines 3.23 kB
(()=>{"use strict";var e={4021:(e,n,t)=>{n.a=void 0;const o=t(8957),r=t(5636),i=t(3074),a=t(2998),l=t(4565);n.a||(n.a={}),document.body.innerHTML+="\n <style>\n #mapCanvas {\n top: 0;\n }\n #info{\n color: #fff;\n width: 80%;\n left: 50%;\n position: relative;\n margin: 10px 0 0 -40%;\n font-size: 15px;\n }\n @media screen and (max-width: 700px) {\n #info{\n font-size:11px;\n }\n }\n </style>\n <p id=info>This example shows the theme extension mechanism: the styles for the parks and the buildings are overwritten from an original theme to make them respectively green and brown.< /p>\n",function(e){const n=document.getElementById("mapCanvas"),t=new i.MapView({canvas:n,theme:{extends:"resources/berlin_tilezen_base.json",definitions:{parkColor:{type:"color",value:"#00aa33"}},styles:{tilezen:[{id:"extrudedBuildings",technique:"fill",when:["ref","extrudedBuildingsCondition"],color:["ref","defaultBuildingColor"]}]}}});i.CopyrightElementHandler.install("copyrightNotice",t);const s=new r.MapControls(t);s.maxTiltAngle=50;const d=new o.GeoCoordinates(41.9005332,12.494249);t.lookAt({target:d,zoomLevel:16.1,tilt:50,heading:200}),t.zoomLevel=16.1;const p=new r.MapControlsUI(s);n.parentElement.appendChild(p.domElement),t.resize(window.innerWidth,window.innerHeight),window.addEventListener("resize",(()=>{t.resize(window.innerWidth,window.innerHeight)})),function(e){const n=new a.VectorTileDataSource({baseUrl:"https://vector.hereapi.com/v2/vectortiles/base/mc",apiFormat:a.APIFormat.XYZOMV,styleSetName:"tilezen",authenticationCode:l.apikey,authenticationMethod:{method:a.AuthenticationMethod.QueryString,name:"apikey"},copyrightInfo:l.copyrightInfo});e.addDataSource(n)}(t)}()},4428:e=>{e.exports=THREE}},n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{}};return e[o].call(r.exports,r,r.exports,t),r.exports}t.m=e,t.x=e=>{},t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.j=220,(()=>{var e={220:0,738:0},n=[[4021,592]],o=e=>{},r=(r,i)=>{for(var a,l,[s,d,p,h]=i,c=0,u=[];c<s.length;c++)l=s[c],t.o(e,l)&&e[l]&&u.push(e[l][0]),e[l]=0;for(a in d)t.o(d,a)&&(t.m[a]=d[a]);for(p&&p(t),r&&r(i);u.length;)u.shift()();return h&&n.push.apply(n,h),o()},i=self.webpackChunk_here_harp_examples=self.webpackChunk_here_harp_examples||[];function a(){for(var o,r=0;r<n.length;r++){for(var i=n[r],a=!0,l=1;l<i.length;l++){var s=i[l];0!==e[s]&&(a=!1)}a&&(n.splice(r--,1),o=t(t.s=i[0]))}return 0===n.length&&(t.x(),t.x=e=>{}),o}i.forEach(r.bind(null,0)),i.push=r.bind(null,i.push.bind(i));var l=t.x;t.x=()=>(t.x=l||(e=>{}),(o=a)())})(),t.x()})();