amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 346 forks source link

Custom Marker #621

Open lumisoftusa opened 5 years ago

lumisoftusa commented 5 years ago

SUMMARY

Custom Map Marker of the PIN

DETAILS

Hi, I am trying to add Custom marker on pin without renderer , Like any Custom contentview with template etc.

// How to use of your requested feature

PLATFORMS

coderXamarin commented 5 years ago

use the below code

1) readonly string[] _bundles = { "truck.png", "image02.png", "image03.png" };

List buttonPinBundle;

2) buttonPinBundle = new List(); foreach (var bundle in _bundles) { buttonPinBundle.Add(bundle); }

3) pin = new Pin(); pin.Type = PinType.SearchResult; pin.Position = position1; pin.Label = "Demo MH20"; pin.Address = "Technopark Elgazala, Tunisia"; pin.Icon = BitmapDescriptorFactory.FromBundle(buttonPinBundle.FirstOrDefault());

amay077 commented 5 years ago

You can see BindingPinViewPage.xaml.cs, BindingPinView.xaml/BindingPinView.xaml.cs in our sample apps.

https://github.com/amay077/Xamarin.Forms.GoogleMaps/tree/master/XFGoogleMapSample/XFGoogleMapSample