lundi 29 décembre 2014

[Q] Problem with maps support api. topic

08:43






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:


Code:


googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.staticmapMap)).getMap();

..which works fine as "MapFragment" and "getFragmentManager".

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"/>


The error I keep getting is :

Quote:









An instance of type 'android.support.v4.app.Fragment' can not be of type 'com.google.android.gms.maps.SupportMapFragment'.




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






Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 commentaires:

Enregistrer un commentaire

 

© 2013 Mobile Probleme. All rights resevered. Designed by Templateism

Back To Top