capacitor-community / google-maps

Capacitor Plugin using native Google Maps SDK for Android and iOS.
https://capacitor-community.github.io/google-maps/
MIT License
152 stars 64 forks source link

cannot add icon in addMarker #196

Closed alihaider1793 closed 1 year ago

alihaider1793 commented 2 years ago

Describe the bug I am using "@capacitor-community/google-maps": "^2.0.0-beta.1". When I try to use the addMarker method, it gives an error saying that icon does not exist in type MarkerPreferences, but it is mentioned in the API documentation.

Screenshots image

wait-matsu commented 2 years ago

Hi

It appears that icons cannot be set for 2.0.0-beta.1. Instead, the icon is available by specifying the current latest version, 2.0.0-beta.5, as shown below.

"dependencies": {
    ...
    "@capacitor-community/google-maps": "git+https://github.com/capacitor-community/google-maps.git#main",
    ...
  },
alihaider1793 commented 2 years ago

Hi, I have another issue, which is not related to this, but I want to use addPolygon and addCircle methods in my code using this plugin. but these plugins are not merged in the main branch right now. How can I use these features?

tafelnl commented 1 year ago

It's highly recommended to install the latest version of this repo through NPM (currently 2.0.0-beta.5). If you want to live on the bleeding edge and want to try out different things, you can install any GitHub repo/branch like so npm i git+https://github.com/capacitor-community/google-maps.git#main. Where you can substitute #main for any commit/branch/tag.

alihaider1793 commented 1 year ago

I tried to access the hmg/shapes branch but it is 22 commits behind main. so it causes errors in my app. And there's a pull request which is open from the past 6 months. If that is merged into the main branch, I think I'll be able to access the features to add polygon and circles in the map.