public static class MapSnapshotter.Options
extends java.lang.Object
Constructor | Description |
---|---|
Options(int width,
int height) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getApiBaseUri() |
|
java.lang.String |
getApiBaseUrl() |
Deprecated.
use
getApiBaseUri() instead |
Style.Builder |
getBuilder() |
|
CameraPosition |
getCameraPosition() |
|
int |
getHeight() |
|
java.lang.String |
getLocalIdeographFontFamily() |
|
float |
getPixelRatio() |
|
LatLngBounds |
getRegion() |
|
java.lang.String |
getStyleJson() |
|
java.lang.String |
getStyleUri() |
|
java.lang.String |
getStyleUrl() |
Deprecated.
use
getStyleUri() instead |
int |
getWidth() |
|
MapSnapshotter.Options |
withApiBaseUri(java.lang.String apiBaseUri) |
Specifies the URI used for API endpoint.
|
MapSnapshotter.Options |
withApiBaseUrl(java.lang.String apiBaseUrl) |
Deprecated.
use
withApiBaseUri(String) instead |
MapSnapshotter.Options |
withCameraPosition(CameraPosition cameraPosition) |
|
MapSnapshotter.Options |
withGlyphsRasterizationMode(GlyphsRasterizationMode glyphsRasterizationMode) |
Experimental.
|
MapSnapshotter.Options |
withLocalIdeographFontFamily(java.lang.String fontFamily) |
Set the font family for generating glyphs locally for ideographs in the 'CJK Unified Ideographs'
and 'Hangul Syllables' ranges.
|
MapSnapshotter.Options |
withLocalIdeographFontFamily(java.lang.String... fontFamilies) |
Set a font family from range of font families 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(java.lang.String uri) |
Deprecated.
use
withStyleBuilder(Style.Builder) instead |
MapSnapshotter.Options |
withStyleBuilder(Style.Builder builder) |
Set a style builder to snapshotter, the contents in builder like layers/sources/images will be applied
to snapshotter.
|
MapSnapshotter.Options |
withStyleJson(java.lang.String styleJson) |
Deprecated.
use
withStyleBuilder(Style.Builder) instead |
public Options(int width, int height)
width
- the width of the imageheight
- the height of the image@NonNull public MapSnapshotter.Options withStyleBuilder(Style.Builder builder)
builder
- The builder will applied to snapshotterMapSnapshotter.Options
public Style.Builder getBuilder()
@NonNull public MapSnapshotter.Options withStyle(java.lang.String uri)
withStyleBuilder(Style.Builder)
insteaduri
- The style URI to useMapSnapshotter.Options
@NonNull public MapSnapshotter.Options withStyleJson(java.lang.String styleJson)
withStyleBuilder(Style.Builder)
insteadstyleJson
- 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 TrimbleMaps logo.MapSnapshotter.Options
@NonNull public MapSnapshotter.Options withLocalIdeographFontFamily(java.lang.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 TrimbleMapsConstants.DEFAULT_FONT
.
fontFamily
- font family for local ideograph generation.MapSnapshotter.Options
@NonNull public MapSnapshotter.Options withGlyphsRasterizationMode(GlyphsRasterizationMode glyphsRasterizationMode)
The glyphs rasterization mode argument is passed to Typeface.create(String, int)
.
Default glyphs rasterization mode is GlyphsRasterizationMode.NO_GLYPHS_RASTERIZED_LOCALLY
.
glyphsRasterizationMode
- glyphs rasterization mode for local ideograph generation.MapSnapshotter.Options
@NonNull public MapSnapshotter.Options withLocalIdeographFontFamily(java.lang.String... fontFamilies)
The font families are checked against the default system fonts defined in
'/system/etc/fonts.xml'. Default font for local ideograph font family is
TrimbleMapsConstants.DEFAULT_FONT
.
fontFamilies
- font families for local ideograph generation.MapSnapshotter.Options
@Deprecated @NonNull public MapSnapshotter.Options withApiBaseUrl(java.lang.String apiBaseUrl)
withApiBaseUri(String)
insteadapiBaseUrl
- The base of our API endpointMapSnapshotter.Options
@NonNull public MapSnapshotter.Options withApiBaseUri(java.lang.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 java.lang.String getStyleUrl()
getStyleUri()
insteadpublic java.lang.String getStyleUri()
@Nullable public java.lang.String getStyleJson()
@Nullable public CameraPosition getCameraPosition()
public java.lang.String getLocalIdeographFontFamily()
TrimbleMapsConstants.DEFAULT_FONT
.@Nullable @Deprecated public java.lang.String getApiBaseUrl()
getApiBaseUri()
instead@Nullable public java.lang.String getApiBaseUri()