Skip to content

[Android] getMyLocation blocks map #2719

@goinnn

Description

@goinnn

I'm submitting a ... (check one with "x")

  • question
  • any problem or bug report

OS: (check one with "x")

  • Android
  • iOS
  • Browser

cordova information: (run $> cordova plugin list)

cordova-android-firebase-gradle-release 3.0.0 "cordova-android-firebase-gradle-release"
cordova-android-play-services-gradle-release 3.0.0 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
cordova-open-native-settings 1.5.2 "Native settings"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-advanced-http 2.1.1 "Advanced HTTP plugin"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-core-android-extensions 2.0.0 "CoreAndroidExtensions"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filepath 1.5.5 "cordova-plugin-filepath"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps"
cordova-plugin-headercolor 1.0 "HeaderColor"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-localization-strings 3.1.0 "Localization"
cordova-plugin-nativeaudio 3.0.9 "Cordova Native Audio"
cordova-plugin-network-information 2.0.3-dev "Network Information"
cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-transparent-status-bar 1.0.1 "Transparent status bar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-sqlite-storage 3.3.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
cordova-support-google-services 1.1.0 "cordova-support-google-services"
cordova.plugins.diagnostic 5.0.0 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-deeplinks 1.0.20 "Ionic Deeplink Plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-mobile-accessibility 1.0.5-dev "Mobile Accessibility"
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.2.3 "PushPlugin"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

@ionic-native/core : 4.4.0
@ionic-native/google-maps : 4.4.2

Current behavior:
If app call to getMyLocation and the plugin does not get a position (more easy to reproduce the error if you set only GPS in Android settings), block the map and the map does not load more.

map.getMyLocation({ enableHighAccuracy: false, timeout: this.getMyLocationTimeout }, position => { ...});

Expected behavior:
Don't block the map.

Screen capture or video record:

Before: https://www.youtube.com/watch?v=gx2uyxCbn4g
After: https://www.youtube.com/watch?v=k5kfnz3xE7Y

Related code, data or error log (please format your code or data):

Fixing problem:

we-are-Joinup@14fbf82

The problem is onLocationResult is not called if there is not results

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions