Problem with a project using Google Maps Support Api. I have no problem using the current maps api, the problem is when I try to use the support api. I have this line:
..which works fine as "MapFragment" and "getFragmentManager".
In my XML I have:
The error I keep getting is :
Any ideas how I can fix this to use the support framework? I have searched the web far and wide, tried tweaking my code several ways but no solution seems to work.
Thanks
Code:
googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.staticmapMap)).getMap();
In my XML I have:
Code:
<fragment
android:id="@+id/staticmapMap"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
Quote:
An instance of type 'android.support.v4.app.Fragment' can not be of type 'com.google.android.gms.maps.SupportMapFragment'. |
Thanks
Aucun commentaire:
Enregistrer un commentaire