mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 918 forks source link

the application uses ionic v1 can't interactive with map view on only iPhone5 because of resetCSS #2402

Closed lynavis closed 6 years ago

lynavis commented 6 years ago

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

OS: (check one with "x")

cordova information: (run $> cordova plugin list)

call-number 0.0.2 "Cordova Call Number Plugin"
com-sarriaroman-photoviewer 1.1.16 "PhotoViewer"
com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-advanced-http2 1.6.1 "Cordova HTTP plugin"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-appavailability 0.4.2 "AppAvailability"
cordova-plugin-appversion 1.0.0 "App Version"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.1-dev "Console"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-email 1.2.7 "EmailComposer"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-googlemaps 2.3.11 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.19 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-sim 1.3.3 "SIM"
cordova-plugin-sms 1.0.5 "SMS"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-toast 2.6.2 "Toast"
cordova-sms-plugin 0.1.11 "Cordova SMS Plugin"
cordova-sqlite-storage 2.3.2 "Cordova sqlite storage plugin"
cordova-support-google-services 1.1.0 "cordova-support-google-services"
phonegap-plugin-barcodescanner 7.1.2 "BarcodeScanner"
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.2.3 "PushPlugin"
uk.co.workingedge.phonegap.plugin.launchnavigator 4.2.0 "Launch Navigator"
Cordova CLI : 7.1.0
Ionic Framework : 1.3.1
Cordova Platforms : ios 4.5.0

Current behavior: I was in version 2.1.1 but i had a problem with method "setIcon" on markers so i updated the plugin to the last version and all work fine instead on iphone 5 (v10.3.3). I have this comportement :

It's not my projet, it's from this issue but the fix don't work for me. I tried many version of the plugin and all version above 2.2.0 don't work on this iphone.

HTML :

<ion-view>
    <ion-nav-title class="bg-grey-link">
        <span class="nav-bar-title-text">MAP</span>
    </ion-nav-title>

    <ion-content class="full-height">
        <div id="map_canvas"></div>
    </ion-content>
</ion-view>

JS :

$scope.$on('$ionicView.afterEnter', function() {
    var div = document.getElementById("map_canvas");
    $rootScope.map = plugin.google.maps.Map.getMap(div, {
        'gestures': {
            'scroll': true,
            'tilt': true,
            'rotate': true,
            'zoom': true
        }
    });

});

Do you see why it doesn't work on this iphone with other version than 2.1.1 ?

Thank you for your help!

wf9a5m75 commented 6 years ago

Please share your project files on GitHub.

wf9a5m75 commented 6 years ago

Without reproduce projet, I won't check it. So I can't help you

lynavis commented 6 years ago

I can't share because it's a professional project.

Here a demo projet where the issue is reproduced : Demo It's a default ionic project where i added my basic code for display the map.

Iphone 5 iOs : 103.3 cordova-ios : 4.5.0 plugin version : 2.2.0

wf9a5m75 commented 6 years ago

Thank you for creating a demo project. But I don't support older version, so I will check it with the latest version.

wf9a5m75 commented 6 years ago

I tried to inspect your project, but because of your ionic is too old, I couldn't run your code.

Please upgrade your ionic framework

lynavis commented 6 years ago

I can't upgrade to an other version of the ionic framework. Like i said before it's a professional project and we don't have time to allocate to version migration.

wf9a5m75 commented 6 years ago

Well, unfortunately please give up to use this plugjn. I don't have also enough time to spend much time for ancient ionic framework.

You need to choose one of them:

lynavis commented 6 years ago

I can't create more simple demo than the one i gave you. I created the project with the command "ionic start googleMaps" blank --type=ionic1". Then, install your plugin and ios platform and run the project.

What did you change in your code beetween 2.1.1 and 2.2.0 that can produce this issue? It's like an invisible div above the map

wf9a5m75 commented 6 years ago

Please check commit logs. All code is open.

lynavis commented 6 years ago

I already cheked what change but i don't know where to search in all files

wf9a5m75 commented 6 years ago

https://blog.github.com/2010-03-01-introducing-github-compare-view/

wf9a5m75 commented 6 years ago

Here you are, I tried with another PC, and reinstall ancient ionic. Then run it. I have no problem. 2402

lynavis commented 6 years ago

It work fine With recent iPhone but dont on iphone 5

lynavis commented 6 years ago

Can you give me a line search ? In witch file i have to look ?

wf9a5m75 commented 6 years ago

Any comments? 2402

lynavis commented 6 years ago

OK i tried with the iphone 5s simulator and it work but when i run on my iphone 5 it dosen't

wf9a5m75 commented 6 years ago

You should check it with safari inspector

wf9a5m75 commented 6 years ago

Unfortunately I can't do anything. The problem is your iPhone.

lynavis commented 6 years ago

I inspect with safari and all parents élément have the class for the transparence. I think first the problem come from by the div «scroll » add by ionic but with scroll to false the issue is still present

wf9a5m75 commented 6 years ago

~~I have been entered into a strike. All questions & issues about ionic are refused. Ionic member @perrygovier will help you.~~

wf9a5m75 commented 6 years ago

Ok, I figured out the reason finally. The reason is resetCSS. This breaks the touch calculation of this plugin. I fixed the problem. Please reinstall the plugin from the multiple_maps branch.

2402

lynavis commented 6 years ago

It work perfect !!!!! Thank a lot for you time !!!

wf9a5m75 commented 6 years ago

You are welcome