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
272 stars 54 forks source link

How to change zoomControl position? #77

Closed vesper8 closed 2 years ago

vesper8 commented 2 years ago

I'm trying to set the position of the zoom control. I've been able to do this with no issues using other libraries, but with this one it seems no matter what I do, the zoom control (+ and - buttons) are always positioned in the bottom right corner

I've tried

  :zoom-control="true"
  :zoom-control-options="{ position: 9 }"

And I tried positions from 1 to 11, and nothing seems to make any difference.

Any ideas what I'm doing wrong?

https://developers.google.com/maps/documentation/javascript/reference/control#ControlPosition https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/google.maps/index.d.ts#L282-L338

HusamElbashir commented 2 years ago

Hi @vesper8

You should use the zoomControlPosition prop: https://github.com/inocan-group/vue3-google-map/blob/develop/src/components/GoogleMap.vue#L210-L213

Example:

zoom-control-position="LEFT_BOTTOM"