public static class MapSnapshotter.Options
extends java.lang.Object
Constructor and Description |
---|
Options(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
CameraPosition |
getCameraPosition() |
int |
getHeight() |
float |
getPixelRatio() |
LatLngBounds |
getRegion() |
java.lang.String |
getStyleUrl() |
int |
getWidth() |
MapSnapshotter.Options |
withCameraPosition(CameraPosition cameraPosition) |
MapSnapshotter.Options |
withLogo(boolean showLogo) |
MapSnapshotter.Options |
withPixelRatio(float pixelRatio) |
MapSnapshotter.Options |
withRegion(LatLngBounds region) |
MapSnapshotter.Options |
withStyle(java.lang.String url) |
MapSnapshotter.Options |
withStyleJson(java.lang.String styleJson) |
public Options(int width, int height)
width
- the width of the imageheight
- the height of the image@NonNull public MapSnapshotter.Options withStyle(java.lang.String url)
url
- The style URL to useMapSnapshotter.Options
@NonNull public MapSnapshotter.Options withStyleJson(java.lang.String styleJson)
styleJson
- The style json to useMapSnapshotter.Options
@NonNull public MapSnapshotter.Options withRegion(LatLngBounds region)
region
- the region to show in the snapshot.
This is applied after the camera positionMapSnapshotter.Options
@NonNull public MapSnapshotter.Options withPixelRatio(float pixelRatio)
pixelRatio
- the pixel ratio to use (default: 1)MapSnapshotter.Options
@NonNull public MapSnapshotter.Options withCameraPosition(CameraPosition cameraPosition)
cameraPosition
- The camera position to use,
the CameraPosition.target
is overridden
by region if set in conjunction.MapSnapshotter.Options
@NonNull public MapSnapshotter.Options withLogo(boolean showLogo)
showLogo
- The flag indicating to show the Dingi logo.MapSnapshotter.Options
public int getWidth()
public int getHeight()
public float getPixelRatio()
@Nullable public LatLngBounds getRegion()
public java.lang.String getStyleUrl()
@Nullable public CameraPosition getCameraPosition()