13

I want to be able to take a screenshot of a certain location in google maps without actually loading the google map onto the screen, If there is a way google map can take the screenshot in the background that would be great.

Errol Green
  • 1,367
  • 5
  • 19
  • 32
  • Do you mean an image of what the map with the interface and controls would look like on the screen? Or just the actual map without the user interface? – WaltRiceJr Apr 25 '15 at 20:38
  • Yes, an image of what the map would look like if it were on the screen – Errol Green Apr 25 '15 at 21:11

1 Answers1

19

There is Lite Mode:

The Google Maps Android API can serve a static image as a 'lite mode' map.

A lite mode map is a bitmap image of a map at a specified location and zoom level. Lite mode supports all of the map types (normal, hybrid, satellite, terrain) and a subset of the functionality supplied by the full API. Lite mode is useful when you want to provide a number of maps in a stream, or a map that is too small to support meaningful interaction.

Example:

As an XML attribute for a 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 the GoogleMapOptions object

GoogleMapOptions options = new GoogleMapOptions().liteMode(true);

Here You can find supported features.


In addition I recommend reading: Android Google Map to show as picture

You can use the Google Maps built-in snapshot method, to capture a preview and display it in an ImageView.

Community
  • 1
  • 1
Ziem
  • 6,579
  • 8
  • 53
  • 86