SuperAPI AI Directory

baidu-map-harmonyos-sdk

Coding & development

View repository

Updated 10-15 20:05

About this skill

Baidu Map HarmonyOS SDK Development Skill

Usage Scenarios

In the following situationsthis Skill must be used first:

  • When mentioning HarmonyOS NEXT Baidu Map / HarmonyOS Map SDK / HarmonyNEXT Map development
  • When using @bdmap/base、@bdmap/map、@bdmap/search、@bdmap/util and other packages in this project, or directly and entirely using @bdmap/map_walkride_searchand other combination packages
  • When one of the following capabilities needs to be implemented:
    • Map component display, gesture and control interaction
    • Overlays such as markers, lines, polygons, circles, text, and info windows
    • Layers such as normal maps, satellite maps, personalized maps, and custom tile maps
    • Route planning for driving/walking/cycling/transit and walking/cycling navigation
    • Search for POI/AOI/indoor POI/buildings/administrative districts/weather, etc.
    • Forward and reverse geocoding, recommended pickup points, coordinate conversion, launching Baidu Map, etc.

In the following situationsthis Skill is not suitable, and Skills for other platforms/capabilities should be used instead:

  • When it only involves Web version Baidu Map JavaScript API, Android/iOS native SDK, or mini program map capabilities
  • General HarmonyOS application development unrelated to maps (in this case, an empty project/general HarmonyOS Skill should be used first)

⚠️ Mandatory Requirements (Must Be Strictly Followed)

When using this Skill for development,you must strictly followthe following specifications (only core summaries are listed; see referenced documents for details):

  1. Logging / Comments / Modularization Specifications

    • Must use unified Logger utility class to encapsulate native console, the first parameter is fixed to the scenario name "SportHealthMap", and it is forbidden to directly use console.info/error/warn/debug。
    • Key business methods must be supplemented with Chinese comments explaining their purpose, parameters, and return values. General utility classes must be extracted as independent modules, and defining general classes inline within pages is forbidden.
    • For detailed rules and examples, see:Code Specifications。
  2. Image Resource Usage Specifications (Must Actively Copy)

    • When generating or modifying sample code, prioritize using the image names specified in this Skill's assets, and keep them consistent with or similar to the purposes in the assets table.
    • Developers must be reminded: actively copy the corresponding images to the HarmonyOS project's resources/rawfile/ directory, and then reference them via rawfile://xxx.png . Otherwise, overlays will not display or will report errors because the resources cannot be found.
    • For detailed instructions, see:Code Specifications / Image Resource Usage Specifications。
  3. Map Feature Development (Code Organization and Specifications) (Mandatory Requirements)

    • Examples and API Usage: When answering and implementing, priority should be given to referring to the sample code and calling methods provided in references/reference.md under this directory, and adapting them to business scenarios on that basis, avoiding usages inconsistent with the SDK that are invented on your own.
    • Performance and Overlay Layering: In high-frequency UI update scenarios (such as bubble content refresh, track playback, etc.), objects such as PopView/Label must be cached and reused, and all overlays must explicitly set zIndex and follow unified layering to avoid information being obscured; for details, see:Map Performance and Overlay Layering Specifications。
    • Map & UI Interaction Feedback: For key behaviors such as map initialization, search, route planning, positioning, overlay addition and removal, and permission/network exceptions, clear user feedback must be provided through Toast/Dialog/page status text, etc., not just logs; for details, see:Map UI Interaction and User Feedback Specifications。
    • Positioning and Map Collaboration: When involving @bdmap/locsdk in map scenarios, the positioning SDK's initialization order, permission, and error handling specifications must also be followed; for complete instructions, see:Positioning SDK Development Guide。
    • Walking and Cycling Navigation Development: When involving walking/cycling navigation (@bdmap/map_walkride_search), specifications such as navigation engine initialization timing, lifecycle management, simulated navigation exit, and default UI gesture pass-through must be followed; for complete instructions, see:Walking and Cycling Navigation SDK Development Guide。
    • Map Style and Visual Specifications: When involving style issues such as Marker anchors, route/area colors and line widths, and information density control at different zoom levels, unified specifications must be followed; for details, see:Map Style and Visual Specifications。
    • Types and ArkTSCheck: When implementing map-related callbacks and methods, parameter and return value types must be explicitly declared; use of any or implicit undefinedis prohibited; when the .catch callback parameter type cannot be determined, prefer Error or object, ensuring ArkTSCheck passes.
  4. Package Management Mutual Exclusion Rules (Mandatory Requirement)

    • The combined package (@bdmap/map_walkride_search、@bdmap/navi_map) and the standalone packages (@bdmap/base、@bdmap/map、@bdmap/search、@bdmap/util)must not be mixed, otherwise dependency conflicts will occur.
    • Before adding any Baidu Map dependency, you must first check the existing package scheme in oh-package.json5 and strictly follow the same scheme.
    • Automatic Switching: When the project already uses standalone packages but a new requirement clearly needs combined package capabilities, the Agent mustautomatically perform the switch(uninstall standalone packages → install combined package → batch replace imports → build verification), without additional user inquiry.
    • @bdmap/locsdk is a standalone positioning package, not subject to the above mutual exclusion restrictions, and can be used with any scheme.
    • For detailed rules, automatic switching process, and scenario recommendations, see:Package Management Specifications。
  5. Run Detection (Auto Run Build)

    • After each code change related to the Baidu Map HarmonyOS SDK, a build and ArkTSCheck must be executed once according to the agreed Auto Run process to self-check for coding errors.
    • The core command is:ohpm install + hvigorw assembleHap --mode module -p product=default -p buildMode=debug --no-daemon。
    • For detailed process and error classification handling, see:Build and Coding Error Self-Check Specifications。

