(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{424:function(e,t,r){"use strict";r.r(t);var o=r(16),n=r(3),a=r(25),i=r(23),c=r(36),u=r(170),p=r(22);function f(e,t,r,o,n,a){var i,c;void 0!==n?(i=n,c=void 0!==a?a:0):(i=[],c=0);for(var u=t;u=32;)t=63+(32|31&e),r+=String.fromCharCode(t),e>>=5;return t=e+63,r+=String.fromCharCode(t)}var m=function(e){function t(t){e.call(this);var r=t||{};this.dataProjection=Object(g.j)("EPSG:4326"),this.factor_=r.factor?r.factor:1e5,this.geometryLayout_=r.geometryLayout?r.geometryLayout:i.a.XY}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.readFeatureFromText=function(e,t){var r=this.readGeometryFromText(e,t);return new o.a(r)},t.prototype.readFeaturesFromText=function(e,t){return[this.readFeatureFromText(e,t)]},t.prototype.readGeometryFromText=function(e,t){var r=Object(y.b)(this.geometryLayout_),o=function(e,t,r){var o,n=r||1e5,a=new Array(t);for(o=0;o>1):n>>1}return t}(e),n=0,a=o.length;n© MapTiler © OpenStreetMap contributors',url:"https://api.maptiler.com/maps/hybrid/{z}/{x}/{y}.jpg?key=get_your_own_D6rA4zTHduk6KOKTXzGB",tileSize:512})})]});fetch("data/polyline/route.json").then((function(e){e.json().then((function(e){var t,r,n=e.routes[0].geometry,i=new m({factor:1e6}).readGeometry(n,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}),c=new o.a({type:"route",geometry:i}),u=new o.a({type:"geoMarker",geometry:new a.a(i.getCoordinateAt(0))}),p=new o.a({type:"icon",geometry:new a.a(i.getCoordinateAt(0))}),f=new o.a({type:"icon",geometry:new a.a(i.getCoordinateAt(1))}),g={route:new b.c({stroke:new C.a({width:6,color:[237,212,0,.8]})}),icon:new b.c({image:new j.a({anchor:[.5,1],src:"data/icon.png"})}),geoMarker:new b.c({image:new _.a({radius:7,fill:new k.a({color:"black"}),stroke:new C.a({color:"white",width:2})})})},y=!1,s=new T.a({source:new h.a({features:[c,u,p,f]}),style:function(e){return y&&"geoMarker"===e.get("type")?null:g[e.get("type")]}});A.addLayer(s);var w=document.getElementById("speed"),d=document.getElementById("start-animation");function l(e){var n=Object(F.b)(e),c=e.frameState;if(y){var u=c.time-r,p=t*u/1e6;if(p>=1)return void v(!0);var f=new a.a(i.getCoordinateAt(p)),s=new o.a(f);n.drawFeature(s,g.geoMarker)}A.render()}function v(e){y=!1,d.textContent="Start Animation";var t=i.getCoordinateAt(e?1:0);u.getGeometry().setCoordinates(t),s.un("postrender",l)}d.addEventListener("click",(function(){y?v(!1):(y=!0,r=(new Date).getTime(),t=w.value,d.textContent="Cancel Animation",u.changed(),A.getView().setCenter(O),s.on("postrender",l),A.render())}),!1)}))}))}},[[424,0]]]); //# sourceMappingURL=feature-move-animation.js.map