### gotoBaiduMapRoute(context, fromLatitude, fromLongitude, toLatitude, toLongitude, ...) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map-route.html Launches Baidu Map for route planning between a specific starting point and a destination. ```APIDOC ## fun gotoBaiduMapRoute(context: Context, fromLatitude: Double?, fromLongitude: Double?, toLatitude: Double, toLongitude: Double, coordinateType: String, mode: Int, source: String, isMarket: Boolean, marketPackage: String?): Boolean ### Description Launches the Baidu Map application to plan a route between a specific starting coordinate and a destination coordinate. If fromLatitude or fromLongitude are null, the current location is used. ### Parameters - **context** (Context) - Required - The application context. - **fromLatitude** (Double?) - Optional - Starting latitude; null indicates current location. - **fromLongitude** (Double?) - Optional - Starting longitude; null indicates current location. - **toLatitude** (Double) - Required - The destination latitude. - **toLongitude** (Double) - Required - The destination longitude. - **coordinateType** (String) - Optional - The coordinate system (default: CoordinateType.GCJ02). - **mode** (Int) - Optional - Travel mode (default: TripMode.DRIVING_MODE). - **source** (String) - Optional - Statistical source. - **isMarket** (Boolean) - Optional - Whether to redirect to an app market if Baidu Map is not installed. - **marketPackage** (String?) - Optional - Specific app market package name. ### Returns - **Boolean** - Returns true if the intent was successfully launched, false otherwise. ``` -------------------------------- ### gotoTencentMapRoute(context: Context, fromLatitude: Double?, fromLongitude: Double?, toLatitude: Double, toLongitude: Double, mode: Int, referer: String, isMarket: Boolean, marketPackage: String?) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-tencent-map-route.html Launches the Tencent Map application to display route planning based on the provided coordinates and travel mode. ```APIDOC ## gotoTencentMapRoute ### Description Navigates to the Tencent Map application to perform route planning. If the starting coordinates are null, the current location is used. ### Signature `fun gotoTencentMapRoute(context: Context, fromLatitude: Double?, fromLongitude: Double?, toLatitude: Double, toLongitude: Double, mode: Int = TripMode.DRIVING_MODE, referer: String = DEFAULT_REFERER, isMarket: Boolean = false, marketPackage: String? = null): Boolean` ### Parameters - **context** (Context) - The application context. - **fromLatitude** (Double?) - Starting latitude; null indicates current location. - **fromLongitude** (Double?) - Starting longitude; null indicates current location. - **toLatitude** (Double) - Destination latitude. - **toLongitude** (Double) - Destination longitude. - **mode** (Int) - Travel mode. Defaults to TripMode.DRIVING_MODE. Options: TripMode.DRIVING_MODE (Driving), TripMode.TRANSIT_MODE (Transit), TripMode.WALKING_MODE (Walking), TripMode.RIDING_MODE (Riding). - **referer** (String) - AppKey for Tencent Map developers. Defaults to DEFAULT_REFERER. - **isMarket** (Boolean) - Whether to redirect to an app market if Tencent Map is not installed. Defaults to false. - **marketPackage** (String?) - Specific app market package name to use if isMarket is true. ### Returns - **Boolean** - Returns true if the intent was successfully launched, false otherwise. ``` -------------------------------- ### gotoTencentMap(context: Context, toLatitude: Double, toLongitude: Double, referer: String, isMarket: Boolean, marketPackage: String?) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-tencent-map.html Launches the Tencent Map application to perform route planning to a specified destination. ```APIDOC ## gotoTencentMap ### Description Launches the Tencent Map application for route planning. It supports specifying the destination coordinates and optional parameters for app market redirection if the app is not installed. ### Signature `fun gotoTencentMap(context: Context, toLatitude: Double, toLongitude: Double, referer: String = DEFAULT_REFERER, isMarket: Boolean = false, marketPackage: String? = null): Boolean` ### Parameters - **context** (Context) - Required - The application context. - **toLatitude** (Double) - Required - The destination latitude. - **toLongitude** (Double) - Required - The destination longitude. - **referer** (String) - Optional - The AppKey registered with Tencent Map developers (default: DEFAULT_REFERER). - **isMarket** (Boolean) - Optional - Whether to redirect to an app market if Tencent Map is not installed (default: false). - **marketPackage** (String?) - Optional - The package name of a specific app market to redirect to (default: null). ### Returns - **Boolean** - Returns true if the intent was successfully launched, false otherwise. ``` -------------------------------- ### gotoAMapNavigation(context: Context, toLatitude: Double, toLongitude: Double, isWGS84: Boolean, source: String, isMarket: Boolean, marketPackage: String?) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-a-map-navigation.html Launches the AMap navigation application. Returns true if the navigation intent was successfully initiated. ```APIDOC ## gotoAMapNavigation ### Description Launches the AMap navigation application to navigate to the specified destination coordinates. Supports coordinate system selection and optional redirection to an app market if AMap is not installed. ### Signature `fun gotoAMapNavigation(context: Context, toLatitude: Double, toLongitude: Double, isWGS84: Boolean = false, source: String = "amap", isMarket: Boolean = false, marketPackage: String? = null): Boolean` ### Parameters - **context** (Context) - The application context. - **toLatitude** (Double) - The destination latitude. - **toLongitude** (Double) - The destination longitude. - **isWGS84** (Boolean) - If true, uses WGS84 GPS coordinates; if false, uses GCJ02 (Mars) coordinates. Default is false. - **source** (String) - The name of the calling application. Default is "amap". - **isMarket** (Boolean) - Whether to redirect to an app market if AMap is not installed. Default is false. - **marketPackage** (String?) - The package name of a specific app market to redirect to. Default is null. ### Returns - **Boolean** - Returns true if the navigation intent was successfully triggered. ``` -------------------------------- ### gotoBaiduMapRoute(context, toLatitude, toLongitude, ...) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map-route.html Launches Baidu Map for route planning from the current location to a specified destination. ```APIDOC ## fun gotoBaiduMapRoute(context: Context, toLatitude: Double, toLongitude: Double, coordinateType: String, mode: Int, source: String, isMarket: Boolean, marketPackage: String?): Boolean ### Description Launches the Baidu Map application to plan a route from the user's current location to the specified destination coordinates. ### Parameters - **context** (Context) - Required - The application context. - **toLatitude** (Double) - Required - The destination latitude. - **toLongitude** (Double) - Required - The destination longitude. - **coordinateType** (String) - Optional - The coordinate system (default: CoordinateType.GCJ02). Supported: GCJ02, WGS84, BD09LL, BD09MC. - **mode** (Int) - Optional - Travel mode (default: TripMode.DRIVING_MODE). Supported: DRIVING_MODE, TRANSIT_MODE, WALKING_MODE, RIDING_MODE. - **source** (String) - Optional - Statistical source, defaults to current package name. - **isMarket** (Boolean) - Optional - Whether to redirect to an app market if Baidu Map is not installed (default: false). - **marketPackage** (String?) - Optional - Specific app market package name to use for redirection. ### Returns - **Boolean** - Returns true if the intent was successfully launched, false otherwise. ``` -------------------------------- ### Configuration Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/index.html Global configuration for map helper utilities. ```APIDOC ## setTencentMapDefaultReferer(referer: String) Sets the default AppKey/Referer used for Tencent Map API requests. ``` -------------------------------- ### gotoGoogleMap(context: Context, toLatitude: Double, toLongitude: Double, isMarket: Boolean, marketPackage: String?) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-google-map.html Navigates to Google Maps using the provided coordinates. Supports optional redirection to an app store if Google Maps is missing. ```APIDOC ## gotoGoogleMap ### Description Navigates to Google Maps for the specified destination coordinates. Provides an option to redirect to an app store if the Google Maps application is not installed on the device. ### Signature `fun gotoGoogleMap(context: Context, toLatitude: Double, toLongitude: Double, isMarket: Boolean = false, marketPackage: String? = null): Boolean` ### Parameters - **context** (Context) - The application context. - **toLatitude** (Double) - The destination latitude. - **toLongitude** (Double) - The destination longitude. - **isMarket** (Boolean) - Optional. Whether to redirect to an app market if the target app is not installed. Defaults to false. - **marketPackage** (String?) - Optional. The specific package name of the app market to redirect to. Defaults to null. ### Returns - **Boolean** - Returns true if the navigation intent was successfully triggered, false otherwise. ``` -------------------------------- ### gotoAMapRoute(context, fromLatitude, fromLongitude, toLatitude, toLongitude, isWGS84, mode, source, isMarket, marketPackage) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-a-map-route.html Navigates to AMap route planning with specified origin and destination. ```APIDOC ## gotoAMapRoute(context: Context, fromLatitude: Double?, fromLongitude: Double?, toLatitude: Double, toLongitude: Double, isWGS84: Boolean, mode: Int, source: String, isMarket: Boolean, marketPackage: String?) ### Description Triggers the AMap application to perform route planning from a specified origin to a destination. If origin coordinates are null, the current location is used. ### Parameters - **context** (Context) - The application context. - **fromLatitude** (Double?) - Origin latitude (null for current location). - **fromLongitude** (Double?) - Origin longitude (null for current location). - **toLatitude** (Double) - Destination latitude. - **toLongitude** (Double) - Destination longitude. - **isWGS84** (Boolean) - If true, uses WGS84 coordinate system; if false, uses GCJ02. - **mode** (Int) - Travel mode (DRIVING_MODE, TRANSIT_MODE, WALKING_MODE, RIDING_MODE). - **source** (String) - Name of the calling application. - **isMarket** (Boolean) - Whether to redirect to an app market if AMap is not installed. - **marketPackage** (String?) - Specific package name for the app market. ### Returns - **Boolean** - Returns true if the intent was successfully launched. ``` -------------------------------- ### gotoAMapRoute(context, toLatitude, toLongitude, isWGS84, mode, source, isMarket, marketPackage) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-a-map-route.html Navigates to AMap route planning with a specified destination. ```APIDOC ## gotoAMapRoute(context: Context, toLatitude: Double, toLongitude: Double, isWGS84: Boolean, mode: Int, source: String, isMarket: Boolean, marketPackage: String?) ### Description Triggers the AMap application to perform route planning to a specified destination coordinate. ### Parameters - **context** (Context) - The application context. - **toLatitude** (Double) - Destination latitude. - **toLongitude** (Double) - Destination longitude. - **isWGS84** (Boolean) - If true, uses WGS84 coordinate system; if false, uses GCJ02. - **mode** (Int) - Travel mode (DRIVING_MODE, TRANSIT_MODE, WALKING_MODE, RIDING_MODE). - **source** (String) - Name of the calling application. - **isMarket** (Boolean) - Whether to redirect to an app market if AMap is not installed. - **marketPackage** (String?) - Specific package name for the app market. ### Returns - **Boolean** - Returns true if the intent was successfully launched. ``` -------------------------------- ### Configure MapHelper Dependencies Source: https://jenly1314.github.io/MapHelper Add the repository and dependency to your Gradle build files to integrate the library. ```gradle repositories { //... mavenCentral() } ``` ```gradle implementation 'com.github.jenly1314:maphelper:1.2.0' ``` -------------------------------- ### LatLng(latitude: Double, longitude: Double) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-lat-lng/-lat-lng.html Initializes a new instance of the LatLng class with the specified latitude and longitude. ```APIDOC ## LatLng(latitude: Double, longitude: Double) ### Description Creates a new LatLng object representing a geographical location. ### Parameters - **latitude** (Double) - The latitude coordinate. - **longitude** (Double) - The longitude coordinate. ``` -------------------------------- ### LatLng(latitude: Double, longitude: Double) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-lat-lng/index.html Constructor for creating a new LatLng instance with specified latitude and longitude. ```APIDOC ## Constructor ### Signature `LatLng(latitude: Double, longitude: Double)` ### Description Creates a new instance of LatLng representing a geographic coordinate. ### Parameters - **latitude** (Double) - The latitude coordinate. - **longitude** (Double) - The longitude coordinate. ``` -------------------------------- ### gotoAMap(context: Context, toLatitude: Double, toLongitude: Double, isWGS84: Boolean, source: String, isRoute: Boolean, isMarket: Boolean, marketPackage: String?) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-a-map.html Navigates to the Amap application for route planning or navigation based on provided coordinates. ```APIDOC ## gotoAMap ### Description 跳转到高德地图进行导航或路线规划。 ### Signature `fun gotoAMap(context: Context, toLatitude: Double, toLongitude: Double, isWGS84: Boolean = false, source: String = "amap", isRoute: Boolean, isMarket: Boolean = false, marketPackage: String? = null): Boolean` ### Parameters - **context** (Context) - Required - 上下文对象 - **toLatitude** (Double) - Required - 终点纬度 - **toLongitude** (Double) - Required - 终点经度 - **isWGS84** (Boolean) - Optional - 为true表示使用GPS原始坐标系:wgs84,为false表示使用火星坐标系:gcj02 - **source** (String) - Optional - 第三方调用应用名称,默认为:amap - **isRoute** (Boolean) - Required - 为true表示跳转到地图路线规划,为false表示跳转到导航 - **isMarket** (Boolean) - Optional - 当检测到未安装目标App时,是否跳转到应用市场,默认为false - **marketPackage** (String?) - Optional - 当跳转到应用市场时,指定具体的应用市场包名,默认为空 ### Returns - **Boolean** - 返回操作是否成功 ``` -------------------------------- ### gotoBaiduMap(context: Context, toLatitude: Double, toLongitude: Double, coordinateType: String, source: String, isRoute: Boolean, isMarket: Boolean, marketPackage: String?): Boolean Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map.html Launches the Baidu Map application to perform navigation or route planning based on the provided coordinates. ```APIDOC ## gotoBaiduMap ### Description Launches the Baidu Map application for navigation or route planning. Returns a boolean indicating if the operation was successful. ### Signature `fun gotoBaiduMap(context: Context, toLatitude: Double, toLongitude: Double, coordinateType: String = CoordinateType.GCJ02, source: String = context.packageName, isRoute: Boolean, isMarket: Boolean = false, marketPackage: String? = null): Boolean` ### Parameters - **context** (Context) - Required - The application context. - **toLatitude** (Double) - Required - The destination latitude. - **toLongitude** (Double) - Required - The destination longitude. - **coordinateType** (String) - Optional - The coordinate system type (default: CoordinateType.GCJ02). Supported: GCJ02, WGS84, BD09LL, BD09MC. - **source** (String) - Optional - Statistical source, defaults to the current APK package name. - **isRoute** (Boolean) - Required - If true, navigates to route planning; if false, navigates to navigation. - **isMarket** (Boolean) - Optional - Whether to jump to the app market if Baidu Map is not installed (default: false). - **marketPackage** (String?) - Optional - Specific app market package name to use if isMarket is true. ``` -------------------------------- ### gotoGoogleMapNavigation Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-google-map-navigation.html Initiates navigation to a specific coordinate using Google Maps. ```APIDOC ## gotoGoogleMapNavigation ### Description Navigates to a specified destination using Google Maps. Supports different travel modes and provides an option to redirect to an app store if Google Maps is not installed. ### Signature `fun gotoGoogleMapNavigation(context: Context, toLatitude: Double, toLongitude: Double, mode: Int = TripMode.DRIVING_MODE, isMarket: Boolean = false, marketPackage: String? = null): Boolean` ### Parameters - **context** (Context) - The application context. - **toLatitude** (Double) - The destination latitude. - **toLongitude** (Double) - The destination longitude. - **mode** (Int) - The travel mode. Defaults to TripMode.DRIVING_MODE. Supported modes: TripMode.DRIVING_MODE, TripMode.TRANSIT_MODE, TripMode.WALKING_MODE, TripMode.RIDING_MODE. - **isMarket** (Boolean) - Whether to redirect to an app market if the target app is not installed. Defaults to false. - **marketPackage** (String?) - The package name of the specific app market to use if isMarket is true. Defaults to null. ### Returns - **Boolean** - Returns true if the navigation intent was successfully launched, false otherwise. ``` -------------------------------- ### gotoBaiduMapNavigation(context: Context, toLatitude: Double, toLongitude: Double, coordinateType: String, source: String, isMarket: Boolean, marketPackage: String?): Boolean Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map-navigation.html Initiates navigation to the specified latitude and longitude using the Baidu Map application. ```APIDOC ## gotoBaiduMapNavigation ### Description Launches the Baidu Map application to start navigation to a target destination. Returns a boolean indicating if the navigation intent was successfully triggered. ### Parameters - **context** (Context) - Required - The application context. - **toLatitude** (Double) - Required - The destination latitude. - **toLongitude** (Double) - Required - The destination longitude. - **coordinateType** (String) - Optional - The coordinate system type. Defaults to CoordinateType.GCJ02. Supported: CoordinateType.GCJ02, CoordinateType.WGS84, CoordinateType.BD09LL, CoordinateType.BD09MC. - **source** (String) - Optional - Statistical source identifier. Defaults to the current APK package name. - **isMarket** (Boolean) - Optional - Whether to redirect to an app market if Baidu Map is not installed. Defaults to false. - **marketPackage** (String?) - Optional - The specific package name of the app market to use if isMarket is true. ``` -------------------------------- ### MapHelper Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/index.html A helper object for integrating map services and navigation. ```APIDOC ## MapHelper ### Description An object providing a unified interface for route planning and navigation across various map providers, including Amap, Baidu, Tencent, and Google Maps. ### Signature `object MapHelper` ``` -------------------------------- ### CoordinateType Constants Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map.html Available coordinate system types for map navigation. ```kotlin [CoordinateType.GCJ02] 经国测局加密后的坐标系(火星坐标系) ``` ```kotlin [CoordinateType.WGS84] GPS原始坐标系 ``` ```kotlin [CoordinateType.BD09LL] 百度经纬度坐标系 ``` ```kotlin [CoordinateType.BD09MC] 百度墨卡托坐标系 ``` -------------------------------- ### Invoke MapHelper Navigation and Coordinate Conversion Source: https://jenly1314.github.io/MapHelper Use MapHelper methods to launch specific map applications or perform coordinate system transformations. ```java // 调用相关地图线路/导航示例(params表示一些具体参数) // 跳转到地图(高德、百度、腾讯、谷歌地图等) MapHelper.gotoMap(params) // 跳转到高德地图 MapHelper.gotoAMap(params) // 跳转到百度地图 MapHelper.gotoBaiduMap(params) // 跳转腾讯地图 MapHelper.gotoTencentMap(params) // 跳转到谷歌地图 MapHelper.gotoGoogleMap(params) // 坐标系转换:WGS-84转GCJ-02(火星坐标系) MapHelper.wgs84ToGCJ02(latitude,longitude) // 坐标系转换:GCJ-02(火星坐标系)转WGS-84 MapHelper.gcj02ToWGS84(latitude,longitude) //... ``` -------------------------------- ### gotoMap(context: Context, toLatitude: Double, toLongitude: Double, mapType: Int, isMarket: Boolean, isContainGoogle: Boolean): Boolean Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-map.html Navigates to a map application for route guidance. Returns true if the navigation intent was successfully triggered. ```APIDOC ## gotoMap ### Description Navigates to a map application for route guidance. If the specified map type is not installed, it can optionally redirect to an app store. ### Signature `fun gotoMap(context: Context, toLatitude: Double, toLongitude: Double, mapType: Int = MapType.UNSPECIFIED_MAP_TYPE, isMarket: Boolean = false, isContainGoogle: Boolean = true): Boolean` ### Parameters - **context** (Context) - The application context. - **toLatitude** (Double) - Destination latitude (GCJ-02 coordinate system). - **toLongitude** (Double) - Destination longitude (GCJ-02 coordinate system). - **mapType** (Int) - Map type constant. Defaults to MapType.UNSPECIFIED_MAP_TYPE (prioritizes Amap, Baidu, Tencent, Google). - **isMarket** (Boolean) - Whether to redirect to the app market if the target app is not installed. Defaults to false. - **isContainGoogle** (Boolean) - Whether to include Google Maps in the selection. Defaults to true. ### Returns - **Boolean** - Returns true if the navigation intent was successfully triggered. ### Supported Map Types - **MapType.UNSPECIFIED_MAP_TYPE**: Unspecified map type. - **MapType.AMAP_TYPE**: Amap (Gaode). - **MapType.BAIDU_MAP_TYPE**: Baidu Map. - **MapType.TENCENT_MAP_TYPE**: Tencent Map. - **MapType.GOOGLE_MAP_TYPE**: Google Maps. ``` -------------------------------- ### Define MapHelper Object Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/index.html A singleton utility object for managing map-related route planning and navigation across multiple providers. ```kotlin object MapHelper ``` -------------------------------- ### setTencentMapDefaultReferer(referer: String) Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/set-tencent-map-default-referer.html Sets the default AppKey for Tencent Map. ```APIDOC ## setTencentMapDefaultReferer ### Description Sets the default AppKey used by the Tencent Map service. ### Signature `@JvmStatic fun setTencentMapDefaultReferer(referer: String)` ### Parameters - **referer** (String) - The AppKey obtained from the Tencent Map developer console. ``` -------------------------------- ### Coordinate Conversion Methods Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/index.html Methods for converting between different geographic coordinate systems. ```APIDOC ## bd09llToGCJ02(latitude: Double, longitude: Double): LatLng Converts BD-09ll coordinates to GCJ-02. ## gcj02ToBD09LL(latitude: Double, longitude: Double): LatLng Converts GCJ-02 coordinates to BD-09LL. ## gcj02ToWGS84(latitude: Double, longitude: Double): LatLng Converts GCJ-02 coordinates to WGS-84. ## wgs84ToGCJ02(latitude: Double, longitude: Double): LatLng Converts WGS-84 coordinates to GCJ-02. ``` -------------------------------- ### Properties Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-lat-lng/index.html Accessors for the latitude and longitude properties. ```APIDOC ## Properties - **latitude** (Double): The latitude value. - **longitude** (Double): The longitude value. ``` -------------------------------- ### TripMode Constants for Google Maps Navigation Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-google-map-navigation.html Available travel modes for navigation, defining how the route is calculated. ```kotlin [TripMode.DRIVING_MODE] 驾车模式 ``` ```kotlin [TripMode.TRANSIT_MODE] 公交模式 ``` ```kotlin [TripMode.WALKING_MODE] 步行模式 ``` ```kotlin [TripMode.RIDING_MODE] 骑行模式 ``` -------------------------------- ### Map Navigation and Routing Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/index.html Methods to trigger navigation or route planning in external map applications. ```APIDOC ## gotoAMap / gotoAMapNavigation / gotoAMapRoute Launches Amap for navigation or route planning. Supports parameters for destination coordinates, coordinate system, and market fallback. ## gotoBaiduMap / gotoBaiduMapNavigation / gotoBaiduMapRoute Launches Baidu Map for navigation or route planning. Requires coordinate type specification. ## gotoGoogleMap / gotoGoogleMapNavigation Launches Google Maps for navigation. ## gotoTencentMap / gotoTencentMapRoute Launches Tencent Map for navigation or route planning. Requires a referer (AppKey). ## gotoMap Generic method to launch an available map application based on the specified MapType. ``` -------------------------------- ### MapType Constants Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-map.html Constants representing different map types available for navigation. ```kotlin [MapType.UNSPECIFIED_MAP_TYPE] 不指定地图类型 ``` ```kotlin [MapType.AMAP_TYPE] 高德地图类型 ``` ```kotlin [MapType.BAIDU_MAP_TYPE] 百度地图类型 ``` ```kotlin [MapType.TENCENT_MAP_TYPE] 腾讯地图类型 ``` ```kotlin [MapType.GOOGLE_MAP_TYPE] 谷歌地图类型 ``` -------------------------------- ### LatLng Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/index.html A data class representing geographic coordinates with latitude and longitude. ```APIDOC ## LatLng ### Description A data class representing geographic coordinates (latitude and longitude) that implements Parcelable. ### Signature `data class LatLng(val latitude: Double, val longitude: Double) : Parcelable` ``` -------------------------------- ### Define LatLng Data Class Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/index.html Represents geographic coordinates using latitude and longitude, implementing Parcelable for Android serialization. ```kotlin data class LatLng(val latitude: Double, val longitude: Double) : Parcelable ``` -------------------------------- ### CoordinateType BD09MC Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map-navigation.html Represents the Baidu Mercator coordinate system. ```kotlin [CoordinateType.BD09MC] 百度墨卡托坐标系 ``` -------------------------------- ### CoordinateType WGS84 Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map-navigation.html Represents the original GPS coordinate system. ```kotlin [CoordinateType.WGS84] GPS原始坐标系 ``` -------------------------------- ### CoordinateType Constants Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/-coordinate-type/index.html The CoordinateType object contains string constants representing supported coordinate systems. ```APIDOC ## CoordinateType ### Description Defines the coordinate system types available for map operations. ### Members - **BD09LL** (String) - Baidu latitude and longitude coordinate system. - **BD09MC** (String) - Baidu Mercator coordinate system. - **GCJ02** (String) - GCJ-02 coordinate system (Mars coordinate system). - **WGS84** (String) - WGS-84 coordinate system (GPS raw coordinate system). ``` -------------------------------- ### CoordinateType BD09LL Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map-navigation.html Represents the Baidu latitude and longitude coordinate system. ```kotlin [CoordinateType.BD09LL] 百度经纬度坐标系 ``` -------------------------------- ### MapType Constants Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/-map-type/index.html The MapType object contains constants representing various map providers. These values are used to configure the map type. ```APIDOC ## MapType Constants ### Description Defines the available map types supported by the library. ### Constants - **UNSPECIFIED_MAP_TYPE** (Int) - Value: 0. Represents an unspecified map type. - **AMAP_TYPE** (Int) - Value: 1. Represents the AutoNavi (Amap) map type. - **BAIDU_MAP_TYPE** (Int) - Value: 2. Represents the Baidu map type. - **TENCENT_MAP_TYPE** (Int) - Value: 3. Represents the Tencent map type. - **GOOGLE_MAP_TYPE** (Int) - Value: 4. Represents the Google map type. ``` -------------------------------- ### TripMode Constants Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/-trip-mode/index.html The TripMode object contains constants used to specify the mode of transportation for map helper operations. ```APIDOC ## TripMode ### Description Defines the available travel modes for routing calculations. ### Constants - **DRIVING_MODE** (Int): 0 - Represents driving mode. - **RIDING_MODE** (Int): 3 - Represents riding (cycling) mode. - **TRANSIT_MODE** (Int): 1 - Represents public transit mode. - **WALKING_MODE** (Int): 2 - Represents walking mode. ``` -------------------------------- ### CoordinateType GCJ02 Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/goto-baidu-map-navigation.html Represents the GCJ02 coordinate system, which is the Mars coordinate system encrypted by the National Administration of Surveying and Mapping. ```kotlin [CoordinateType.GCJ02] 经国测局加密后的坐标系(火星坐标系) ``` -------------------------------- ### gcj02ToBD09LL(latitude: Double, longitude: Double): LatLng Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/gcj02-to-b-d09-l-l.html Converts GCJ-02 coordinates (Google/Amap) to BD-09LL coordinates (Baidu). ```APIDOC ## gcj02ToBD09LL ### Description Converts coordinates from the GCJ-02 (Mars) coordinate system to the BD-09LL (Baidu) coordinate system. This is typically used for converting data from Google Maps or Amap to Baidu Maps. ### Signature `fun gcj02ToBD09LL(latitude: Double, longitude: Double): LatLng` ### Parameters - **latitude** (Double) - The latitude coordinate. - **longitude** (Double) - The longitude coordinate. ### Returns - **LatLng** - The converted coordinate in the BD-09LL system. ``` -------------------------------- ### bd09llToGCJ02(latitude: Double, longitude: Double): LatLng Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/bd09ll-to-g-c-j02.html Converts Baidu (BD-09ll) coordinates to Mars (GCJ-02) coordinates. ```APIDOC ## bd09llToGCJ02 ### Description Converts coordinates from the Baidu coordinate system (BD-09ll) to the Mars coordinate system (GCJ-02), which is used by services like Google Maps and Amap. ### Signature `fun bd09llToGCJ02(latitude: Double, longitude: Double): LatLng` ### Parameters - **latitude** (Double) - The latitude coordinate to convert. - **longitude** (Double) - The longitude coordinate to convert. ### Returns - **LatLng** - The converted coordinates in the GCJ-02 system. ``` -------------------------------- ### wgs84ToGCJ02(latitude: Double, longitude: Double): LatLng Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/wgs84-to-g-c-j02.html Converts WGS-84 coordinates to GCJ-02 coordinates. ```APIDOC ## wgs84ToGCJ02 ### Description Converts WGS-84 coordinates to GCJ-02 coordinates. ### Signature `fun wgs84ToGCJ02(latitude: Double, longitude: Double): LatLng` ### Parameters - **latitude** (Double) - The latitude coordinate. - **longitude** (Double) - The longitude coordinate. ### Returns - **LatLng** - The converted coordinates in the GCJ-02 system. ``` -------------------------------- ### gcj02ToWGS84(latitude: Double, longitude: Double): LatLng Source: https://jenly1314.github.io/MapHelper/api/maphelper/com.king.map.maphelper/-map-helper/gcj02-to-w-g-s84.html Converts GCJ-02 coordinates to WGS-84 coordinates. ```APIDOC ## gcj02ToWGS84 ### Description Converts a coordinate pair from the GCJ-02 system to the WGS-84 system. ### Signature `fun gcj02ToWGS84(latitude: Double, longitude: Double): LatLng` ### Parameters - **latitude** (Double) - The latitude coordinate. - **longitude** (Double) - The longitude coordinate. ### Returns - **LatLng** - The converted coordinate as a LatLng object. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.