ionic-team / ionic-native-google-maps

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

Request new feature: show label on the marker. #210

Closed zhrichard closed 5 years ago

zhrichard commented 5 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)

Currently MarkerOptions interface doesn't accept 'label' field, which Google Map Javascript V3 actually does.
In my case I just want to show simple letters or numbers as the label of the marker, currently I have no way to do that, hopefully I can get this feature supported. 
Thanks.

"@ionic-native/core": "^4.7.0", "cordova-plugin-googlemaps": "^2.5.2",

wf9a5m75 commented 5 years ago

currently I have no way to do that

You can generate dynamic marker image using <canvas> for icon.

zhrichard commented 5 years ago

Thanks for reply, that's a working solution. Will it affect the markers' display performance if about two hundred markers on the screen? Thanks.

wf9a5m75 commented 5 years ago

Google Maps SDK for Android/iOS do not have the functionality of marker label. It means even if I implement, the plugin has to generate bitmap. It's the same thing.

zhrichard commented 5 years ago

Ah, got it, that's why, thanks for your help.

schagani commented 5 years ago

The issue I am facing that after generating icon using canvas, the marker position is getting change while zoom in/out. Even though, I tried origin, scale and anchor options. Any suggestion, my target is to show label above or below the marker pin.