public static class MapSnapshotter.Options extends Object
Constructor and Description |
---|
Options(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
String |
getApiBaseUrl() |
CameraPosition |
getCameraPosition() |
int |
getHeight() |
String |
getLocalIdeographFontFamily() |
float |
getPixelRatio() |
LatLngBounds |
getRegion() |
String |
getStyleUrl() |
int |
getWidth() |
MapSnapshotter.Options |
withApiBaseUrl(String apiBaseUrl)
Specifies the URL used for API endpoint.
|
MapSnapshotter.Options |
withCameraPosition(CameraPosition cameraPosition) |
MapSnapshotter.Options |
withLocalIdeographFontFamily(String fontFamily)
Set the font family for generating glyphs locally for ideographs in the 'CJK Unified Ideographs'
and 'Hangul Syllables' ranges.
|
MapSnapshotter.Options |
withLogo(boolean showLogo) |
MapSnapshotter.Options |
withPixelRatio(float pixelRatio) |
MapSnapshotter.Options |
withRegion(LatLngBounds region) |
MapSnapshotter.Options |
withStyle(String url) |
MapSnapshotter.Options |
withStyleJson(String styleJson) |
public Options(int width, int height)
width
- the width of the imageheight
- the height of the imagepublic MapSnapshotter.Options withStyle(String url)
url
- The style URL to useMapSnapshotter.Options
public MapSnapshotter.Options withStyleJson(String styleJson)
styleJson
- The style json to useMapSnapshotter.Options
public MapSnapshotter.Options withRegion(LatLngBounds region)
region
- the region to show in the snapshot.
This is applied after the camera positionMapSnapshotter.Options
public MapSnapshotter.Options withPixelRatio(float pixelRatio)
pixelRatio
- the pixel ratio to use (default: 1)MapSnapshotter.Options
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
public MapSnapshotter.Options withLogo(boolean showLogo)
showLogo
- The flag indicating to show the Mapbox logo.MapSnapshotter.Options
public MapSnapshotter.Options withLocalIdeographFontFamily(String fontFamily)
The font family argument is passed to Typeface
.
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
public MapSnapshotter.Options withApiBaseUrl(String apiBaseUrl)
apiBaseUrl
- The base of our API endpointMapSnapshotter.Options
public int getWidth()
public int getHeight()
public float getPixelRatio()
public LatLngBounds getRegion()
public String getStyleUrl()
public CameraPosition getCameraPosition()
public String getLocalIdeographFontFamily()
public String getApiBaseUrl()
© 2015–2019 Mapbox. All rights reserved.