ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

GoogleMaps.create() does not apply styles option in Browser #85

Closed homeportcz closed 6 years ago

homeportcz commented 6 years ago

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

If you choose 'problem or bug report', please select OS: (check one with "x")

cordova information: (run $> cordova plugin list)

cordova-plugin-browsersync 0.1.7 "cordova-plugin-browsersync"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-googlemaps 2.5.0-beta-20180928-1512 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.1.4 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
{}

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": "^5.0.0-beta.21",
 "@ionic-native/google-maps": "^5.0.0-beta.21",

Current behavior: GoogleMaps.create(mapdiv,{styles:[... styles from https://mapstyle.withgoogle.com ...]}); does not reflect styles property. Other options are applied correctly. Map is in default colors.

Works correctly in stable version for iOS and Android. Problem seems to be only in Browser.

wf9a5m75 commented 6 years ago

Please share your project files on GitHub.

homeportcz commented 6 years ago

You have been invited to private repository freebikev2 right now.

wf9a5m75 commented 6 years ago

Thank you for sharing your project. I fixed the problem. Please reinstall the plugin from the multiple_maps branch.

m0nzderr commented 6 years ago

@homeportcz , could you please share your working package.json ?

Apparently I have the same issue. However, after installing the plugin from multiple_maps branch, map doesn't show up at all. My plugin list is:

cordova-plugin-device 2.0.2 "Device"
cordova-plugin-googlemaps 2.5.0-beta-20181003-1630 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"

and my dependencies are:

 "dependencies": {
  ...
    "@ionic-native/core": "5.0.0-beta.21",
    "@ionic-native/google-maps": "^5.0.0-beta.23",
    "@ionic-native/splash-screen": "^5.0.0-beta.21",
    "@ionic-native/status-bar": "^5.0.0-beta.21",
    "@ionic/angular": "4.0.0-beta.11",
    "cordova-plugin-googlemaps": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^2.0.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
...

Is there any other upgrade needed?

vosecek commented 6 years ago

Thank you for sharing your project. I fixed the problem. Please reinstall the plugin from the multiple_maps branch.

Thanks, it works with certain commit. There is another problem, will be reporter to right repository.

vosecek commented 6 years ago

@m0nzderr There is another problem, check issues in main cordova-googlemaps repository.

homeportcz commented 6 years ago

@m0nzderr update multiple_maps branch you can "send a beer" :) https://github.com/mapsplugin/cordova-plugin-googlemaps#please-support-this-plugin-activity