Android]Is it possible to SetIcon replacing the pin icon with a custom icon image when the Pin location is first defined using an extension? #108
-
I want to be able to pass an image to replace the default icon image when I define a new Pin location. Instead of using the annotation. I was able to do this in Xamarin by replacing the map renderer. I used a CustomPin : Pin with an imagesource field that I used to SetIcon() when the marker (new Pin location) was rendered on the map.. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The sample does exactly what you need. |
Beta Was this translation helpful? Give feedback.
-
The sample (MauiMaps) shows 2 images for each icon: default icon & annotation image. I am testing this on a Galaxy S7, Android 12.1 – API 32. With your new addition (CustomMarkerClickListener), when I click the map pin, the original pin icon disappears, the annotation image remains and the info window appears. I don’t want the default pin icon to appear at all. Similar to what is displayed by your code after clicking the image twice.
|
Beta Was this translation helpful? Give feedback.
-
fixed by #116 |
Beta Was this translation helpful? Give feedback.
fixed by #116