User-agent: Mediapartners-Google Disallow: User-agent: * Disallow: /search Allow: / Sitemap: http://nox4developper.blogspot.com/sitemap.xml Nox 4 developper: [Q] Problem with maps support api. topic

[Q] Problem with maps support api. topic






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






Aucun commentaire:

Enregistrer un commentaire