Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 рядки
1.4KB

  1. import{g as h}from"./locationTransform.e2d22cb6.js";import{g as _,c as v,b as k}from"./index.32194486.js";const y=k("div",{id:"mapDiv",style:{width:"100%",height:"100%"}},null,-1),f=[y],L={name:"TiandiTrack"},P=Object.assign(L,{setup(b,{expose:o}){var r=null,a=null;const c="https://mapapi.qq.com/web/miniprogram/demoCenter/images/marker-start.png",s="https://mapapi.qq.com/web/miniprogram/demoCenter/images/marker-end.png";function l(){r.stop()}function p(){r.start()}function m(){r.pause()}function d(t){var n=new T.TileLayer("https://t4.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=ab2519a9c15768b43c15013661be0c52");a=new T.Map("mapDiv",{layers:[n]}),a.centerAndZoom(new T.LngLat(116.31809,39.92027),12);const e=u(t);r=new T.CarTrack(a,{interval:5,speed:10,dynamicLine:!1,carstyle:{display:!0,iconUrl:"https://carrental.ningdatech.com/car.png",width:52,height:26},polylinestyle:{color:"#F24D4E",weight:55,opacity:1},Datas:e}),g(e[0],e[e.length-1])}function g(t,n){var e=new T.Marker(t,{icon:new T.Icon({iconUrl:c,iconSize:new T.Point(34,44),iconAnchor:new T.Point(12,31)})});a.addOverLay(e);var i=new T.Marker(n,{icon:new T.Icon({iconUrl:s,iconSize:new T.Point(34,44),iconAnchor:new T.Point(12,31)})});a.addOverLay(i)}o({initTrack:d,start:p,stop:l,pause:m});function u(t){return t.map(function(n,e){const i=h(n.lng,n.lat);var w=new T.LngLat(i[0],i[1]);return w})}return(t,n)=>(_(),v("div",null,f))}});export{P as _};