xue_hua_gaode_map 1.2.1
xue_hua_gaode_map: ^1.2.1 copied to clipboard
Flutter plugin for the Amap (Gaode) SDK: location, geofencing, map and search, with a consistent Dart API on Android and iOS.
Changelog #
All notable changes to this project are documented in this file.
1.2.1 #
Changed #
- Android
consumer-rules.pro: broaden Gaode SDK ProGuard/R8 keep rules to covercom.amap.api.**,com.autonavi.**,com.amap.location.**, andcom.autonavi.base.amap.mapcore.NativeBase, with matching-dontwarnentries for release builds.
Docs #
- README / README_zh-CN: document
consumer-rules.proauto-merge viaconsumerProguardFiles, and include a copy-paste ProGuard block for host apps that need to apply the rules manually.
1.2.0 #
Fixed #
- Dart client lifecycle: dispose now blocks in-flight API calls, cancels native
EventChannelsubscriptions, and closes broadcast streams onLocationClient,GeofenceClient, andOfflineMapClient. GaodeClientDisposecentralizes client teardown with retry on native failure and consistent disposed marking across location, geofence, and offline map clients.OfflineMapClientmarks instances disposed only after shared native destroy succeeds; failed destroy restores the reference count for retry.GaodeMapController.disposeawaits managed event stream teardown (replaces fire-and-forgetmarkDisposed).- Android
takeSnapshotreplies on the main thread (matches iOS). - iOS reverse geocode times out and releases the operation lock (matches Android).
location#stopand geofencepause/resumeno longer recreate destroyed native registry entries.- Location and geofence
EventChannelsubscriptions reportINVALID_ARGUMENTwhenclientIdis missing. - iOS offline map
destroypauses active downloads before clearing the event sink. - Android search APIs now enforce Gaode privacy compliance before invoking the Search SDK.
- Android map events are marshalled onto the main thread before reaching Flutter.
- iOS plugin engine teardown now releases location, geofence, and offline map
native resources (mirrors Android
onDetachedFromEngine). - Android geofence
createFinishedevents now includecustomId. - Android offline download progress attributes events to tracked city codes instead of always using the first downloading city.
- iOS map
takeSnapshotcompiles correctly and deliversFlutterResulton the main queue. - Android location stream no longer emits updates when continuous tracking is inactive (matches iOS).
- iOS map no longer emits duplicate
cameraMoveStartevents per gesture. - iOS map events are marshalled onto the main thread before reaching Flutter.
SearchClientthrowsGaodeExceptionwhen the platform returns null instead of empty success payloads.Geocode, geofence, and search list parsing throwGaodeExceptionfor malformed native payloads.GaodeMapControllerthrowsStateErrorafter itsGaodeMapViewis removed.GaodeMapControllernow uses managed event stream teardown on dispose.- iOS plugin engine detach clears global
EventChannelstream handlers. OfflineMapClientreference-counts instances so disposing one client no longer destroys the shared native offline map backend.- Explicit duplicate
clientIdvalues onLocationClientandGeofenceClientnow throwArgumentError. - Geofence add operations eagerly subscribe to the event stream so
createFinishedevents are not dropped. - Client
disposeclears the cached dispose future when native teardown fails so callers can retry. GeofenceClient.setActiveActionsdocuments thatallowsBackgroundLocationUpdatesis iOS-only.- Android offline download
STOPstatus now maps tocancelled(matches iOS).
1.1.1 #
Fixed #
- iOS compile errors against AMap3DMap 11.x: unwrap optional
MATileOverlay(urlTemplate:)and remove invalidMAOverlayRenderer.zIndex(not present in the 3D SDK). - iOS compile errors for optional overlay initializers (
MAPolyline,MAPolygon, etc.). - iOS SDK compatibility: remove
AMapLocationReGeocode.floorand offline-map.pausestatus cases not present in current AMap SDK versions.
Changed #
- iOS overlay
zIndexis applied viaMAMapView.insertOverlay(_:at:level:)insert order (ground overlays useMAOverlayLevelAboveRoads; others useMAOverlayLevelAboveLabels), aligning stacking behavior with Android. - iOS marker
zIndexis applied onMAAnnotationViewinviewFor annotation. - iOS tile overlay
visiblealpha is applied inrendererFor.
1.1.0 #
Added #
- Full Gaode 3D map Dart API: camera controls (
getCameraPosition,animateCamera,fitBounds,setMapRegionLimits,zoomIn/zoomOut), display toggles (traffic, buildings, indoor, terrain, compass, scale, logo), markers with custom icons and drag events, and overlay types (polyline, polygon, circle, arc, ground, heatmap, multi-point, tile). - Per-view
EventChannelmap events includingGaodeMapInfoWindowTapEvent. OfflineMapClientfor offline city catalog, download management, and progress stream.- Map tools:
takeSnapshot,toScreenLocation,fromScreenLocation. - Example app map tab demos: traffic, animated camera, overlays, fit bounds, ground overlay, heatmap, and offline catalog probe.
- Location SDK:
LocationOptionsfieldsgpsFirst,gpsFirstTimeout,sensorEnable(Android), andlocationTimeout/reGeocodeTimeout(iOS). Android now mapsprotocolandwifiActiveScan(viasetWifiScan) correctly. - Map my-location:
GaodeMyLocationStyle,GaodeMyLocationType,GaodeUserTrackingMode,setMyLocationStyle,getMyLocation,moveToMyLocation. - Map events:
GaodeMapMyLocationChangeEvent,GaodeMapUserTrackingModeChangeEvent(iOS).
Fixed #
- Wired
GaodeMapMarker.infoWindowEnabledand nativeinfoWindowTapevents on Android and iOS. - iOS
animateCamerabearing/tilt duration;fitBoundspadding viasetVisibleMapRect(_:edgePadding:animated:). - iOS polyline
dottedLineviaMALineDashType. - Android compile issues (
setMapStatusLimits, logo/zoom position constants, offline mapgetcompleteCode()). - iOS
OfflineMapHandlerand overlay APIs aligned with AMap iOS SDK. - Android
takeSnapshotreplying twice to Flutter. - Android map lifecycle registry leak on platform view dispose.
- Android offline map progress events marshalled on the main thread.
- Android clearing map region limits when
setMapRegionLimits(null)is called. - Android heatmap
opacityapplied via tile provider transparency. - iOS search handlers double-replying when privacy or API key checks fail.
- iOS geofence handlers hanging when
clientIdis missing. - iOS custom marker anchor offset calculation.
- iOS offline map
pauseno longer callscancelAll()when a city is not found. - iOS overlay
visible/zIndex, tiletileSize, initialregionLimits, and offline"paused"status wiring. - iOS
LocationResultno longer hard-codeslocationType; enriches re-geocode fields when available. - Android
moveToMyLocationrestores the configuredmyLocationStyleafter a temporary one-shot locate when no fix was cached. - iOS
setMyLocationEnabled(true)re-applies my-location representation and tracking mode. - Android
LocationOptions.locationPurpose: noneclears the native scene (sets purpose tonull).
Removed #
- Reserved
clusterEnabled/setClusterEnabledstub API (not implemented in native SDK integration).
Changed #
- Breaking: Removed reserved
clusterEnabled/setClusterEnabledstub API. - Map platform channels now return
INVALID_ARGUMENTfor invalid overlay and camera inputs instead of silently succeeding. - iOS
cameraMoveevents are emitted continuously during map movement to match Android.
1.0.1 #
- iOS: fix a hard crash when calling location/geofence/search APIs without a configured API key. The plugin now reads
AMapApiKeyfromInfo.plistat startup (matching Android's manifest auto-read), and unconfigured keys surface as a catchableAPI_KEY_NOT_CONFIGUREDerror instead of crashing the app. - Docs: clarify iOS API key setup (Info.plist auto-read,
GaodeSdk.setApiKeyruntime override).
1.0.0 #
- First stable release.
- Core: privacy compliance, runtime API key, reverse-geocode language, Android country code.
- Location: single/continuous positioning, location stream, reverse geocoding.
- Geofence: circle/polygon/POI/district fences with create and trigger events.
- Map: native
PlatformViewwith camera, map type, my-location dot, and markers. - Search: POI keyword/around search, input tips, and forward geocoding.
- Consistent error handling: native failures surface as
GaodeExceptionon both platforms.