0 rating
  • 1
  • 2
  • 3
  • 4
  • 5
Compatible with
  • Android
  • iOS

XM.MapPlus 1.0.0

xamarians

library to display markers for locations, Handle marker click, create polygon using list of locations and create circle.

Xamarians.Maps

Media

Cross platform library to display markers for locations, customization of marker image, Handle marker click, create polygon using list of locations and create circle.

First add component from xamarin component.

You can integrate media tools in Xamarin Form application using following code:

Shared Code -

Include namespace

 xmlns:xamarians="clr-namespace:Xamarians.Maps;assembly=Xamarians.Maps"

Add control in view

<xamarians:ExtendedMap x:Name="shape" Draw="True" />

Add this code in page constructor

...
            shape.CreateCircle(500, 37.79752, -122.40183);
            ObservableCollection<Position> RouteCoordinates = new ObservableCollection<Position>();
            RouteCoordinates.Add(new Position(37.785559, -122.396728));
            RouteCoordinates.Add(new Position(37.780624, -122.390541));
            RouteCoordinates.Add(new Position(37.777113, -122.394983));
            RouteCoordinates.Add(new Position(37.776831, -122.394627));
            RouteCoordinates.Add(new Position(37.785559, -122.396728));
            shape.CreatePolygon(RouteCoordinates);
            shape.SetMarkerIcon("hotspot.png", "");
            shape.PinClicked += Shape_PinClicked;

Android - in MainActivity file write below code -

 Xamarians.Maps.Droid.ExtendedMapRenderer.Init();

iOS - in AppDelegate file write below code -

 Xamarians.Maps.iOS.ExtendedMapRenderer.Init();

Note

Make sure your bundle identifier has access to map api's.

Write the Api key in Manifest file in Application Tag.

<meta-data android:name="com.google.android.geo.API_KEY" android:value="Your Api_key_value" />
Be the first to write a review