So we need to create an app that renders a map and we are currently using Xamarin.Forms to integrate it. However, we will not use Xamarin.Forms.Maps since we have to use the Google Maps API for iOS and not its native map which is MapKit.
My question is, how do I integrate this component https://components.xamarin.com/view/googleplayservices-maps in Xamarin.Forms?
You can inject Google Map (for Android or iOS) to Xamarin.Forms's view.
Example in Android:
public class AndroidMapRenderer : ViewRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<View> e)
{
base.OnElementChanged(e);
var mapView = new Android.Gms.Maps.MapView(Context);
SetNativeControl(mapView);
}
}
This way is "custom renderer".
Please read these:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With