android - How to take google maps snapshot without actually displaying the map -
i want able take screenshot of location in google maps without loading google map onto screen, if there way google map can take screenshot in background great.
there lite mode:
the google maps android api can serve static image 'lite mode' map.
a lite mode map bitmap image of map @ specified location , zoom level. lite mode supports of map types (normal, hybrid, satellite, terrain) , subset of functionality supplied full api. lite mode useful when want provide number of maps in stream, or map small support meaningful interaction.
example:
as xml attribute mapview or mapfragment
<fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:name="com.google.android.gms.maps.mapfragment" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" map:camerazoom="13" map:maptype="normal" map:litemode="true"/>
in googlemapoptions object
googlemapoptions options = new googlemapoptions().litemode(true);
here can find supported features.
in addition recommend reading: android google map show picture
you can use google maps built-in snapshot method, capture preview , display in imageview.
Comments
Post a Comment