public static class MapSnapshotter.Options extends Object
Constructor and Description |
---|
Options(int width,
int height) |
public Options(int width, int height)
width
- the width of the imageheight
- the height of the image@NonNull public MapSnapshotter.Options withStyle(String uri)
uri
- The style URI to useMapSnapshotter.Options
@NonNull public MapSnapshotter.Options withStyleJson(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 Mapbox logo.MapSnapshotter.Options
@NonNull public MapSnapshotter.Options withLocalIdeographFontFamily(String fontFamily)
The font family argument is passed to Typeface.create(String, int)
.
Default system fonts are defined in '/system/etc/fonts.xml'
Default font for local ideograph font family is "sans-serif".
fontFamily
- font family for local ideograph generation.MapSnapshotter.Options
@Deprecated @NonNull public MapSnapshotter.Options withApiBaseUrl(String apiBaseUrl)
withApiBaseUri(String)
insteadapiBaseUrl
- The base of our API endpointMapSnapshotter.Options
@NonNull public MapSnapshotter.Options withApiBaseUri(String apiBaseUri)
apiBaseUri
- The base of our API endpointMapSnapshotter.Options
public int getWidth()
public int getHeight()
public float getPixelRatio()
@Nullable public LatLngBounds getRegion()
@Deprecated public String getStyleUrl()
getStyleUri()
insteadpublic String getStyleUri()
@Nullable public CameraPosition getCameraPosition()
public String getLocalIdeographFontFamily()
@Nullable @Deprecated public String getApiBaseUrl()
getApiBaseUri()
instead© 2015–2019 Mapbox. All rights reserved.