Basic Development Process (General Steps)

When handling any issue related to the HarmonyOS Baidu Map SDK, organize your thoughts and responses according to the following process:

  1. Confirm the Requirement Type
    • Determine which type of scenario the issue belongs to:
      • Map display and interaction
      • Overlay drawing (point/Marker/line/polygon/text/circle)
      • Search (POI/AOI/building/administrative district/weather, etc.)
      • Route planning (driving/walking/cycling/transit)
      • Walking and cycling navigation (navigation engine, default navigation UI, navigation status monitoring, simulated navigation, etc.)
      • Location capabilities (single-point location/continuous location/background location)
      • Utility capabilities (distance/area calculation, coordinate conversion, positional relationship between points and shapes, etc.)
  2. Check dependencies and installation method (strictly comply with the package management mutual exclusion rules)
  • You must first read Package Management Specification, confirm whether the current project uses the combined package or the standalone package solution, and strictly comply with the mutual exclusion rules.
  • Based on references/api/modules.md(module index) recommendations:
    • If only some capabilities are needed, it is recommended to install standalone packages as needed:
      • ohpm install @bdmap/base
      • ohpm install @bdmap/search
      • ohpm install @bdmap/util
      • ohpm install @bdmap/map
      • ohpm install @bdmap/locsdk
    • If combined capabilities such as map + walking/cycling are needed, you can directly use the combined package:
      • ohpm install @bdmap/map_walkride_search
    • If navigation + map capabilities are needed, you can use the combined package:
      • ohpm install @bdmap/navi_map
  • Combined packages and standalone packages must not be mixed, see Package Management Specification。
  • In the answer, clearly state the packages that need to be installed and the commands.
  1. Confirm system and toolchain constraints
  • Refer to references/api/modules.md(module index) and the constraints and limitations in the online documentation. When answering, you need to remind:
    • Only the standard system is supported, and the device is a Huawei phone
    • HarmonyOS version: HarmonyOS NEXT Developer Preview1 and above
    • DevEco Studio version: DevEco Studio NEXT Developer Preview1 and above
    • HarmonyOS SDK version: HarmonyOS NEXT Developer Preview1 SDK and above
  1. Configure permissions
    • If network access, search, route planning, etc. are involved, at least the following need to be added to the permission configuration:
      • "ohos.permission.GET_WIFI_INFO"
      • "ohos.permission.GET_NETWORK_INFO"
      • "ohos.permission.GET_BUNDLE_INFO"
      • "ohos.permission.INTERNET"
    • Remind to correctly declare these permissions in the project configuration.
  2. Recommended process for declaring precise location APIs
    • Start from the business code: first look at the "package name + type name" in import { MapOptions } from '@bdmap/map'.
    • Location package root declaration file: find oh_modules/@bdmap/map/Index.d.ets in the current project.
    • Look up exports in Index.d.ets: search for MapOptions and find something like import MapOptions from "./src/main/ets/lbsmapsdk/e/p";
    • Jump to the specific definition file: open src/main/ets/lbsmapsdk/e/p.d.ets according to the relative path, then search for class MapOptions in the file to view the complete definition.

Common capability guidance

When raising requirements, prioritize the following capability categories and answer in combination with the corresponding module documentation.

