inocan-group / vue3-google-map

A set of composable components for easy use of Google Maps in your Vue 3 projects.
https://vue3-google-map.com
MIT License
280 stars 57 forks source link

No map controls with v0.8.1 #48

Closed JoseGoncalves closed 3 years ago

JoseGoncalves commented 3 years ago

Upgrading to v0.8.1 I don't have the map controls overlayed on my map and I'm unable to zoom in/out or drag the map. You can check my usage demo at https://github.com/JoseGoncalves/vue-google-maps . This demo works fine with v0.8.0, but it does not work with v0.8.1.

dblythy commented 3 years ago

It seems that the default property for a few of the options were changed in v0.8.1.

If options aren't implicitly set, such as :draggable="true", they will be set to false.

JoseGoncalves commented 3 years ago

@dblythy I confirm that. Setting :keyboard-shortcuts="true" also enables back the zoom controls with + and - keys. Nevertheless setting :disable-default-ui="false" does not bring back the default UI controls.

JoseGoncalves commented 3 years ago

It seems the default UI prop has incorrect casing set. It's defined as disableDefaultUi, when it should be defined as disableDefaultUI.

dblythy commented 3 years ago

I can fix that in my PR if you would like 😊

JoseGoncalves commented 3 years ago

@dblythy Go ahead! Your current PR should fix the current issue, but adding the default UI prop correct name would allow the possibility to disable those controls.

HusamElbashir commented 3 years ago

Thanks for looking into this guys :pray:

It seems the default UI prop has incorrect casing set. It's defined as disableDefaultUi, when it should be defined as disableDefaultUI.

One thing to note is that we do need this prop name to remain the same. Otherwise people will have to use disable-default-u-i for the kebab case version: https://vuejs.org/v2/guide/components-props.html#Prop-Casing-camelCase-vs-kebab-case

So a fix would probably have to be in resolveOptions: https://github.com/inocan-group/vue3-google-map/blob/develop/src/components/GoogleMap.vue#L212