鸿蒙开发学习【地图位置服务组件】

简介

移动终端设备已经深入人们日常生活的方方面面,如查看所在城市的天气、新闻轶事、出行打车、旅行导航、运动记录。这些习以为常的活动,都离不开定位用户终端设备的位置。

当用户处于这些丰富的使用场景中时,系统的位置定位能力可以提供实时准确的位置数据。对于开发者,设计基于位置体验的服务,也可以更好的满足用户的需求。

当应用在实现基于设备位置的功能时,如:驾车导航,记录运动轨迹等,可以调用该模块的API接口,完成位置信息的获取

基本概念

位置能力用于确定用户设备在哪里,系统使用位置坐标标示用户设备的位置,并使用多种定位技术提供位置服务,如GNSS定位、基站定位、WLAN/蓝牙定位(基站定位、WLAN/蓝牙定位后续统称“网络定位技术”)。通过这些定位技术,无论用户设备在室内或是户外,都可以准确地确定用户设备的位置。

  • 坐标

    系统以1984年世界大地坐标系统为参考,使用经度、纬度数据描述地球上的一个位置。

  • GNSS定位

    基于全球导航卫星系统,包含:GPS、GLONASS、北斗、Galileo等,通过导航卫星,设备芯片提供的定位算法,来确定设备准确位置。定位过程具体使用哪些定位系统,取决于用户设备的硬件能力。

  • 基站定位

    根据设备当前驻网基站和相邻基站的位置,估算设备当前位置。此定位方式的定位结果精度相对较低,并且需要设备可以访问蜂窝网络。

  • WLAN、蓝牙定位

    根据设备可搜索到的周围WLAN、蓝牙设备位置,估算设备当前位置。此定位方式的定位结果精度依赖设备周围可见的固定WLAN、蓝牙设备的分布,密度较高时,精度也相较与基站定位方式更高,同时也需要设备可以访问网络。

图 1 子系统架构图

更多鸿蒙知识更新在gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md参考前往学习。

OpenHarmony高级技能.png

约束

  • 使用设备的位置能力,需要用户进行确认并主动开启位置开关。如果位置开关没有开启,系统不会向任何应用提供位置服务。
  • 设备位置信息属于用户敏感数据,所以即使用户已经开启位置开关,应用在获取设备位置前仍需向用户申请位置访问权限。在用户确认允许后,系统才会向应用提供位置服务。

说明

接口说明

/*

 * Copyright (c) 2022 Huawei Device Co., Ltd.

 * Licensed under the Apache License, Version 2.0 (the "License");

 * you may not use this file except in compliance with the License.

 * You may obtain a copy of the License at

 *

 *     http://www.apache.org/licenses/LICENSE-2.0

 *

 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an "AS IS" BASIS,

 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and

 * limitations under the License.

 */



/**

 * @file

 * @kit LocationKit

 */



import { AsyncCallback, Callback } from './@ohos.base';

import { WantAgent } from './@ohos.wantAgent';



/**

 * Provides interfaces for initiating location requests, ending the location service,

 * and obtaining the location result cached by the system.

 *

 * @namespace geolocation

 * @permission ohos.permission.LOCATION

 * @syscap SystemCapability.Location.Location.Core

 * @since 7

 * @deprecated since 9

 */

declare namespace geolocation {

  /**

   * Subscribe location changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.

   * @param { LocationRequest } request - Indicates the location request parameters.

   * @param { Callback<Location> } callback - Indicates the callback for reporting the location result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.on#event:locationChange

   */

  function on(type: 'locationChange', request: LocationRequest, callback: Callback<Location>): void;



  /**

   * Unsubscribe location changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'locationChange' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<Location> } [callback] - Indicates the callback for reporting the location result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.off#event:locationChange

   */

  function off(type: 'locationChange', callback?: Callback<Location>): void;



  /**

   * Subscribe location switch changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'locationServiceState' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<boolean> } callback - Indicates the callback for reporting the location result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.on#event:locationEnabledChange

   */