1. Capability index (for global search in development tools)

Usage suggestions:

  • Search keywords first, then jump: prioritize using the "recommended search terms" in the table below (including class names/method names/Chinese aliases) for global search; after a hit, open the corresponding references/reference.md section, and finally drill down as needed to the references/api/ API documentation.
  • Three-stage positioning:关键词(用户问题) → references/reference(examples and usage) → references/api/modules/*.md(API 参数/枚举/接口明细)。
Scenario (categorized by function) Recommended search terms references/reference Positioning references/api/ API documentation entry
Map initialization/display MapComponent, MapController, onReady, MapOptions, MapStatus, display map references/reference / references/reference references/api/modules/map
Map type/base map setMapType, normal map, satellite map, blank map, POI show/hide, traffic flow references/reference / references/reference references/reference
Personalized map CustomStyle、setCustomStyleById、initCustomStyle、sty references/reference references/reference
Indoor map indoorMap、INDOORSTATUSCHANGE、switchIndoorFloor、getIndoorInfo references/reference references/reference
Offline map LocalMapManager、getHotCities、start、pause、resume、delete references/reference references/api/modules/map
Gestures/interaction gestures、zoomGesturesEnabled、moveGesturesEnabled、rotateGesturesEnabled、MapEvent.PINCH references/reference references/api/modules/map
Controls/layers CompassLayer, LocationLayer, scale, zoom controls, location controls, getLayerByTag references/reference / references/reference references/api/modules/map
Map events MAPSTATUSCHANGE、CLICK、DOUBLECLICK、PINCHSTART、ROTATIONUPDATE references/reference references/api/modules/map
Map lifecycle/destroy onWillDisappear、MapController.onWillDisappear、Navigation、Router references/reference references/api/modules/map
English map MapLanguage、setMapLanguage、getMapLanguage references/reference references/api/modules/map
Particle effects ParticleEffectType、showParticleEffectByType、customParticleEffectByType references/reference references/api/modules/map
Overlays: Marker Marker、ImageEntity、addOverlay、removeOverlay、OverlayEvent.CLICK references/reference references/api/modules/map
Overlays: bubbles (popups, info windows) PopView、LabelUI、HorizontalLayout references/reference / references/reference references/api/modules/map
Overlays: point clustering ClusterGroup、ClusterTemplate、addMarker references/reference references/api/modules/map
Overlays: polylines/tracks Polyline、textures、dottedline、TrackAnimation、Track references/reference / references/reference / references/reference references/api/modules/map
Overlays: polygons/circles Polygon、Circle、Stroke、fillcolor、alpha references/reference / references/reference references/api/modules/map
Overlays: 3D Prism、Building、Bd_3DModel、GLTF、OBJ references/reference / references/reference / references/reference references/api/modules/map
Layers: tiles/heatmap UrlTileProvider、ImageTileLayer、HeatMapBuilder、HexagonMapBuilder references/reference / references/reference / references/reference / references/reference references/api/modules/map
Search: POI PoiSearch、searchInCity、searchNearby、searchInBound、PoiDetail references/reference references/api/modules/search
Search: geocoding GeoCoder、geocode、reverseGeoCode、GeoCodeOption references/reference references/api/modules/search
Search: AOI AoiSearch、requestAoi、polygon references/reference references/api/modules/search
Search: Sug SuggestionSearch、requestSuggestion references/reference references/api/modules/search
Search: bus routes BusLineSearch、searchBusLine、BUS_LINE、SUBWAY_LINE references/reference references/api/modules/search
Search: weather WeatherSearch、WeatherResult、districtID references/reference references/api/modules/search
Search: recommended pickup points requestRecommendStop、RecommendStopResult references/reference references/api/modules/search
Search: administrative districts DistrictSearch, searchDistrict, boundary, polylines references/reference references/api/modules/search
Search: buildings BuildingSearch, requestBuilding, 3D building blocks references/reference references/api/modules/search
Routes: driving RoutePlanSearch、drivingSearch、DrivingRouteResult references/reference references/api/modules/search / references/api/modules/walkridecommon
Routes: walking walkingSearch、WalkingRouteResult references/reference references/api/modules/search / references/api/modules/walkridecommon
Routes: cycling bikingSearch、BikingRouteResult references/reference references/api/modules/search / references/api/modules/walkridecommon
Routes: transit transitSearch、masstransitSearch、TransitRouteResult references/reference references/api/modules/search / references/api/modules/walkridecommon
Navigation: walking/cycling engine BDNaviService、NaviType、NaviMode、initializer、init、unInit Walking/Cycling Navigation SDK Development Guide references/api/modules/walkridecommon
Navigation: route planning RoutePlanOption、RouteNodeInfo、IRoutePlanListener、RoutePlanError、displayRoutePlanResult Walking/Cycling Navigation SDK Development Guide references/api/modules/walkridecommon
Navigation: navigation control start、stop、pause、resume、isStart、cancelRoutePlanDisplay、isMultiNaviCreated Walking/Cycling Navigation SDK Development Guide references/api/modules/walkridecommon
Navigation: status monitoring IGuideSubStatusListener、IGuideInfoListener、onRouteFarAway、onArriveDest、onFinalEnd Walking/Cycling Navigation SDK Development Guide references/api/modules/walkridecommon
Navigation: default UI walkRideDefaultUIPage、walkRideUIPageOption、headerGuideShow、naviETAShow、hitTestBehavior Walking/Cycling Navigation SDK Development Guide references/api/modules/walkridecommon
Navigation: simulated navigation MockLocationPlugin、setLocationPlugin、resetLocationPlugin、reloadTrack Walking/Cycling Navigation SDK Development Guide references/api/modules/walkridecommon
Navigation: voice broadcast ITTSPlugin、playTTSText、setTTsPlugin Walking/Cycling Navigation SDK Development Guide references/api/modules/walkridecommon
Tools: distance/area DistanceUtil、AreaUtil、calculateArea、getDistance references/reference references/api/modules/util
Tools: spatial relationships SpatialRelationUtil、isPolygonContainsPoint、getNearestPointFromLine references/reference references/api/modules/util
Tools: coordinate conversion NativeMethods、wgsll2bdll、gcjll2bdll、mc2ll references/reference references/api/modules/base / references/api/modules/util
Other: favorites/share FavoriteManager、ShareUrlSearch、requestRouteShareUrl references/reference / references/reference references/api/modules/map / references/api/modules/search

2. Map display and interaction (module: map)

  • Guide:
    • From references/api/modules/map , find the corresponding map component and controller APIs
    • Choose the appropriate map type: standard map, personalized map, satellite map, custom tile map
    • Configure basic parameters: center point, zoom level, rotation, tilt, compass, scale, location button, and other controls
  • The answer should cover:
    • How to import MapComponent
    • How to obtain onReady in MapController
    • Enable/disable gesture interaction (zoom, pan, rotate, tilt, etc.)
    • Key configuration points for widget visibility and custom styles (if there are specific field names in the documentation, cite them)

3. Overlay drawing (module: map)

  • Focus on the following overlay types (prefer to search in references/api/modules/map for specific interface names):
    • Marker points, point clustering, Marker animation
    • Polyline, arc
    • Polygon/area
    • Circle
    • Text annotation
    • Ground overlays, prisms, 3D buildings/models
    • Bubble/pop-up/info box/info window
  • General pattern when answering:
    • Point out that the corresponding overlay needs to be added/updated/deleted through the method provided by MapController .
    • Explain the required parameters (longitude/latitude, color, width, opacity, zIndex, etc.)
    • If complex styles (custom icon) are needed, guide users to consult the corresponding section in the online documentation (Map Overlays section).

4. Search capability (module: search)

  • Classify by requirement:
    • POI search: ordinary place search, supporting keyword, city, and range search
    • AOI search: area polygon information
    • Indoor POI search: POIs inside shopping malls and office buildings
    • Building search: building information
    • Administrative district search: province/city/district boundary data
    • Weather search: current weather, forecasts, etc.
  • When answering, you should:
    • Point out that @bdmap/search or a combination package needs to be installed
    • Guide users to view references/api/modules/search's corresponding interface description
    • Explain synchronous/asynchronous invocation modes (according to the documentation) and how to handle result callbacks/Promises
    • Remind users to pay attention to quota limits and error code handling, and guide them to view the online documentation "Request Status Code Description".

5. Route planning (module: @bdmap/map_walkride_search combination package)

  • Supports:
    • Driving route planning
    • Walking route planning
    • Cycling route planning
    • Transit route planning
    • Intercity transit route planning
  • Suggested answering steps:
    • Clarify the required travel mode (driving/walking/cycling/transit)
    • Prompt to install @bdmap/search and the necessary walking/cycling/transit-related modules or combination packages, for example @bdmap/map_walkride_search
    • In references/api/modules/search、references/api/modules/walkridecommon , find the corresponding API:
      • Typical parameters: origin/destination coordinates / keywords, strategy (shortest time, shortest distance, avoid congestion, etc.), waypoints, etc.
    • In the answer, provide:
      • How to construct the request parameter object
      • How to initiate the route planning call
      • How to parse the route, segments, and coordinate points from the returned result, and draw them on the map (together with the map overlay feature).

Walking/cycling navigation scenario: If the requirement is not only route planning but also involvesreal-time navigation guidance(navigation start/stop, off-route recalculation, default navigation UI, voice broadcast, simulated navigation, etc.), please directly refer to Section 8 "Walking/Cycling Navigation Capabilities" and Walking/Cycling Navigation SDK Development Guide。

6. Utility capabilities and others (module: util / map / search)

  • Capability examples:
    • Distance and area calculation
    • Determining the positional relationship between a point and other shapes (such as whether a point is inside a polygon)
    • Coordinate conversion (such as converting to and from other coordinate systems)
    • Invoking Baidu Map client-related capabilities (as described in the online documentation)
    • Location short address sharing, map favorites, etc.
  • How to answer:
    • Based on the specific requirements, indicate that references/api/modules/util should be used, or the "Tools", "Invoking Baidu Map features", "Location short address sharing" and other sections in the online documentation
    • Briefly explain:
      • Meaning of input parameters
      • Return value structure
      • Common errors and precautions (such as coordinate system requirements).

7. Positioning capability (module: locsdk / @bdmap/locsdk)

This section only provideskey points, for the complete development guide, see:Positioning SDK Development Guide。

  • Applicable scenarios: continuous foreground positioning, single positioning, continuous background positioning, latitude/longitude/address/POI retrieval, etc.
  • Dependencies and installation: uniformly use the project-agreed @bdmap/locsdk version, configure online/offline dependencies according to the guide, and execute ohpm install + build self-check.
  • Privacy and permissions (mandatory): first obtain user privacy consent and runtime positioning permission, then call LocationClient.setAgreePrivacy(true)、LocationClient.checkAuthKey(...), and correctly declare the positioning-related permissions in module.json5 and backgroundModes。
  • Initialization and usage order: follow the order of "privacy compliance → AK authentication → permission request → create LocationClient → register listener → configure LocationClientOption → start positioning"; when the page/business ends, positioning must be stopped and listeners unregistered.
  • Modes and capabilities: choose continuous positioning, single positioning, or background positioning according to the business, and reasonably set parameters such as the coordinate system, time/distance interval, and whether to return address/location description/POI, etc.
  • Result validation and error handling: before use, check isLocSuccess, that the coordinates are not (0,0), and that the accuracy radius is reasonable, and provide feedback on the cause of the error and suggested solutions through Logger + Toast/status text.
  • Performance and compliance: set reasonable frequency and end conditions for continuous/background positioning, transmit sensitive data over HTTPS, and avoid outputting precise coordinates in logs.

8. Walking and cycling navigation capability (module: @bdmap/map_walkride_search combination package)

This section only provideskey points, for the complete development guide, see:Walking and Cycling Navigation SDK Development Guide。

  • Applicable scenarios: walking navigation, cycling navigation, route planning result display, navigation status monitoring, default navigation UI rendering, simulated navigation debugging, etc.
  • Dependencies and installation: use the combination package @bdmap/map_walkride_search(already includes base + map + search + util), and it cannot be mixed with standalone packages.
  • Core classes and interfaces:
    • BDNaviService: the main entry point of the navigation service, created via NaviType.WALK / NaviType.RIDE create
    • RoutePlanOption + IRoutePlanListener: route planning parameters and callbacks
    • IGuideSubStatusListener: navigation status monitoring (off-route, approaching/arriving at destination, etc.)
    • IGuideInfoListener: real-time data such as guidance information, remaining distance/time, speed, etc.
    • ITTSPlugin: Voice broadcast interface
    • walkRideDefaultUIPage: Built-in navigation UI component
    • MockLocationPlugin: Simulated location plugin (for debugging)
  • Initialization sequence:aboutToAppear Register TTS plugin → MapComponent.onReady Get MapController → service.initializer().init(context, mapController)。
  • Navigation control: Route planning succeeded → cancelRoutePlanDisplay() Clear route display → lifecycle().start() Start navigation → after arriving at the destination lifecycle().stop() Stop → when the page is destroyed initializer().unInit() Release the engine.
  • Default UI: When using walkRideDefaultUIPage to render the navigation interface, you must set .hitTestBehavior(HitTestMode.None) to prevent intercepting base map gestures.
  • Coordinate conversion: The SDK uses the Baidu coordinate system (BD09ll); external WGS84/GCJ-02 data must be converted via CoordTrans.wgsToBaidu() / CoordTrans.gcjToBaidu() .
  • Error handling:RoutePlanError provides 20+ error codes; you must wrap them in user-friendly error messages and must not only output logs.

Answer style and output format requirements

When answering questions based on this Skill:

  1. Prefer answering in Chinese, unless English is explicitly requested.
  2. Document retrieval and tool invocation order (mandatory requirement):
    • ✅ When it involves the Baidu Map HarmonyOS SDK (for example, @bdmap/map overlays, info windows/PopView, and other capabilities),you must first read the local documentation:
    • ✅ Only when the local documentation cannot cover it, or when obvious version differences/missing content are found, use web_search to consult the online documentation (such as https://lbsyun.baidu.com/faq/api?title=harmonynextsdk), and state the reference source in the answer.
    • ✅ When citing API names, parameters, enums, etc. in the answer, base them on "local documentation + official online documentation",it is forbidden to fabricate APIs from memory or experience alone。
    • ❌ Before reading the local references/reference / references/api/modules/*.md ,it is forbidden to directly provide specific API usage through online search results(for example, PopView's constructor parameters, event enum names, etc.).
  3. Keep the answer structure as clear as possible; the following order is recommended:
    • Scenario description: First briefly explain which module/capability this is (map display, search, route planning, etc.).
    • Dependencies and permissions: List the ohpm packages that need to be installed and the required permissions.
    • Key steps: Use 3–6 steps to explain the process from initialization to API invocation.
    • Example code: Provide as concise an example as possible (note that it should not conflict with the illustrative code in this Skill description, and should refer to the project's actual API naming).
    • Further reading: Provide the local documentation files that should be checked (such as references/reference corresponding chapters) and online documentation chapters (such as "Map Overlays", "Route Planning", etc.).
  4. Build and coding error self-check (mandatory requirement):
    • After each code change related to the Baidu Map HarmonyOS SDK, execute once in the project root directory ohpm install and hvigorw assembleHap --mode module -p product=default -p buildMode=debug --no-daemon for build and ArkTSCheck self-check.
    • If the build reports an error, you need to trace back based on the error message and fix the coding issues introduced by this change; if it is an environment/toolchain issue, clearly distinguish it in the answer and provide handling suggestions. For the detailed process, see:Build and Coding Error Self-Check Specification。

Resource Files

  • Image Resources:assets.md, for images in generated code, prioritize using the provided image resources

Reference Documentation

When using this Skill,always prioritize combining local documentation, package declaration files, and online official documentation:

  • Local Documentation (this project):
  • Development Guide (this project):
  • Package Declaration Files:
    • Prerequisite, checkentry/oh-package.json5whether the references in it have already been installed; if not installed, they need to be installed viaohpm installinstall, and record the package name and version number
    • Look up class/interface names in declaration files: Use grep (or IDE global search) to search for: "class MapOptions", with the scope limited to oh_modules/@bdmap/map/src/main/ets/.
    • When the specific path is uncertain, uniformly recommend following the path @bdmap/xxx/Index.d.ets -> target .d.ets, and do not rummage directly through a large number of obfuscated files:
      • First search the current project'soh_modules/.ohpm/@bdmap+包名@版本号, find the directory
      • Then, continue searching downward for theoh_modules/@bdmap/包名/Index.d.etsfile
      • Finally, from theIndex.d.etsfile, internally search for the type name and view its definition
      • (Example) Look up {MapController} from '@bdmap/map''sMapControllerdefinition, locate theoh_modules/.ohpm/@bdmap+map@2.0.3/oh_modules/@bdmap/map/Index.d.etsfile in the current project, and find thatMapControllerisIndex.d.etsthe relative path of./src/main/ets/lbsmapsdk/e/g, then through theoh_modules/.ohpm/@bdmap+map@2.0.3/oh_modules/@bdmap/map/src/main/ets/lbsmapsdk/e/g.d.etsfile, you can findMapController's definition;
  • Online Official Documentation (consult when more detailed API, enum, and parameter descriptions are needed):
    • HarmonyNEXT Map SDK overview and development guide:https://lbsyun.baidu.com/faq/api?title=harmonynextsdk

When there are differences between local documentation and online documentation, takeonline official documentationas authoritative, but state in the answer which type of documentation was referenced.