From 569780ffb4e3e4a9965be7224586b8f0b60d34c2 Mon Sep 17 00:00:00 2001 From: userGyl Date: Fri, 27 Mar 2026 09:37:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ln_jq_app/.claude/settings.local.json | 8 ++++++++ .../src/main/java/com/lnkj/ln_jq_app/NativeMapView.java | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ln_jq_app/.claude/settings.local.json diff --git a/ln_jq_app/.claude/settings.local.json b/ln_jq_app/.claude/settings.local.json new file mode 100644 index 0000000..f948202 --- /dev/null +++ b/ln_jq_app/.claude/settings.local.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [ + "Bash(flutter build apk --debug 2>&1 | tail -15)", + "Bash(flutter build apk --debug 2>&1 | tail -10)" + ] + } +} diff --git a/ln_jq_app/android/app/src/main/java/com/lnkj/ln_jq_app/NativeMapView.java b/ln_jq_app/android/app/src/main/java/com/lnkj/ln_jq_app/NativeMapView.java index 68d6b44..70ca7da 100644 --- a/ln_jq_app/android/app/src/main/java/com/lnkj/ln_jq_app/NativeMapView.java +++ b/ln_jq_app/android/app/src/main/java/com/lnkj/ln_jq_app/NativeMapView.java @@ -804,7 +804,9 @@ public class NativeMapView implements PlatformView, LocationSource, AMapLocation BitmapDescriptor icon = getMarkerIconWithText(mContext, displayName, isRecommend); - MarkerOptions markerOptions = new MarkerOptions().position(latLng).icon(icon).anchor(0.5f, 0.8f); // 重点:调整锚点,确保图标尖端对准经纬度 + MarkerOptions markerOptions = new MarkerOptions() + .title(name). + position(latLng).icon(icon).anchor(0.5f, 0.8f); Marker m = aMap.addMarker(markerOptions); @@ -929,6 +931,7 @@ public class NativeMapView implements PlatformView, LocationSource, AMapLocation textView.setText(text); textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); textView.setTextColor(Color.BLACK); + textView.setTypeface(null, Typeface.BOLD); // 设置文字的参数为 WRAP_CONTENT LinearLayout.LayoutParams textLp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); textView.setLayoutParams(textLp);