ソースを参照

地图放大布局问题

zhupeng 3 年 前
コミット
88d88fd75b
2 ファイル変更9 行追加5 行削除
  1. 8 4
      components/Chargermap.vue
  2. 1 1
      pages/searchPile/searchPileMap.vue

+ 8 - 4
components/Chargermap.vue

@@ -267,7 +267,7 @@
 					
 					let content = "<div style='" + station_icon2 + "'>";
 					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;</div>";
-					content+="<div style='color: #ffffff;line-height: 14px;padding: 4px;'>";
+					content+="<div style='color: #ffffff;line-height: 14px;padding: 4px;font-size: 14px'>";
 					content+="<div style='"+corner2+"'></div>";
 					content+="<div class=''>";
 					if(pos.price != null)
@@ -298,7 +298,7 @@
 						{
 							let station_icon = "width: 36px;height: 36px;line-height: 36px;text-align: center;border: 1px solid " + colorBg +";	color: " + colorBg +";	border-radius: 999px;";
 							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 " + colorBg +" ;";
-							let  content = "<div style='"+station_icon+"'><text class='iconfont'>&#xe606;</text><div style='" + corner+"'></div></div>"
+							let  content = "<div style='"+station_icon+";background-color: #fff;' ><text class='iconfont' >&#xe606;</text><div style='" + corner+"'></div></div>"
 							
 							//let content = "<img src='"+this.chargerIcon+"' style='height: 40px;width: 40px' />";
 							this.chargerList[i].marker.setContent(content);
@@ -322,7 +322,7 @@
 				//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>";
 				let station_icon = "width: 36px;height: 36px;line-height: 36px;text-align: center;border: 1px solid "+ colorBg+";	color: "+ colorBg+";	border-radius: 999px;";	
 				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 "+ colorBg+" ;";
-				let  content = "<div style='"+station_icon+"'><text class='iconfont'>&#xe606;</text><div style='" + corner+"'></div></div>"
+				let  content = "<div style='"+station_icon+";background:#fff;' ><text class='iconfont' >&#xe606;</text><div style='" + corner+"'></div></div>"
 				
 				let marker = new AMap.Marker({
 					content: content,//"<img src='"+this.chargerIcon+"' style='height: 40px;width: 40px' />",
@@ -338,8 +338,12 @@
 			}, 
 			addPerson(pos) {
 				console.log('addPerson'+JSON.stringify(pos))
+				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;'>";
+				content += "<div class='iconfont' style='color: #1677ff; font-size: 14px' >&#xe634;</div>";
+				content += "</div>";
+				
 				let marker = new AMap.Marker({
-					content: "<div class='iconfont' style='color: #1677ff; font-size: 14px' >&#xe634;</div>",//<img src='"+this.personIcon+"' style='height: 40px;width: 40px' />",
+					content: content,//"<div class='iconfont' style='color: #1677ff; font-size: 14px' >&#xe634;</div>",//<img src='"+this.personIcon+"' style='height: 40px;width: 40px' />",
 					//content:"<div>xxxxxxxxxxxxxxxxxxxxxx</div>",
 					//icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
 					position: [pos.longitude,pos.latitude],

+ 1 - 1
pages/searchPile/searchPileMap.vue

@@ -31,7 +31,7 @@
 		<!-- 地图 -->
 		<view style="height: 88px;"></view>
 		<view class="map">
-			<view class="station-icon"><text class="iconfont">&#xe606;</text>
+			<view class="station-icon" style="background-color: #fff;"><text class="iconfont" >&#xe606;</text>
 				<view class="corner"></view>
 			</view>
 			<view class="station-icon2">