選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

2 行
1.3KB

  1. import{g as w}from"./locationTransform.e2d22cb6.js";import{g as _,c as k,b as f}from"./index.2f2d2ba5.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 _};