From 2fb397e4a31d14880ed2524f898ae67a0d664c06 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期二, 17 十二月 2024 11:24:29 +0800
Subject: [PATCH] 1.在地图中心显示中心点。 2.优化地图覆盖物显示,使显示的图标正对坐标。 3.优化地图覆盖物文字居中显示。

---
 app/src/main/res/layout/fragment_map.xml |  225 +++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 156 insertions(+), 69 deletions(-)

diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml
index 9d6a57e..c2f0355 100644
--- a/app/src/main/res/layout/fragment_map.xml
+++ b/app/src/main/res/layout/fragment_map.xml
@@ -8,17 +8,32 @@
     <!--        android:layout_width="match_parent"-->
     <!--        android:layout_height="match_parent" />-->
 
-
-    <WebView
-        android:id="@+id/webView"
+    <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent" />
+        android:layout_height="match_parent"
+        android:layout_above="@+id/bottomLL">
+
+
+        <WebView
+            android:id="@+id/webView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+
+        <ImageView
+            android:layout_width="26dp"
+            android:layout_height="52dp"
+            android:layout_centerHorizontal="true"
+            android:layout_centerVertical="true"
+            android:paddingBottom="26dp"
+            android:src="@drawable/ic_center_pin" />
+    </RelativeLayout>
 
     <RelativeLayout
         android:id="@+id/inspectRL"
         android:layout_width="match_parent"
         android:layout_height="35dp"
-        android:background="@color/base_blue">
+        android:background="@color/base_blue"
+        android:visibility="visible">
 
         <TextView
             android:id="@+id/inspectPause"
@@ -66,7 +81,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentRight="true"
-        android:layout_marginTop="60dp"
+        android:layout_marginTop="80dp"
         android:layout_marginRight="15dp"
         android:background="@drawable/ic_blue_background"
         android:padding="10dp"
@@ -80,7 +95,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentRight="true"
-        android:layout_marginTop="120dp"
+        android:layout_marginTop="140dp"
         android:layout_marginRight="15dp"
         android:background="@drawable/ic_green_bg"
         android:padding="10dp"
@@ -88,6 +103,14 @@
         android:textColor="@color/white"
         android:textSize="18sp" />
 
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="35dp"
+        android:layout_above="@+id/bottomLL"
+        android:background="@color/white">
+
+    </RelativeLayout>
 
     <LinearLayout
         android:id="@+id/bottomLL"
@@ -98,91 +121,155 @@
         android:orientation="horizontal"
         android:visibility="gone">
 
-        <LinearLayout
-            android:layout_width="0dp"
+        <ScrollView
+            android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:orientation="vertical"
             android:padding="10dp">
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:gravity="start"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="鍚嶇О锛�"
-                    android:textColor="@color/black" />
-
-                <TextView
-                    android:id="@+id/markerName"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:ellipsize="end"
-                    android:maxLines="1"
-                    android:text=""
-                    android:textColor="@color/black" />
-            </LinearLayout>
 
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="5dp"
-                android:gravity="start"
-                android:orientation="horizontal">
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:orientation="vertical">
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="鐗囧尯锛�"
-                    android:textColor="@color/black" />
-
-                <TextView
-                    android:id="@+id/markerBlockName"
+                <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:ellipsize="end"
-                    android:maxLines="1"
-                    android:text=""
-                    android:textColor="@color/black" />
-            </LinearLayout>
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="5dp"
-                android:gravity="start"
-                android:orientation="horizontal">
+                    <ImageView
+                        android:id="@+id/ic_project"
+                        android:layout_width="25dp"
+                        android:layout_height="25dp"
+                        android:layout_centerVertical="true"
+                        android:layout_marginRight="10dp"
+                        android:src="@drawable/ic_intake" />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="鍦板潃锛�"
-                    android:textColor="@color/black" />
+                    <TextView
+                        android:id="@+id/markerName"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        android:text=""
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/common_text_size_little" />
+                </LinearLayout>
 
-                <TextView
-                    android:id="@+id/markerAddress"
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="25dp"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="鐗囧尯锛�"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/common_text_size_little" />
+
+                    <TextView
+                        android:id="@+id/markerBlockName"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        android:text=""
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/common_text_size_little" />
+                </LinearLayout>
+
+                <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:ellipsize="end"
-                    android:maxLines="1"
-                    android:text=""
-                    android:textColor="@color/black" />
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal">
+
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="缁忓害锛�"
+                        android:textColor="@color/manage_item_text"
+                        android:textSize="@dimen/common_text_size_little" />
+
+                    <TextView
+                        android:id="@+id/lng"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        android:textColor="@color/manage_item_text"
+                        android:textSize="@dimen/common_text_size_little" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="绾害锛�"
+                        android:textColor="@color/manage_item_text"
+                        android:textSize="@dimen/common_text_size_little" />
+
+                    <TextView
+                        android:id="@+id/lat"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        android:textColor="@color/manage_item_text"
+                        android:textSize="@dimen/common_text_size_little" />
+
+                    <ImageView
+                        android:id="@+id/editePoint"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:padding="5dp"
+                        android:src="@drawable/ic_edit_btn" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="10dp"
+                    android:gravity="start"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="鍦板潃锛�"
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/common_text_size_little" />
+
+                    <TextView
+                        android:id="@+id/markerAddress"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        android:text=""
+                        android:textColor="@color/black"
+                        android:textSize="@dimen/common_text_size_little" />
+                </LinearLayout>
+
             </LinearLayout>
 
-        </LinearLayout>
+        </ScrollView>
 
         <ImageView
             android:layout_width="25dp"
             android:layout_height="30dp"
             android:layout_gravity="center"
             android:layout_marginRight="10dp"
-            android:background="@drawable/ic_right_blue" />
+            android:background="@drawable/ic_right_blue"
+            android:visibility="gone" />
 
 
     </LinearLayout>
+
 </RelativeLayout>
\ No newline at end of file

--
Gitblit v1.8.0