Reputation: 4342
I tried below tutorial MapView.
I have added
1) Mono, Android.Googlemaps.
2) using Android.Locations;
3) implemented : public class Activity1 : MapActivity
These are the error Messages :
Error CS0115: 'MapView.Activity1.IsRouteDisplayed': no suitable method found to override (CS0115) (MapView)
Error CS0246: The type or namespace name 'MapActivity' could not be found (are you missing a using directive or an assembly reference?) (CS0246) (MapView)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<com.google.android.maps.MapView
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:apiKey="my google map key here" />
</LinearLayout>
[Activity (Label = "MapView", MainLauncher = true)]
public class Activity1 : MapActivity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.Main);
}
protected override bool IsRouteDisplayed
{
get
{
return false;
}
}
}
Would appreciate your help on this.
Thanks
Upvotes: 1
Views: 695
Reputation: 66882
As commenters have already mentioned, Google maps v1 is no longer available for new apps.
Instead you must use v2 from Google play services.
It`s not entirely straightforward to use v2 - the Google licensing makes it hard to redistribute the Google play components, but there is a tutorial which works.
Upvotes: 1