  function on(type: 'locationServiceState', callback: Callback<boolean>): void;



  /**

   * Unsubscribe location switch changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'locationServiceState' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<boolean> } [callback] - Indicates the callback for reporting the location result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.off#event:locationEnabledChange

   */

  function off(type: 'locationServiceState', callback?: Callback<boolean>): void;



  /**

   * Subscribe to cache GNSS locations update messages

   *

   * @permission ohos.permission.LOCATION

   * @param { 'cachedGnssLocationsReporting' } type - Indicates the location service event to be subscribed to.

   * @param { CachedGnssLocationsRequest } request - Indicates the cached GNSS locations request parameters.

   * @param { Callback<Array<Location>> } callback - Indicates the callback for reporting the cached GNSS locations.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.on#event:cachedGnssLocationsChange

   */

  function on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, callback: Callback<Array<Location>>): void;



  /**

   * Unsubscribe to cache GNSS locations update messages

   *

   * @permission ohos.permission.LOCATION

   * @param { 'cachedGnssLocationsReporting' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<Array<Location>> } [callback] - Indicates the callback for reporting the cached gnss locations.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.off#event:cachedGnssLocationsChange

   */

  function off(type: 'cachedGnssLocationsReporting', callback?: Callback<Array<Location>>): void;



  /**

   * Subscribe gnss status changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'gnssStatusChange' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<SatelliteStatusInfo> } callback - Indicates the callback for reporting the gnss status change.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.on#event:satelliteStatusChange

   */

  function on(type: 'gnssStatusChange', callback: Callback<SatelliteStatusInfo>): void;



  /**

   * Unsubscribe gnss status changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'gnssStatusChange' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<SatelliteStatusInfo> } [callback] - Indicates the callback for reporting the gnss status change.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.off#event:satelliteStatusChange

   */

  function off(type: 'gnssStatusChange', callback?: Callback<SatelliteStatusInfo>): void;



  /**

   * Subscribe nmea message changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'nmeaMessageChange' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<string> } callback - Indicates the callback for reporting the nmea message.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.on#event:nmeaMessage

   */

  function on(type: 'nmeaMessageChange', callback: Callback<string>): void;



  /**

   * Unsubscribe nmea message changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'nmeaMessageChange' } type - Indicates the location service event to be subscribed to.

   * @param { Callback<string> } [callback] - Indicates the callback for reporting the nmea message.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.off#event:nmeaMessage

   */

  function off(type: 'nmeaMessageChange', callback?: Callback<string>): void;



  /**

   * Add a geofence and subscribe geo fence status changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'fenceStatusChange' } type - Indicates the location service event to be subscribed to.

   * @param { GeofenceRequest } request - Indicates the Geo-fence configuration parameters.

   * @param { WantAgent } want - Indicates which ability to start when the geofence event is triggered.

   * @syscap SystemCapability.Location.Location.Geofence

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.on#event:gnssFenceStatusChange

   */

  function on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void;



  /**

   * Remove a geofence and unsubscribe geo fence status changed

   *

   * @permission ohos.permission.LOCATION

   * @param { 'fenceStatusChange' } type - Indicates the location service event to be subscribed to.

   * @param { GeofenceRequest } request - Indicates the Geo-fence configuration parameters.

   * @param { WantAgent } want - Indicates which ability to start when the geofence event is triggered.

   * @syscap SystemCapability.Location.Location.Geofence

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.off#event:gnssFenceStatusChange

   */

  function off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent): void;



  /**

   * Obtain current location

   *

   * @permission ohos.permission.LOCATION

   * @param { CurrentLocationRequest } request - Indicates the location request parameters.

   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getCurrentLocation

   */

  function getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback<Location>): void;



  /**

   * Obtain current location

   *

   * @permission ohos.permission.LOCATION

   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getCurrentLocation

   */

  function getCurrentLocation(callback: AsyncCallback<Location>): void;



  /**

   * Obtain current location

   *

   * @permission ohos.permission.LOCATION

   * @param { CurrentLocationRequest } [request] - Indicates the location request parameters.

   * @returns { Promise<Location> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getCurrentLocation

   */

  function getCurrentLocation(request?: CurrentLocationRequest): Promise<Location>;



  /**

   * Obtain last known location

   *

   * @permission ohos.permission.LOCATION

   * @param { AsyncCallback<Location> } callback - Indicates the callback for reporting the location result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getLastLocation

   */

  function getLastLocation(callback: AsyncCallback<Location>): void;



  /**

   * Obtain last known location

   *

   * @permission ohos.permission.LOCATION

   * @returns { Promise<Location> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getLastLocation

   */

  function getLastLocation(): Promise<Location>;



  /**

   * Obtain current location switch status

   *

   * @permission ohos.permission.LOCATION

   * @param { AsyncCallback<boolean> } callback - Indicates the callback for reporting the location switch result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.isLocationEnabled

   */

  function isLocationEnabled(callback: AsyncCallback<boolean>): void;



  /**

   * Obtain current location switch status

   *

   * @permission ohos.permission.LOCATION

   * @returns { Promise<boolean> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.isLocationEnabled

   */

  function isLocationEnabled(): Promise<boolean>;



  /**

   * Request enable location

   *

   * @permission ohos.permission.LOCATION

   * @param { AsyncCallback<boolean> } callback - Indicates the callback for reporting the location switch status.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   */

  function requestEnableLocation(callback: AsyncCallback<boolean>): void;



  /**

   * Request enable location

   *

   * @permission ohos.permission.LOCATION

   * @returns { Promise<boolean> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   */

  function requestEnableLocation(): Promise<boolean>;



  /**

   * Obtain address info from location

   *

   * @permission ohos.permission.LOCATION

   * @param { ReverseGeoCodeRequest } request - Indicates the reverse geocode query parameters.

   * @param { AsyncCallback<Array<GeoAddress>> } callback - Indicates the callback for reporting the address info.

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getAddressesFromLocation

   */

  function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback<Array<GeoAddress>>): void;



  /**

   * Obtain address info from location

   *

   * @permission ohos.permission.LOCATION

   * @param { ReverseGeoCodeRequest } request - Indicates the reverse geocode query parameters.

   * @returns { Promise<Array<GeoAddress>> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getAddressesFromLocation

   */

  function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise<Array<GeoAddress>>;



  /**

   * Obtain latitude and longitude info from location address

   *

   * @permission ohos.permission.LOCATION

   * @param { GeoCodeRequest } request - Indicates the geocode query parameters.

   * @param { AsyncCallback<Array<GeoAddress>> } callback - Indicates the callback for reporting the latitude and longitude result.

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getAddressesFromLocationName

   */

  function getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback<Array<GeoAddress>>): void;



  /**

   * Obtain latitude and longitude info from location address

   *

   * @permission ohos.permission.LOCATION

   * @param { GeoCodeRequest } request - Indicates the geocode query parameters.

   * @returns { Promise<Array<GeoAddress>> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getAddressesFromLocationName

   */

  function getAddressesFromLocationName(request: GeoCodeRequest): Promise<Array<GeoAddress>>;



  /**

   * Obtain geocode service status

   *

   * @permission ohos.permission.LOCATION

   * @param { AsyncCallback<boolean> } callback - Indicates the callback for reporting the geocode service status.

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.isGeocoderAvailable

   */

  function isGeoServiceAvailable(callback: AsyncCallback<boolean>): void;



  /**

   * Obtain geocode service status

   *

   * @permission ohos.permission.LOCATION

   * @returns { Promise<boolean> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.isGeocoderAvailable

   */

  function isGeoServiceAvailable(): Promise<boolean>;



  /**

   * Obtain the number of cached GNSS locations reported at a time

   *

   * @permission ohos.permission.LOCATION

   * @param { AsyncCallback<number> } callback - Indicates the callback for reporting the cached GNSS locations size.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getCachedGnssLocationsSize

   */

  function getCachedGnssLocationsSize(callback: AsyncCallback<number>): void;



  /**

   * Obtain the number of cached GNSS locations reported at a time

   *

   * @permission ohos.permission.LOCATION

   * @returns { Promise<number> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.getCachedGnssLocationsSize

   */

  function getCachedGnssLocationsSize(): Promise<number>;



  /**

   * All prepared GNSS locations are returned to the application through the callback function,

   * and the bottom-layer buffer is cleared.

   *

   * @permission ohos.permission.LOCATION

   * @param { AsyncCallback<boolean> } callback - Indicates the callback for reporting the result.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.flushCachedGnssLocations

   */

  function flushCachedGnssLocations(callback: AsyncCallback<boolean>): void;



  /**

   * All prepared GNSS locations are returned to the application through the callback function,

   * and the bottom-layer buffer is cleared.

   *

   * @permission ohos.permission.LOCATION

   * @returns { Promise<boolean> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.flushCachedGnssLocations

   */

  function flushCachedGnssLocations(): Promise<boolean>;



  /**

   * Send extended commands to location subsystem.

   *

   * @permission ohos.permission.LOCATION

   * @param { LocationCommand } command - Indicates the extended Command Message Body.

   * @param { AsyncCallback<boolean> } callback - Indicates the callback for reporting the send command result.

   * @syscap SystemCapability.Location.Location.Core

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.sendCommand

   */

  function sendCommand(command: LocationCommand, callback: AsyncCallback<boolean>): void;



  /**

   * Send extended commands to location subsystem.

   *

   * @permission ohos.permission.LOCATION

   * @param { LocationCommand } command - Indicates the extended Command Message Body.

   * @returns { Promise<boolean> } The promise returned by the function.

   * @syscap SystemCapability.Location.Location.Core

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.sendCommand

   */

  function sendCommand(command: LocationCommand): Promise<boolean>;



  /**

   * Satellite status information

   *

   * @interface SatelliteStatusInfo

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.SatelliteStatusInfo

   */

  export interface SatelliteStatusInfo {

    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    satellitesNumber: number;



    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    satelliteIds: Array<number>;



    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    carrierToNoiseDensitys: Array<number>;



    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    altitudes: Array<number>;



    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    azimuths: Array<number>;



    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    carrierFrequencies: Array<number>;

  }



  /**

   * Parameters for requesting to report cache location information

   *

   * @interface CachedGnssLocationsRequest

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Gnss

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.CachedGnssLocationsRequest

   */

  export interface CachedGnssLocationsRequest {

    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    reportingPeriodSec: number;



    /**

     * @syscap SystemCapability.Location.Location.Gnss

     * @since 8

     * @deprecated since 9

     */

    wakeUpCacheQueueFull: boolean;

  }



  /**

   * Configuring parameters in geo fence requests

   *

   * @interface GeofenceRequest

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Geofence

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.GeofenceRequest

   */

  export interface GeofenceRequest {

    /**

     * @syscap SystemCapability.Location.Location.Geofence

     * @since 8

     * @deprecated since 9

     */

    priority: LocationRequestPriority;



    /**

     * @syscap SystemCapability.Location.Location.Geofence

     * @since 8

     * @deprecated since 9

     */

    scenario: LocationRequestScenario;



    /**

     * @syscap SystemCapability.Location.Location.Geofence

     * @since 8

     * @deprecated since 9

     */

    geofence: Geofence;

  }



  /**

   * Configuring parameters in geo fence requests

   *

   * @interface Geofence

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Geofence

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.Geofence

   */

  export interface Geofence {

    /**

     * @syscap SystemCapability.Location.Location.Geofence

     * @since 8

     * @deprecated since 9

     */

    latitude: number;



    /**

     * @syscap SystemCapability.Location.Location.Geofence

     * @since 8

     * @deprecated since 9

     */

    longitude: number;



    /**

     * @syscap SystemCapability.Location.Location.Geofence

     * @since 8

     * @deprecated since 9

     */

    radius: number;



    /**

     * @syscap SystemCapability.Location.Location.Geofence

     * @since 8

     * @deprecated since 9

     */

    expiration: number;

  }



  /**

   * Configuring parameters in reverse geocode requests

   *

   * @interface ReverseGeoCodeRequest

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.ReverseGeoCodeRequest

   */

  export interface ReverseGeoCodeRequest {

    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    locale?: string;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    latitude: number;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    longitude: number;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    maxItems?: number;

  }



  /**

   * Configuring parameters in geocode requests

   *

   * @interface GeoCodeRequest

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.GeoCodeRequest

   */

  export interface GeoCodeRequest {

    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    locale?: string;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    description: string;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    maxItems?: number;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    minLatitude?: number;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    minLongitude?: number;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    maxLatitude?: number;



    /**

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    maxLongitude?: number;

  }



  /**

   * Data struct describes geographic locations.

   *

   * @interface GeoAddress

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Geocoder

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.GeoAddress

   */

  export interface GeoAddress {

    /**

     * Indicates latitude information.

     * A positive value indicates north latitude,

     * and a negative value indicates south latitude.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    latitude?: number;



    /**

     * Indicates longitude information.

     * A positive value indicates east longitude ,

     * and a negative value indicates west longitude .

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    longitude?: number;



    /**

     * Indicates language used for the location description.

     * zh indicates Chinese, and en indicates English.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    locale?: string;



    /**

     * Indicates landmark of the location.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    placeName?: string;



    /**

     * Indicates country code.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    countryCode?: string;



    /**

     * Indicates country name.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    countryName?: string;



    /**

     * Indicates administrative region name.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    administrativeArea?: string;



    /**

     * Indicates sub-administrative region name.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    subAdministrativeArea?: string;



    /**

     * Indicates locality information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    locality?: string;



    /**

     * Indicates sub-locality information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    subLocality?: string;



    /**

     * Indicates road name.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    roadName?: string;



    /**

     * Indicates auxiliary road information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    subRoadName?: string;



    /**

     * Indicates house information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    premises?: string;



    /**

     * Indicates postal code.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    postalCode?: string;



    /**

     * Indicates phone number.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    phoneNumber?: string;



    /**

     * Indicates website URL.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    addressUrl?: string;



    /**

     * Indicates additional information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    descriptions?: Array<string>;



    /**

     * Indicates the amount of additional descriptive information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Geocoder

     * @since 7

     * @deprecated since 9

     */

    descriptionsSize?: number;

  }



  /**

   * Configuring parameters in location requests

   *

   * @interface LocationRequest

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.LocationRequest

   */

  export interface LocationRequest {

    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    priority?: LocationRequestPriority;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    scenario?: LocationRequestScenario;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    timeInterval?: number;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    distanceInterval?: number;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    maxAccuracy?: number;

  }



  /**

   * Configuring parameters in current location requests

   *

   * @interface CurrentLocationRequest

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.CurrentLocationRequest

   */

  export interface CurrentLocationRequest {

    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    priority?: LocationRequestPriority;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    scenario?: LocationRequestScenario;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    maxAccuracy?: number;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    timeoutMs?: number;

  }



  /**

   * Provides information about geographic locations

   *

   * @interface Location

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.Location

   */

  export interface Location {

    /**

     * Indicates latitude information.

     * A positive value indicates north latitude,

     * and a negative value indicates south latitude.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    latitude: number;



    /**

     * Indicates Longitude information.

     * A positive value indicates east longitude ,

     * and a negative value indicates west longitude .

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    longitude: number;



    /**

     * Indicates location altitude, in meters.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    altitude: number;



    /**

     * Indicates location accuracy, in meters.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    accuracy: number;



    /**

     * Indicates speed, in m/s.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    speed: number;



    /**

     * Indicates location timestamp in the UTC format.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    timeStamp: number;



    /**

     * Indicates direction information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    direction: number;



    /**

     * Indicates location timestamp since boot.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    timeSinceBoot: number;



    /**

     * Indicates additional information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    additions?: Array<string>;



    /**

     * Indicates the amount of additional descriptive information.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    additionSize?: number;

  }



  /**

   * Enum for location priority

   *

   * @permission ohos.permission.LOCATION

   * @enum { number }

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.LocationRequestPriority

   */

  export enum LocationRequestPriority {

    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    UNSET = 0x200,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    ACCURACY,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    LOW_POWER,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    FIRST_FIX

  }



  /**

   * Enum for location scenario

   *

   * @permission ohos.permission.LOCATION

   * @enum { number }

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.LocationRequestScenario

   */

  export enum LocationRequestScenario {

    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    UNSET = 0x300,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    NAVIGATION,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    TRAJECTORY_TRACKING,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    CAR_HAILING,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    DAILY_LIFE_SERVICE,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    NO_POWER

  }



  /**

   * Enum for error code

   *

   * @permission ohos.permission.LOCATION

   * @enum { number }

   * @syscap SystemCapability.Location.Location.Core

   * @since 7

   * @deprecated since 9

   */

  export enum GeoLocationErrorCode {

    /**

     * Indicates input parameter error.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    INPUT_PARAMS_ERROR,



    /**

     * Indicates reverse geocode query failed.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    REVERSE_GEOCODE_ERROR,



    /**

     * Indicates geocode query failed.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    GEOCODE_ERROR,



    /**

     * Indicates positioning failed.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

       * @deprecated since 9

     */

    LOCATOR_ERROR,



    /**

     * Indicates operation failure caused by abnormal location switch.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    LOCATION_SWITCH_ERROR,



    /**

     * Indicates failed to get the last known location.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    LAST_KNOWN_LOCATION_ERROR,



    /**

     * Indicates location request timeout.

     *

     * @permission ohos.permission.LOCATION

     * @syscap SystemCapability.Location.Location.Core

     * @since 7

     * @deprecated since 9

     */

    LOCATION_REQUEST_TIMEOUT_ERROR

  }



  /**

   * Enum for location privacy type

   *

   * @permission ohos.permission.LOCATION

   * @enum { number }

   * @syscap SystemCapability.Location.Location.Core

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.LocationPrivacyType

   */

  export enum LocationPrivacyType {

    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 8

     * @deprecated since 9

     */

    OTHERS = 0,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 8

     * @deprecated since 9

     */

    STARTUP,



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 8

     * @deprecated since 9

     */

    CORE_LOCATION

  }



  /**

   * Location subsystem command structure

   *

   * @interface LocationCommand

   * @permission ohos.permission.LOCATION

   * @syscap SystemCapability.Location.Location.Core

   * @since 8

   * @deprecated since 9

   * @useinstead ohos.geoLocationManager/geoLocationManager.LocationCommand

   */

  export interface LocationCommand {

    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 8

     * @deprecated since 9

     */

    scenario: LocationRequestScenario;



    /**

     * @syscap SystemCapability.Location.Location.Core

     * @since 8

     * @deprecated since 9

     */

    command: string;

  }

}



export default geolocation;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/483911.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

深度解析:Elasticsearch写入请求处理流程

版本 Elasticsearch 8.x 原文链接&#xff1a;https://mp.weixin.qq.com/s/hZ_ZOLFUoRuWyqp47hqCgQ 今天来看下 Elasticsearch 中的写入流程。 不想看过程可以直接跳转文章末尾查看总结部分。最后附上个人理解的一个图。 从我们发出写入请求&#xff0c;到 Elasticsearch 接收请…

应急响应实战笔记03权限维持篇(7)

第7篇&#xff1a;常见WebShell管理工具 攻击者在入侵网站时&#xff0c;通常要通过各种方式写入Webshell&#xff0c;从而获得服务器的控制权限&#xff0c;比如执行系统命令、读取配置文件、窃取用户数据&#xff0c;篡改网站页面等操作。 本文介绍十款常用的Webshell管理工…

图论基础|深度优先dfs、广度优先bfs

dfs 与 bfs 区别 提到深度优先搜索&#xff08;dfs&#xff09;&#xff0c;就不得不说和广度优先搜索&#xff08;bfs&#xff09;有什么区别 先来了解dfs的过程&#xff0c;很多录友可能对dfs&#xff08;深度优先搜索&#xff09;&#xff0c;bfs&#xff08;广度优先搜索…

K8S之DaemonSet控制器

DaemonSet控制器 概念、原理解读、应用场景概述工作原理典型的应用场景介绍DaemonSet 与 Deployment 的区别 解读资源清单文件实践案例 概念、原理解读、应用场景 概述 DaemonSet控制器能够确保K8S集群所有的节点都分别运行一个相同的pod副本&#xff1b; 当集群中增加node节…

【嵌入式】Docker镜像构建指南:引领应用部署的革新之路

&#x1f9d1; 作者简介&#xff1a;阿里巴巴嵌入式技术专家&#xff0c;深耕嵌入式人工智能领域&#xff0c;具备多年的嵌入式硬件产品研发管理经验。 &#x1f4d2; 博客介绍&#xff1a;分享嵌入式开发领域的相关知识、经验、思考和感悟。提供嵌入式方向的学习指导、简历面…

绘制韦恩图

主要源于跟着Cell学作图 | 12.韦恩图(Vennerable包)-CSDN博客&#xff0c;增加了相关数据转换的处理。 韦恩图与upset差异 upset图&#xff1a;多个集合交集可视_upset图r语言代码自定义交集顺序-CSDN博客 rm(list ls()) #构建模型数据 group1 <- rep(c("1",…

AcWing 796. 子矩阵的和

这个题的重点是仿照一维的数组&#xff0c;所以a[N][N]也是从1索引开始的。画个图举个例子就非常清晰了 之所以不好理解是因为没画格子&#xff0c;一个格子代表一个点&#xff0c;就很好理解了。 java代码&#xff1a; import java.io.*; public class Main{static int N 1…

Java为什么是值传递?

Java为什么是值传递&#xff1f; 在我们调用方法的时候&#xff0c;通常会传递参数&#xff0c;那我们到底传递的是对象本身&#xff0c;还是仅仅是对象的拷贝对象呢&#xff1f; 先搞懂两个概念&#xff0c;形参和实参 形参和实参 实参&#xff08;实际参数&#xff0c;Ar…

【热门话题】ECMAScript vs JavaScript:理解两者间的联系与区别

&#x1f308;个人主页: 鑫宝Code &#x1f525;热门专栏: 闲话杂谈&#xff5c; 炫酷HTML | JavaScript基础 ​&#x1f4ab;个人格言: "如无必要&#xff0c;勿增实体" 文章目录 ECMAScript vs JavaScript&#xff1a;理解两者间的联系与区别1. ECMAScript&am…

Java设计模式之单例模式(多种实现方式)

虽然写了很多年代码&#xff0c;但是说真的对设计模式不是很熟练&#xff0c;虽然平时也会用到一些&#xff0c;但是都没有深入研究过&#xff0c;所以趁现在有空练下手 这章主要讲单例模式&#xff0c;也是最简单的一种模式&#xff0c;但是因为spring中bean的广泛应用&#…

车载测试项目实践 USD诊断 CANoe工具使用

本周末2天的时间&#xff0c;可以线下带大家对车载项目&#xff1a; uds诊断进行实操训练和CANoe工具的灵活使用 本博主从事新能源汽车的研发部&#xff0c;主要是嵌入式方面的&#xff0c;对车载测试的底层逻辑非常熟悉。 需要项目或者CANoe工具实操的可以关注并私信我

解决长尾问题,BEV-CLIP:自动驾驶中复杂场景的多模态BEV检索方法

解决长尾问题&#xff0c;BEV-CLIP&#xff1a;自动驾驶中复杂场景的多模态BEV检索方法 理想汽车的工作&#xff0c;原文&#xff0c;BEV-CLIP: Multi-modal BEV Retrieval Methodology for Complex Scene in Autonomous Driving 链接&#xff1a;https://arxiv.org/pdf/2401.…

算法思想总结:位运算

创作不易&#xff0c;感谢三连支持&#xff01;&#xff01; 一、常见的位运算总结 标题 二、位1的个数 . - 力扣&#xff08;LeetCode&#xff09; 利用第七条特性&#xff1a;n&&#xff08;n-1&#xff09;干掉最后一个1&#xff0c;然后每次都用count去统计&#xff…

MySQL数据库的下载和安装以及命令行语法学习

MySQL数据库的下载和安装以及命令行语法学习 学习MYSQL&#xff0c;掌握住基础的SQL句型&#xff08;创建数据库、查看数据库列表、数据增、删、改、查等操作类型&#xff09; 首先要知道MySQL下载和安装方法&#xff1a; 提示&#xff1a;别嫌啰嗦&#xff0c;对于一个初识MY…

vue-cli3中拉取vue-cli2

vue-cli3中拉取vue-cli2 拉取 2.x 模板 (旧版本) Vue CLI > 3 和旧版使用了相同的 vue 命令&#xff0c;所以 Vue CLI 2 (vue-cli) 被覆盖了。如果你仍然需要使用旧版本的 vue init 功能&#xff0c;你可以全局安装一个桥接工具&#xff1a; npm install -g vue/cli-init…

linux源配置:ubuntu、centos;lspci与lsmod命令区别

1、ubuntu源配置 1&#xff09;先查电脑版本型号: lsb_release -c2&#xff09;再编辑源更新&#xff0c;源要与上面型号对应 参考&#xff1a;https://midoq.github.io/2022/05/30/Ubuntu20-04%E6%9B%B4%E6%8D%A2%E5%9B%BD%E5%86%85%E9%95%9C%E5%83%8F%E6%BA%90/ /etc/apt/…

MUNIK第二届功能安全及自动驾驶研讨会将在沪召开

2024年4月26日,由上海秒尼科技术服务有限公司(以下简称“Munik”)联合Parosoft主办的“第二届功能安全及自动驾驶研讨会”将在上海虹桥隆重开幕。 据了解,本次功能与自动驾驶安全研讨会,将聚焦在ISO 26262标准体系下,自动驾驶新形势下各个零部件供应商如何满足功能安全等相关重…

移除和替换任何内容:AI 驱动的图像修复工具 | 开源日报 No.204

Sanster/IOPaint Stars: 15.1k License: Apache-2.0 IOPaint 是一款由 SOTA AI 模型驱动的图像修复工具。 该项目解决了从图片中移除任何不需要的对象、瑕疵或人物&#xff0c;以及擦除和替换图片上任何内容&#xff08;由稳定扩散技术支持&#xff09;的问题。 完全免费且开…

赋能数据收集:从机票网站提取特价优惠的JavaScript技巧

背景介绍 在这个信息时代&#xff0c;数据的收集和分析对于旅游行业至关重要。在竞争激烈的市场中&#xff0c;实时获取最新的机票特价信息能够为旅行者和旅游企业带来巨大的优势。 随着机票价格的频繁波动&#xff0c;以及航空公司和旅行网站不断推出的限时特价优惠&#xff…

【Java - 框架 - HttpClient 5】(01) HttpClient 5 使用详细教程,代码示例 - 快速上手

HttpClient 5 使用详细教程&#xff0c;代码示例 - 快速上手 依赖 【Maven依赖】 <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5 --> <dependency><groupId>org.apache.httpcomponents.client5</groupId>…