android - White map but whe i apply less zoom the map appears -
i need put map in linearlayout layout:
<linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > .... <linearlayout android:layout_width="800dp" android:layout_height="400dp" android:orientation="horizontal" android:layout_gravity="center"> <fragment android:id="@+id/mapasave" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" class="com.google.android.gms.maps.supportmapfragment" /> </linearlayout> ....... </linearlayout>
the problem map appears totaly white, when apply less zoom, map appear, continental size.
the code of oncreate() metod this:
googlemap mapa = ((supportmapfragment) getsupportfragmentmanager() .findfragmentbyid(r.id.mapasave)).getmap(); mapa.setmaptype(googlemap.map_type_satellite); mapa.getuisettings().setcompassenabled(true); mapa.getuisettings().setzoomcontrolsenabled(true); latlng ll = new latlng(latitude,longitude); mapa.movecamera(cameraupdatefactory.newlatlngzoom(ll,15)); mapa.addmarker(new markeroptions().position(ll). icon(bitmapdescriptorfactory.defaultmarker(bitmapdescriptorfactory.hue_blue)));
androidmanifest.xml:
<meta-data android:name="com.google.android.maps.v2.api_key" android:value="xxxxxxxxxxxxxxx" />
i haven't found nothing concrete problem. if know this, welcome.
thank much!
check line:
mapa.movecamera(cameraupdatefactory.newlatlngzoom(ll,15));
try
mapa.movecamera(cameraupdatefactory.newlatlngzoom(ll,2));
the zoom value high think.
good luck
Comments
Post a Comment