Skip to content

Comparison with Xamarin.Forms.Maps

amay077 edited this page Jun 26, 2016 · 6 revisions

Explain about comparison with Xamarin.Form.Maps. Unless otherwise noted, these are supported for Android and iOS onkly.

Added Features

Polyline, Polygon, Circle supports(from v1.1.0)

Can drawing Polyline, Polygon and Circle by common API.

Polyline, Polygon, Circle supports

For example, you can add a polyline as follows.

// map as Xamarin.Forms.GoogleMaps.Map

var polyline = new Polyline();
polyline.Positions.Add(new Position(40.77d, -73.93d));
polyline.Positions.Add(new Position(40.81d, -73.91d));
polyline.Positions.Add(new Position(40.83d, -73.87d));

polyline.StrokeColor = Color.Blue;
polyline.StrokeWidth = 5f;
polyline.Tag = "POLYLINE"; // Can set any object

polyline.IsClickable = true;
polyline.Clicked += (s, e) => 
{
    // handle click polyline
};

map.Polylines.Add(polyline);

You can delete a polyline as follows.

map.Polylines.Remove(polyline);

In polyline or polygon, if you set IsClickable to true then you can subscribe Clicked events.

Circle have not IsClickable property and Clicked events. Because Android native Google Maps API does not support circle clicking.

For more information, refer to ShapesPage.xaml.cs in SampleApp - XFGoogleMapSample.

Limitations

  • In v1.1.0, Pin, Polyline, Polygon and Circle's each properties does not support binding.

Select or unselect pin to programmatically(from v1.0.0)

You can set pin to Map.SelectedPin, then show info-window and pin marks "selected". Set null to Map.SelectedPin, then close info-window and pin marks "unselected".

For more information, refer to PinsPage.xaml.cs in SampleApp - XFGoogleMapSample.

Changed Features

Add bool animation parameter to Map.MoveToRegion method(from v1.1.0)(Support Android / iOS / UWP)

Set animate parameter to true, then animation when map panning. set to false, then panning directly. This is optional parameter, default is true.

Deleted Features

  • None(from v1.1.0)
Clone this wiki locally