android - MapView displays blank, but MapFragments work normally -


hello i'm using fragment based layout in application - goes fine - using 1 special mapfragment , other pagefragments display data. mapfragment works fine - map display no problems , able draw on etc.

now wanted add small map view 1 of pagefragments.

i tried like:

<com.google.android.gms.maps.mapview         xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:map="http://schemas.android.com/apk/res-auto"         android:id="@+id/mapview"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:background="#00000000"         android:clickable="true"         map:uicompass="true"         map:uizoomcontrols="true"         map:zorderontop="true" >     </com.google.android.gms.maps.mapview> 

no xml errors, etc. app working - pagefragment correctly displayed, map view remains blank. ideas?

you must forward lifecycle methods activity or fragment mapview working. in particular:

  • oncreate(bundle)
  • onresume()
  • onpause()
  • ondestroy()
  • onsaveinstancestate()
  • onlowmemory()

http://developer.android.com/reference/com/google/android/gms/maps/mapview.html

just in case missed, valid google maps api v2. if not override these methods may still see map grid, map controls etc, map imaginary not visible.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -