I work with mapsdemo example.
This is the mapview.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
  <com.google.android.maps.MapView
       android:id="@+id/mapview1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:enabled="true"
      android:clickable="true"
      android:apiKey="0NEYgdOup6yIBCe9gExhOXFMJGERVVN_mrIQqpQ"
        />
</LinearLayout>


In OnCreate find the mapview1 but the cast MapView is invalid exception:

MapView mapView = (MapView)FindViewById(Resource.Id.mapview1)

This is the errore message:

Message "Cannot cast from source type to destination type."     string


I followed the example of the official guide to java

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/MapView-exception-tp5054906p5054906.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to