Chargermap2.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. <template>
  2. <view >
  3. <view id="container" :style="myStyle"></view>
  4. <u-icon name="map-fill" v-if="false" class="input-card" style="width: 24rem;top: 130px;width: 20px;height: 20px;" color="#999" size="40"></u-icon>
  5. </view>
  6. </template>
  7. <script>
  8. import MapLoader from '@/utils/AMap'
  9. let _self;
  10. function mapMovestart(e) {
  11. //'movestart')
  12. }
  13. function mapMove(e){
  14. // //'mapMove')
  15. }
  16. function mapMoveend(e){
  17. //let _self = e;
  18. let pos = _self.logMapInfo();
  19. _self.$emit('onMoveEnd',pos);
  20. //'mapMoveend')
  21. }
  22. export default {
  23. name:"Chargermap",
  24. data() {
  25. return {
  26. enabledMove:true,
  27. myStyle:"width: 100%; height: 1200rpx;",
  28. chargerIcon:'',
  29. chargerSelectedIcon:'',
  30. positionIcon:'',
  31. personIcon:'',
  32. longitude: 112.276527,
  33. latitude: 30.306427,
  34. AMap:null,
  35. //车的位置
  36. car: {
  37. obj:null,
  38. longitude: '',
  39. latitude: '',
  40. },
  41. down: {
  42. obj:null,
  43. longitude: '',
  44. latitude: '',
  45. },
  46. up: {
  47. obj:null,
  48. longitude: '',
  49. latitude: '',
  50. },
  51. //个人
  52. info: {
  53. obj:null,
  54. init: false,
  55. longitude: '',
  56. latitude: '',
  57. },
  58. mapcharger:null,
  59. startend: [{
  60. longitude:112.279274,
  61. latitude:30.303273,
  62. name:''
  63. }, {
  64. longitude:112.273867,
  65. latitude:30.309817,
  66. name:''
  67. }],
  68. start:{},
  69. end:{},
  70. chargerList:[],
  71. covers: [
  72. {
  73. longitude:112.273867,
  74. latitude:30.309817,
  75. },{
  76. longitude:112.280261,
  77. latitude:30.3041,
  78. },{
  79. longitude:112.279274,
  80. latitude:30.303273,
  81. }
  82. ],
  83. };
  84. },
  85. methods:{
  86. getPositionByLonLats(pos) {
  87. var _this = this;
  88. MapLoader().then(AMap => {
  89. var lnglatXY =//[_this.longitude, _this.latitude]
  90. [pos.longitude, pos.latitude];
  91. AMap.service('AMap.Geocoder', function() {
  92. let geocoder = new AMap.Geocoder({});
  93. geocoder.getAddress(lnglatXY, function(status, result) {
  94. //lnglatXY);
  95. //status, result);
  96. if (status === 'complete' && result.info === 'OK') {
  97. var address = result.regeocode.formattedAddress;
  98. //'当前位置'+JSON.stringify(lnglatXY)+address);
  99. //_this.message= address;
  100. } else {
  101. //_this.message= '无法获取定位';
  102. }
  103. });
  104. });
  105. }).catch(error => {
  106. //error)
  107. })
  108. },
  109. calculateDistance(startLngLat,endLngLat){
  110. var _this = this;
  111. //var endLngLat = [item.longitude,item.latitude];
  112. return new Promise((resolve, reject) => {
  113. AMap.plugin('AMap.Driving', function() {
  114. var driving = new AMap.Driving({
  115. // 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
  116. policy: AMap.DrivingPolicy.LEAST_TIME
  117. })
  118. driving.search(startLngLat, endLngLat, function (status, result) {
  119. resolve(result.routes[0])
  120. })
  121. })
  122. })
  123. },
  124. calcDistances(startLngLat,endLst){
  125. var _this = this;
  126. if(startLngLat[0]&&startLngLat[1]){
  127. for(let i=0;i< endLst.length;i++)
  128. {
  129. let item = endLst[i];
  130. let endLngLat = [item.longitude,item.latitude]
  131. //if(endLst[i].distance == null){
  132. var lnglat = new AMap.LngLat(startLngLat[0],startLngLat[1]);
  133. var myDistance = lnglat.distance(endLngLat);
  134. //_self.stationDetail.station.distance = myDistance/1000;
  135. //_self.stationDetail.station.time = myDistance/500;
  136. endLst[i].distance = myDistance/1000.0;
  137. endLst[i].time = myDistance/500.0;
  138. /*}else{
  139. endLst[i].time = endLst[i].distance/500.0;
  140. }*/
  141. }
  142. }
  143. },
  144. updateCharger(pos){
  145. console.log()
  146. if(this.chargerList.length==0){
  147. return
  148. }
  149. //'更新充电桩1'+JSON.stringify(pos) )
  150. // let index = this.chargerList.findIndex(item => item.info.latitude === pos.latitude && item.info.longitude === pos.longitude);
  151. //let index = this.chargerList.findIndex(item => (Math.abs(item.info.longitude-pos.longitude)<0.000001 && Math.abs(item.info.longitude - pos.latitude)<0.000001));
  152. let index = this.chargerList.findIndex(item => item.info.id === pos.id);
  153. // //'更新充电桩['+ index + ']'+JSON.stringify(pos))
  154. let colorBg = '#00BAC8';//#00b962
  155. if(this.chargerList[index].info.fastNum){
  156. colorBg = '#8486FF'
  157. }else if(this.chargerList[index].info.slowNum ){
  158. colorBg = '#00b962'
  159. }
  160. // //'colorBg'+colorBg)
  161. // //'更新充电桩2'+JSON.stringify(this.chargerList[index].info))
  162. if(index>=0){
  163. let station_icon2 = "width: 100px;height: 36px;line-height: 20px;border-radius: 50px;background-color: " + colorBg +";text-align: center;display: flex;";
  164. let corner2=" width: 0;height: 0;position: relative;top: 0px;left: 0px;right: 0;margin: auto;border-bottom: 6px solid transparent;border-left: 6px solid transparent;border-right: 6px solid transparent;border-top: 8px solid " + colorBg +" ;";
  165. let content = "<div style='" + station_icon2 + "'>";
  166. content+="<div style='width: 36px;height: 36px;line-height: 36px;text-align: center;border: 1px solid " + colorBg +";border-radius: 999px;background-color: #fff;color: " + colorBg +";' class='iconfont'>&#xe606";
  167. content+="<div style='"+corner2+"'></div>";
  168. content+="</div>";
  169. content+="<div style='color: #ffffff;line-height: 14px;padding: 4px;font-size: 14px'>";
  170. content+="<div class=''>";
  171. // if(pos.price != null) {
  172. // content+= "¥" + pos.price.toString();
  173. // }
  174. // else
  175. if(pos.giveDiscount) {
  176. content+= "¥" + (pos.electricityPrice+pos.discountServicePrice).toFixed(2).toString();
  177. }
  178. else {
  179. content+= "¥" + (pos.electricityPrice+pos.servicePrice).toFixed(2).toString();
  180. }
  181. content+="</div>";
  182. content+="<div class=''>";
  183. // console.log(pos)
  184. if(pos.idleNum != null) {
  185. content+="空闲" + pos.idleNum.toString();
  186. }
  187. else if(pos.availableNum != null) {
  188. content+="空闲" + pos.availableNum.toString();
  189. } else {
  190. content+="空闲" + (pos.fastAvailableNum+pos.slowAvailableNum).toString();
  191. }
  192. content+="</div>"
  193. content+="</div>";
  194. content+="</div>";
  195. // //'找到充电桩[]'+content)
  196. //content = "<div style='height: 40px;width: 100px;display: flex;flex-direction: row; flex-wrap: wrap; background-color: #00B962!important;border-radius: 20px;'> <div><img src='"+this.chargerSelectedIcon+"' style='idth: 40px;height: 40px'></div><div style='display: flex;flex-direction:column;color:#FFFFFF;'><div style='margin-left:10px'>¥"+ pos.price +"</div><div style='margin-left:10px'>空闲"+pos.idleNum + "</div> </div></div>";
  197. this.chargerList[index].info.selected = true;
  198. this.chargerList[index].marker.setContent(content);
  199. this.chargerList[index].marker.setzIndex(920);
  200. //this.chargerList[index].marker.z-Index=999
  201. }
  202. for(let i = 0;i < this.chargerList.length;i++){
  203. if(index == i)
  204. continue;
  205. if(this.chargerList[i].info.selected != null &&
  206. this.chargerList[i].info.selected)
  207. {
  208. if(this.chargerList[i].info.fastNum){
  209. colorBg = '#8486FF'
  210. }else if(this.chargerList[i].info.slowNum ){
  211. colorBg = '#00b962'
  212. }
  213. let station_icon = "width: 36px;height: 36px;line-height: 36px;text-align: center;border: 1px solid " + colorBg +"; color: " + colorBg +"; border-radius: 999px;";
  214. let corner = "width: 0;height: 0;position: absolute;top: 37px;left: 0;right: 0;margin: auto;border-bottom: 4px solid transparent;border-left: 4px solid transparent;border-right: 4px solid transparent;border-top: 6px solid " + colorBg +" ;";
  215. let content = "<div style='"+station_icon+";background-color: #fff;' ><text class='iconfont' >&#xe606;</text><div style='" + corner+"'></div></div>"
  216. //let content = "<img src='"+this.chargerIcon+"' style='height: 40px;width: 40px' />";
  217. this.chargerList[i].marker.setContent(content);
  218. this.chargerList[i].info.selected = false;
  219. //'restore'+JSON.stringify(this.chargerList[i].info))
  220. this.chargerList[i].marker.setzIndex(900);
  221. }
  222. }
  223. },
  224. addCharger(pos) {
  225. let colorBg = '#00BAC8';
  226. //let colorBg = 'red';
  227. if(pos.fastNum){
  228. colorBg = '#8161FF'
  229. }else if(pos.slowNum){
  230. colorBg = '#00b962'
  231. }
  232. // //'添加充电桩'+JSON.stringify(pos))
  233. //let content = "<div style='height: 40px;width: 100px;display: flex;flex-direction: row; flex-wrap: wrap; background-color: #00B962!important;border-radius: 20px;'> <div><img src='"+this.chargerIcon+"' style='idth: 40px;height: 40px'></div><div style='display: flex;flex-direction:column;color:#FFFFFF'><div>¥1.5</div><div>空闲10</div> </div></div>";
  234. let station_icon = "width: 36px;height: 36px;line-height: 36px;text-align: center;border: 1px solid "+ colorBg+"; color: "+ colorBg+"; border-radius: 999px;";
  235. let corner = "width: 0;height: 0;position: absolute;top: 37px;left: 0;right: 0;margin: auto;border-bottom: 4px solid transparent;border-left: 4px solid transparent;border-right: 4px solid transparent;border-top: 6px solid "+ colorBg+" ;";
  236. let content = "<div style='"+station_icon+";background:#fff;' ><text class='iconfont' >&#xe606;</text><div style='" + corner+"'></div></div>"
  237. let marker = new AMap.Marker({
  238. content: content,//"<img src='"+this.chargerIcon+"' style='height: 40px;width: 40px' />",
  239. //icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
  240. position: [pos.longitude,pos.latitude],
  241. offset: new AMap.Pixel(-13, -30),
  242. zIndex:900,
  243. autoRotation: true,
  244. });
  245. marker.setMap(this.mapcharger);
  246. this.myEmit("charger",marker,pos)
  247. this.chargerList.push({marker:marker,info:pos});
  248. },
  249. addPerson(pos) {
  250. //'addPerson'+JSON.stringify(pos))
  251. let content = "<div style='background-color: rgba(22, 119, 255, 100);text-align: center; box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.4); border: 2px solid rgba(255, 255, 255, 100);border-radius: 999px;'>";
  252. content += "<div class='iconfont' style='color: #1677ff; font-size: 14px' >&#xe634;</div>";
  253. content += "</div>";
  254. let marker = new AMap.Marker({
  255. content: content,//"<div class='iconfont' style='color: #1677ff; font-size: 14px' >&#xe634;</div>",//<img src='"+this.personIcon+"' style='height: 40px;width: 40px' />",
  256. //content:"<div>xxxxxxxxxxxxxxxxxxxxxx</div>",
  257. //icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
  258. position: [pos.longitude,pos.latitude],
  259. offset: new AMap.Pixel(-13, -30),
  260. zIndex:900,
  261. autoRotation: true,
  262. });
  263. marker.setMap(this.mapcharger);
  264. this.myEmit("person",marker,pos)
  265. //this.chargerList.push(marker)
  266. },
  267. /*
  268. addPosition() {
  269. //'addPosition'+JSON.stringify(pos))
  270. let marker = new AMap.Marker({
  271. content: "<img src='"+this.positionIcon+"' style='height: 40px;width: 40px' />",
  272. //icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
  273. //position: [pos.longitude,pos.latitude],
  274. offset: new AMap.Pixel(20, 220),
  275. zIndex:900,
  276. autoRotation: true,
  277. });
  278. marker.setMap(this.mapcharger);
  279. //this.myEmit("person",marker,pos)
  280. //this.chargerList.push(marker)
  281. },*/
  282. setChargerList(sz){
  283. if(this.AMap==null){
  284. return
  285. }
  286. //this.getLocation();
  287. for(var i in this.chargerList){
  288. if(this.chargerList[i].marker){
  289. this.chargerList[i].marker.setMap(null);
  290. }
  291. this.mapcharger.remove(this.chargerList[i]);
  292. }
  293. this.chargerList=[]
  294. for(var i in sz){
  295. var ob=sz[i];
  296. this.addCharger(ob);
  297. }
  298. },
  299. myEmit(type,ob1,obj){
  300. var _this=this;
  301. console.log("myEmit")
  302. AMap.event.addListener(ob1, 'click', function(e) {
  303. console.log("myEmit2",type,ob1,obj)
  304. _this.$emit('clickMap',{
  305. type:type,
  306. obj:obj
  307. })
  308. })
  309. },
  310. setMyStyle(s){
  311. this.myStyle=s;
  312. },
  313. checkCenter(item){
  314. let pos = this.mapcharger.getCenter();
  315. if(pos.lng == item.longitude && pos.lat == item.latitude){
  316. //'setCenter pos '+JSON.stringify(pos))
  317. //'setCenter item '+JSON.stringify(item))
  318. this.listenMove();
  319. }else{
  320. //'setCenter pos1 '+JSON.stringify(pos))
  321. //'setCenter item1 '+JSON.stringify(item))
  322. setTimeout(() => {
  323. this.checkCenter(item);
  324. }, 1000)
  325. }
  326. },
  327. setCenter(item){
  328. // this.enableMove(false);
  329. this.removeMove();
  330. // //'setCenter'+JSON.stringify(item))
  331. if(this.mapcharger){
  332. this.mapcharger.setCenter([item.longitude,item.latitude]);
  333. this.checkCenter(item);
  334. // this.listenMove();
  335. // this.enableMove(true);
  336. return true
  337. }else{
  338. // this.listenMove();
  339. // this.enableMove(true);
  340. return false
  341. }
  342. },
  343. setPerson(ob,bl){
  344. //'setPerson1'+JSON.stringify(ob))
  345. if(this.AMap==null){
  346. return
  347. }
  348. // //'setPerson2')
  349. this.info.longitude=ob.longitude
  350. this.info.latitude=ob.latitude
  351. if(!this.info.ob){
  352. this.addPerson(ob)
  353. //this.info.ob.setMap(this.mapcharger);
  354. ////'setMap xxx ')
  355. //this.mapbus.setCenter([this.info.longitude,this.info.latitude]); //设置地图中心点
  356. if(!bl){
  357. let posCenter= [ this.info.longitude,this.info.latitude];
  358. // //'center'+JSON.stringify(posCenter))
  359. //this.mapcharger.setZoom(9)
  360. //this.mapcharger.setCenter([112.28541,30.308354])
  361. //this.mapcharger.setCenter([121.504919,31.351083])
  362. this.mapcharger.setCenter(posCenter); //设置地图中心点
  363. }
  364. }else{
  365. // this.info.ob.setPosition( [this.info.longitude,this.info.latitude]);
  366. }
  367. },
  368. logMapInfo() {
  369. var posCenter = this.mapcharger.getCenter();
  370. // //'center'+JSON.stringify(posCenter));
  371. var limitBounds = this.mapcharger.getBounds();
  372. let pos = {center:posCenter,bounds:limitBounds};
  373. return pos;
  374. },
  375. init(){
  376. _self = this;
  377. // //'init')
  378. var _this = this;
  379. MapLoader().then(AMap => {
  380. this.AMap=AMap;
  381. _this.mapcharger && _this.mapcharger.destroy();
  382. //使用地图容器ID创建
  383. _this.mapcharger=new AMap.Map("container", {
  384. resizeEnable: true,
  385. dragEnable : true,
  386. center: [this.longitude, this.latitude],
  387. zoom: 13
  388. });
  389. //_this.mapcharger.setMapStyle('amap://styles/macaron');
  390. _this.mapcharger.setMapStyle('amap://styles/f9b17f73bb4576ab1894c29fe9d03c6c');
  391. /*
  392. new SimpleMarker({
  393. iconLabel: '2',
  394. //自定义图标节点(img)的属性
  395. iconStyle: {
  396. src: '@/static/img/location.png',
  397. style: {
  398. width: '20px',
  399. height: '30px'
  400. }
  401. },
  402. //设置基点偏移
  403. offset: new AMap.Pixel(-10, -30),
  404. map: map,
  405. showPositionPoint: true,
  406. position: lngLats[1],
  407. zIndex: 200
  408. });
  409. */
  410. /*
  411. _this.mapcharger.plugin('AMap.Geolocation', function () {
  412. var geolocation = new AMap.Geolocation({
  413. enableHighAccuracy: true,
  414. timeout: 10000,
  415. buttonOffset: new AMap.Pixel(10, 220),
  416. zoomToAccuracy: true,
  417. buttonPosition: 'RB'
  418. });
  419. _this.mapcharger.center = geolocation;
  420. _this.mapcharger.addControl(geolocation);//地图控件右下角显示当前位置
  421. });
  422. _this.mapcharger.plugin(["AMap.ToolBar"],function(){
  423. //加载工具条
  424. var tool = new AMap.ToolBar({
  425. locate:true,
  426. direction:false,
  427. ruler:false,
  428. liteStyle:true,
  429. useNative:true,
  430. // autoPosition:true,
  431. // locationMarker:
  432. });
  433. _this.mapcharger.addControl(tool);
  434. });*/
  435. /*
  436. _this.mapcharger.plugin(["AMap.ControlBar"],function(){
  437. var controlBar = new AMap.ControlBar({
  438. showZoomBar:true,
  439. showControlButton:true,
  440. position:{top:'10px',right:'10px'}
  441. })
  442. _this.mapcharger.addControl(controlBar)
  443. });*/
  444. var clickHandler = function(e) {
  445. _this.$emit('onClicked',e);
  446. //'您在[ '+e.lnglat.getLng()+','+e.lnglat.getLat()+' ]的位置点击了地图!');
  447. };
  448. /*
  449. var mapMovestart = function(){
  450. //'movestart')
  451. }
  452. var mapMove = function(){
  453. ////'mapMove')
  454. }
  455. var mapMoveend = function(){
  456. let pos = _this.logMapInfo();
  457. _this.$emit('onMoveEnd',pos);
  458. // //'mapMoveend')
  459. }
  460. _this.mapMovestart = mapMovestart;
  461. _this.mapMove = mapMove;
  462. _this.mapMoveend = mapMoveend;
  463. */
  464. _this.mapcharger.on('click', clickHandler);
  465. _this.$emit('onload')
  466. //_this.addPosition();
  467. _this.listenMove();
  468. }, e => {
  469. //_this.mui.toast('地图加载失败');
  470. //'地图加载失败', e)
  471. })
  472. },
  473. removeMove(){
  474. var _this = this;
  475. //this.enabledMove = false;
  476. _this.mapcharger.off('movestart', mapMovestart);
  477. _this.mapcharger.off('mapmove', mapMove);
  478. _this.mapcharger.off('moveend', mapMoveend);
  479. },
  480. enableMove(enable){
  481. this.enabledMove = enable;
  482. },
  483. listenMove(){
  484. var _this = this;
  485. /*var mapMovestart = function(){
  486. if(!_this.enabledMove)
  487. return;
  488. //'movestart')
  489. }
  490. var mapMove = function(){
  491. if(!_this.enabledMove)
  492. return;
  493. ////'mapMove')
  494. }
  495. var mapMoveend = function(){
  496. let pos = _this.logMapInfo();
  497. if(!_this.enabledMove)
  498. return;
  499. _this.$emit('onMoveEnd',pos);
  500. }*/
  501. // //'listenMove')
  502. _this.mapcharger.on('movestart', mapMovestart);
  503. _this.mapcharger.on('mapmove', mapMove);
  504. _this.mapcharger.on('moveend',mapMoveend);
  505. },
  506. navigate(startLngLat,endLngLat){
  507. //'start'+JSON.stringify(startLngLat))
  508. //'end'+JSON.stringify(endLngLat))
  509. AMap.plugin('AMap.Driving', function() {
  510. var driving = new AMap.Driving({
  511. // 驾车路线规划策略,AMap.DrivingPolicy.LEAST_TIME是最快捷模式
  512. policy: AMap.DrivingPolicy.LEAST_TIME
  513. })
  514. // var startLngLat = [116.379028, 39.865042]
  515. // var endLngLat = [116.427281, 39.903719]
  516. driving.search(startLngLat, endLngLat, function (status, result) {
  517. //'status'+JSON.stringify(result))
  518. // 未出错时,result即是对应的路线规划方案
  519. })
  520. })
  521. },
  522. initMap(point,stationList,startend){
  523. //'初始化地图'+this.longitude+this.latitude)
  524. var _this = this;
  525. this.covers=point;
  526. this.startend=startend;
  527. MapLoader().then(AMap => {
  528. this.AMap=AMap;
  529. _this.mapcharger && _this.mapcharger.destroy();
  530. _this.mapcharger=new AMap.Map("container", {
  531. resizeEnable: true,
  532. center: [this.longitude, this.latitude],
  533. //center: [116.397428, 39.90923],
  534. zoom: 14
  535. });
  536. var lineArr=[]
  537. this.$emit('onload')
  538. }, e => {
  539. //_this.mui.toast('地图加载失败');
  540. //'地图加载失败', e)
  541. })
  542. },
  543. }
  544. }
  545. </script>
  546. <style scoped>
  547. /*去除下标*/
  548. .amap-logo{
  549. display: none;
  550. }
  551. .amap-copyright{
  552. opacity:0;
  553. font-size: 1px;
  554. }
  555. .input-card {
  556. display: flex;
  557. flex-direction: column;
  558. min-width: 0;
  559. word-wrap: break-word;
  560. background-color: #fff;
  561. background-clip: border-box;
  562. border-radius: .25rem;
  563. width: 22rem;
  564. border-width: 0;
  565. border-radius: 0.4rem;
  566. box-shadow: 0 2px 6px 0 rgba(114, 124, 245, .5);
  567. position: fixed;
  568. bottom: 1rem;
  569. right: 1rem;
  570. -ms-flex: 1 1 auto;
  571. flex: 1 1 auto;
  572. padding: 0.75rem 0.75rem;
  573. }
  574. .station-icon {
  575. width: 36px;
  576. height: 36px;
  577. line-height: 36px;
  578. text-align: center;
  579. border: 1px solid rgba(133, 140, 255, 100);
  580. color: #b58cff;
  581. border-radius: 999px;
  582. position: absolute;
  583. top: 89px;
  584. left: 38px;
  585. }
  586. .corner{
  587. width: 0;
  588. height: 0;
  589. position: absolute;
  590. top: 34px;
  591. left: 0;
  592. right: 0;
  593. margin: auto;
  594. border-bottom: 4px solid transparent;
  595. border-left: 4px solid transparent;
  596. border-right: 4px solid transparent;
  597. border-top: 6px solid #b58cff ;
  598. }
  599. .station-icon2 {
  600. width: 100px;
  601. height: 36px;
  602. line-height: 20px;
  603. border-radius: 50px;
  604. background-color: rgba(0, 185, 98, 100);
  605. text-align: center;
  606. display: flex;
  607. position: absolute;
  608. top: 191px;
  609. left: 168px;
  610. }
  611. .icon2-left{
  612. width: 36px;
  613. height: 36px;
  614. line-height: 36px;
  615. text-align: center;
  616. border: 1px solid rgba(0, 185, 98, 100);
  617. border-radius: 999px;
  618. background-color: #fff;
  619. color: #00b962;
  620. }
  621. .icon2-right{
  622. color: #ffffff;
  623. line-height: 14px;
  624. padding: 4px;
  625. }
  626. .corner2{
  627. width: 0;
  628. height: 0;
  629. position: absolute;
  630. top: 36px;
  631. left: 0;
  632. right: 0;
  633. margin: auto;
  634. border-bottom: 6px solid transparent;
  635. border-left: 6px solid transparent;
  636. border-right: 6px solid transparent;
  637. border-top: 8px solid #00b962 ;
  638. }
  639. </style>