Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.f37af3d3.js 1.3KB

3 månader sedan
1
  1. import{g as w}from"./locationTransform.e2d22cb6.js";import{g as _,c as k,b as f}from"./index.948dee2d.js";const v=f("div",{id:"mapDiv",style:{width:"100%",height:"100%"}},null,-1),y=[v],L={name:"TiandiTrack"},A=Object.assign(L,{setup(M,{expose:i}){var a=null,e=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(){a.stop()}function p(){a.start()}function m(){a.pause()}function d(t){e=new T.Map("mapDiv"),e.centerAndZoom(new T.LngLat(116.31809,39.92027),12);const n=u(t);e.centerAndZoom(n[0],12),a=new T.CarTrack(e,{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:n}),g(n[0],n[n.length-1])}function g(t,n){var o=new T.Marker(t,{icon:new T.Icon({iconUrl:c,iconSize:new T.Point(34,44),iconAnchor:new T.Point(12,31)})});e.addOverLay(o);var r=new T.Marker(n,{icon:new T.Icon({iconUrl:s,iconSize:new T.Point(34,44),iconAnchor:new T.Point(12,31)})});e.addOverLay(r)}i({initTrack:d,start:p,stop:l,pause:m});function u(t){return t.map(function(n,o){const r=w(n.lng,n.lat);var h=new T.LngLat(r[0],r[1]);return h})}return(t,n)=>(_(),k("div",null,y))}});export{A as _};