Chargermap.vue 22 KB

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