Lines Matching refs:geolocation

1 # @ohos.geolocation (位置服务)
44 import geolocation from '@ohos.geolocation';
47 ## geolocation.on('locationChange')<sup>(deprecated)</sup>
73 import geolocation from '@ohos.geolocation';
74 …let requestInfo:geolocation.LocationRequest = {'priority': 0x203, 'scenario': 0x300, 'timeInterval…
75 let locationChange = (location:geolocation.Location):void => {
78 geolocation.on('locationChange', requestInfo, locationChange);
82 ## geolocation.off('locationChange')<sup>(deprecated)</sup>
106 import geolocation from '@ohos.geolocation';
107 …let requestInfo:geolocation.LocationRequest = {'priority': 0x203, 'scenario': 0x300, 'timeInterval…
108 let locationChange = (location:geolocation.Location):void => {
111 geolocation.on('locationChange', requestInfo, locationChange);
112 geolocation.off('locationChange', locationChange);
116 ## geolocation.on('locationServiceState')<sup>(deprecated)</sup>
140 import geolocation from '@ohos.geolocation';
144 geolocation.on('locationServiceState', locationServiceState);
148 ## geolocation.off('locationServiceState')<sup>(deprecated)</sup>
172 import geolocation from '@ohos.geolocation';
176 geolocation.on('locationServiceState', locationServiceState);
177 geolocation.off('locationServiceState', locationServiceState);
181 ## geolocation.on('cachedGnssLocationsReporting')<sup>(deprecated)</sup>
207 import geolocation from '@ohos.geolocation';
208 let cachedLocationsCb = (locations:Array<geolocation.Location>):void => {
211 …let requestInfo:geolocation.CachedGnssLocationsRequest = {'reportingPeriodSec': 10, 'wakeUpCacheQu…
212 geolocation.on('cachedGnssLocationsReporting', requestInfo, cachedLocationsCb);
216 ## geolocation.off('cachedGnssLocationsReporting')<sup>(deprecated)</sup>
241 import geolocation from '@ohos.geolocation';
242 let cachedLocationsCb = (locations:Array<geolocation.Location>):void => {
245 …let requestInfo:geolocation.CachedGnssLocationsRequest = {'reportingPeriodSec': 10, 'wakeUpCacheQu…
246 geolocation.on('cachedGnssLocationsReporting', requestInfo, cachedLocationsCb);
247 geolocation.off('cachedGnssLocationsReporting');
251 ## geolocation.on('gnssStatusChange')<sup>(deprecated)</sup>
276 import geolocation from '@ohos.geolocation';
277 let gnssStatusCb = (satelliteStatusInfo:geolocation.SatelliteStatusInfo):void => {
280 geolocation.on('gnssStatusChange', gnssStatusCb);
284 ## geolocation.off('gnssStatusChange')<sup>(deprecated)</sup>
308 import geolocation from '@ohos.geolocation';
309 let gnssStatusCb = (satelliteStatusInfo:geolocation.SatelliteStatusInfo) => {
312 geolocation.on('gnssStatusChange', gnssStatusCb);
313 geolocation.off('gnssStatusChange', gnssStatusCb);
317 ## geolocation.on('nmeaMessageChange')<sup>(deprecated)</sup>
342 import geolocation from '@ohos.geolocation';
346 geolocation.on('nmeaMessageChange', nmeaCb );
350 ## geolocation.off('nmeaMessageChange')<sup>(deprecated)</sup>
375 import geolocation from '@ohos.geolocation';
379 geolocation.on('nmeaMessageChange', nmeaCb);
380 geolocation.off('nmeaMessageChange', nmeaCb);
384 ## geolocation.on('fenceStatusChange')<sup>(deprecated)</sup>
409 import geolocation from '@ohos.geolocation';
426 …let requestInfo:geolocation.GeofenceRequest = {'priority': 0x201, 'scenario': 0x301, "geofence": {…
427 geolocation.on('fenceStatusChange', requestInfo, wantAgentObj);
432 ## geolocation.off('fenceStatusChange')<sup>(deprecated)</sup>
457 import geolocation from '@ohos.geolocation';
474 …let requestInfo:geolocation.GeofenceRequest = {'priority': 0x201, 'scenario': 0x301, "geofence": {…
475 geolocation.on('fenceStatusChange', requestInfo, wantAgentObj);
476 geolocation.off('fenceStatusChange', requestInfo, wantAgentObj);
481 ## geolocation.getCurrentLocation<sup>(deprecated)</sup>
504 import geolocation from '@ohos.geolocation';
506 …let requestInfo:geolocation.CurrentLocationRequest = {'priority': 0x203, 'scenario': 0x300,'maxAcc…
507 let locationChange = (err:BusinessError.BusinessError, location:geolocation.Location) => {
515 geolocation.getCurrentLocation(requestInfo, locationChange);
519 ## geolocation.getCurrentLocation<sup>(deprecated)</sup>
542 import geolocation from '@ohos.geolocation';
544 let locationChange = (err:BusinessError.BusinessError, location:geolocation.Location):void => {
552 geolocation.getCurrentLocation(locationChange);
556 ## geolocation.getCurrentLocation<sup>(deprecated)</sup>
585 import geolocation from '@ohos.geolocation';
586 …let requestInfo:geolocation.CurrentLocationRequest = {'priority': 0x203, 'scenario': 0x300,'maxAcc…
587 geolocation.getCurrentLocation(requestInfo).then((result) => {
593 ## geolocation.getLastLocation<sup>(deprecated)</sup>
616 import geolocation from '@ohos.geolocation';
617 geolocation.getLastLocation((err, data) => {
628 ## geolocation.getLastLocation<sup>(deprecated)</sup>
651 import geolocation from '@ohos.geolocation';
652 geolocation.getLastLocation().then((result) => {
658 ## geolocation.isLocationEnabled<sup>(deprecated)</sup>
680 import geolocation from '@ohos.geolocation';
681 geolocation.isLocationEnabled((err, data) => {
692 ## geolocation.isLocationEnabled<sup>(deprecated)</sup>
714 import geolocation from '@ohos.geolocation';
715 geolocation.isLocationEnabled().then((result) => {
721 ## geolocation.requestEnableLocation<sup>(deprecated)</sup>
743 import geolocation from '@ohos.geolocation';
744 geolocation.requestEnableLocation((err, data) => {
755 ## geolocation.requestEnableLocation<sup>(deprecated)</sup>
777 import geolocation from '@ohos.geolocation';
778 geolocation.requestEnableLocation().then((result) => {
784 ## geolocation.isGeoServiceAvailable<sup>(deprecated)</sup>
806 import geolocation from '@ohos.geolocation';
807 geolocation.isGeoServiceAvailable((err, data) => {
818 ## geolocation.isGeoServiceAvailable<sup>(deprecated)</sup>
840 import geolocation from '@ohos.geolocation';
841 geolocation.isGeoServiceAvailable().then((result) => {
847 ## geolocation.getAddressesFromLocation<sup>(deprecated)</sup>
870 import geolocation from '@ohos.geolocation';
871 …let reverseGeocodeRequest:geolocation.ReverseGeoCodeRequest = {"latitude": 31.12, "longitude": 121…
872 geolocation.getAddressesFromLocation(reverseGeocodeRequest, (err, data) => {
883 ## geolocation.getAddressesFromLocation<sup>(deprecated)</sup>
911 import geolocation from '@ohos.geolocation';
912 …let reverseGeocodeRequest:geolocation.ReverseGeoCodeRequest = {"latitude": 31.12, "longitude": 121…
913 geolocation.getAddressesFromLocation(reverseGeocodeRequest).then((data) => {
919 ## geolocation.getAddressesFromLocationName<sup>(deprecated)</sup>
942 import geolocation from '@ohos.geolocation';
943 let geocodeRequest:geolocation.GeoCodeRequest = {"description": "上海市浦东新区xx路xx号", "maxItems": 1};
944 geolocation.getAddressesFromLocationName(geocodeRequest, (err, data) => {
955 ## geolocation.getAddressesFromLocationName<sup>(deprecated)</sup>
983 import geolocation from '@ohos.geolocation';
984 let geocodeRequest:geolocation.GeoCodeRequest = {"description": "上海市浦东新区xx路xx号", "maxItems": 1};
985 geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => {
991 ## geolocation.getCachedGnssLocationsSize<sup>(deprecated)</sup>
1014 import geolocation from '@ohos.geolocation';
1015 geolocation.getCachedGnssLocationsSize((err, size) => {
1026 ## geolocation.getCachedGnssLocationsSize<sup>(deprecated)</sup>
1049 import geolocation from '@ohos.geolocation';
1050 geolocation.getCachedGnssLocationsSize().then((result) => {
1056 ## geolocation.flushCachedGnssLocations<sup>(deprecated)</sup>
1079 import geolocation from '@ohos.geolocation';
1080 geolocation.flushCachedGnssLocations((err, result) => {
1091 ## geolocation.flushCachedGnssLocations<sup>(deprecated)</sup>
1114 import geolocation from '@ohos.geolocation';
1115 geolocation.flushCachedGnssLocations().then((result) => {
1121 ## geolocation.sendCommand<sup>(deprecated)</sup>
1145 import geolocation from '@ohos.geolocation';
1146 let requestInfo:geolocation.LocationCommand = {'scenario': 0x301, 'command': "command_1"};
1147 geolocation.sendCommand(requestInfo, (err, result) => {
1158 ## geolocation.sendCommand<sup>(deprecated)</sup>
1187 import geolocation from '@ohos.geolocation';
1188 let requestInfo:geolocation.LocationCommand = {'scenario': 0x301, 'command': "command_1"};
1189 geolocation.sendCommand(requestInfo).then((result) => {