Class TrimbleMapsMapOptions
- All Implemented Interfaces:
android.os.Parcelable
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final android.os.Parcelable.Creator<TrimbleMapsMapOptions>Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiBaseUri(String apiBaseUri) Specifies the URI used for API endpoint.apiBaseUrl(String apiBaseUrl) Deprecated.useapiBaseUriinsteadattributionEnabled(boolean enabled) Specifies the visibility state of a attribution for a map view.attributionGravity(int gravity) Specifies the gravity state of attribution for a map view.attributionMargins(int[] margins) Specifies the margin state of attribution for a map viewattributionTintColor(int color) Specifies the tint color of the attribution for a map viewcamera(com.trimblemaps.mapsdk.camera.CameraPosition cameraPosition) Specifies a the initial camera position for the map view.compassEnabled(boolean enabled) Specifies the visibility state of a trimblemaps_compass_icon for a map view.compassFadesWhenFacingNorth(boolean compassFadeWhenFacingNorth) Specifies if the trimblemaps_compass_icon fades to invisible when facing north.compassGravity(int gravity) Specifies the gravity state of trimblemaps_compass_icon for a map view.compassImage(android.graphics.drawable.Drawable compass) Specifies the image of the CompassView.compassMargins(int[] margins) Specifies the margin state of trimblemaps_compass_icon for a map viewstatic TrimbleMapsMapOptionscreateFromAttributes(android.content.Context context) Creates a default TrimbleMapsMapsOptions from a given context.static TrimbleMapsMapOptionscreateFromAttributes(android.content.Context context, android.util.AttributeSet attrs) Creates a TrimbleMapsMapsOptions from the attribute set.crossSourceCollisions(boolean crossSourceCollisions) Enable cross-source symbol collision detection, defaults to true.debugActive(boolean enabled) Specifies the used debug type for a map view.intdoubleTapGesturesEnabled(boolean enabled) Specifies if the double tap gesture is enabled for a map view.booleanforegroundLoadColor(int loadColor) Set the MapView foreground color that is used when the map surface is being created.Get the current configured API endpoint base URI.Deprecated.usegetApiBaseUri()insteadbooleanGet the current configured visibility state for attribution for a map view.intGet the current configured gravity state for attribution for a map view.int[]Get the current configured margins for attribution for a map view.intGet the current configured tint color for attribution for a map view.com.trimblemaps.mapsdk.camera.CameraPositionGet the current configured initial camera position for a map view.booleanGet the current configured visibility state for trimblemaps_compass_icon for a map view.booleanGet the current configured state for fading the trimblemaps_compass_icon when facing north.intGet the current configured gravity state for trimblemaps_compass_icon for a map view.android.graphics.drawable.DrawableGet the current configured CompassView image.int[]Get the current configured margins for trimblemaps_compass_icon for a map view.booleanCheck whether cross-source symbol collision detection is enabled.booleanGet the current configured debug state for a map view.booleanGet the current configured double tap gesture state for a map view.intReturns the current configured foreground color that is used during map creation.booleanGet the current configured horizontal scroll gesture state for a map view.Returns the font-family for locally overriding generation of glyphs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges.booleanGet the current configured visibility state for trimblemaps_compass_icon for a map view.intGet the current configured gravity state for logo for a map view.int[]Get the current configured margins for logo for a map view.doubleGet the current configured maximum pitch for a map view.doubleGet the current configured maximum zoom for a map view.doubleGet the current configured min pitch for a map view.doubleGet the current configured min zoom for a map view.floatReturn the custom configured pixel ratio, returns 0 if not configured.booleanDeprecated.UsegetPrefetchZoomDelta()instead.intCheck current pre-fetching zoom delta.booleanGet whether the user may zoom the map by tapping twice, holding and moving the pointer up and down.booleanGet the flag to render the map surface on top of another surface.booleanGet the current configured rotate gesture state for a map view.booleanGet the current configured scroll gesture state for a map view.booleanReturns true if TextureView is being used the render view.booleanGet the current configured tilt gesture state for a map view.booleanReturns true if TextureView supports a translucent surfacebooleanGet the current configured zoom gesture state for a map view.inthashCode()horizontalScrollGesturesEnabled(boolean enabled) Specifies if the horizontal scroll gesture is enabled for a map view.booleanReturns true if local ideograph font family is enabled, defaults to true.localIdeographFontFamily(String fontFamily) Set the font family for generating glyphs locally for ideographs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges.localIdeographFontFamily(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.localIdeographFontFamilyEnabled(boolean enabled) Enable local ideograph font family, defaults to true.logoEnabled(boolean enabled) Specifies the visibility state of a logo for a map view.logoGravity(int gravity) Specifies the gravity state of logo for a map view.logoMargins(int[] margins) Specifies the margin state of logo for a map viewmaxPitchPreference(double maxPitch) Specifies the used maximum pitch for a map view.maxZoomPreference(double maxZoom) Specifies the used maximum zoom level for a map view.minPitchPreference(double minPitch) Specifies the used minimum pitch for a map view.minZoomPreference(double minZoom) Specifies the used minimum zoom level for a map view.pixelRatio(float pixelRatio) Set the custom pixel ratio configuration to override the default value from resources.quickZoomGesturesEnabled(boolean enabled) Specifies whether the user may zoom the map by tapping twice, holding and moving the pointer up and down.voidrenderSurfaceOnTop(boolean renderOnTop) Set the flag to render the map surface on top of another surface.rotateGesturesEnabled(boolean enabled) Specifies if the rotate gesture is enabled for a map view.scrollGesturesEnabled(boolean enabled) Specifies if the scroll gesture is enabled for a map view.setPrefetchesTiles(boolean enable) Deprecated.UsesetPrefetchZoomDelta(int)instead.setPrefetchZoomDelta(int delta) Set the tile pre-fetching zoom delta.textureMode(boolean textureMode) EnableTextureViewas rendered surface.tiltGesturesEnabled(boolean enabled) Specifies if the tilt gesture is enabled for a map view.translucentTextureSurface(boolean translucentTextureSurface) voidwriteToParcel(android.os.Parcel dest, int flags) zoomGesturesEnabled(boolean enabled) Specifies if the zoom gesture is enabled for a map view.
-
Field Details
-
CREATOR
-
-
Constructor Details
-
TrimbleMapsMapOptions
Deprecated.UsecreateFromAttributes(Context, AttributeSet)instead.Creates a new TrimbleMapsMapOptions object.
-
-
Method Details
-
createFromAttributes
@NonNull public static TrimbleMapsMapOptions createFromAttributes(@NonNull android.content.Context context) Creates a default TrimbleMapsMapsOptions from a given context.- Parameters:
context- Context related to a map view.- Returns:
- the TrimbleMapsMapOptions created from attributes
-
createFromAttributes
@NonNull public static TrimbleMapsMapOptions createFromAttributes(@NonNull android.content.Context context, @Nullable android.util.AttributeSet attrs) Creates a TrimbleMapsMapsOptions from the attribute set.- Parameters:
context- Context related to a map view.attrs- Attributeset containing configuration- Returns:
- the TrimbleMapsMapOptions created from attributes
-
apiBaseUrl
Deprecated.useapiBaseUriinsteadSpecifies the URL used for API endpoint.- Parameters:
apiBaseUrl- The base of our API endpoint- Returns:
- This
-
apiBaseUri
Specifies the URI used for API endpoint.- Parameters:
apiBaseUri- The base of our API endpoint- Returns:
- This
-
camera
@NonNull public TrimbleMapsMapOptions camera(com.trimblemaps.mapsdk.camera.CameraPosition cameraPosition) Specifies a the initial camera position for the map view.- Parameters:
cameraPosition- Inital camera position- Returns:
- This
-
debugActive
Specifies the used debug type for a map view.- Parameters:
enabled- True is debug is enabled- Returns:
- This
-
minZoomPreference
Specifies the used minimum zoom level for a map view.- Parameters:
minZoom- Zoom level to be used- Returns:
- This
-
maxZoomPreference
Specifies the used maximum zoom level for a map view.- Parameters:
maxZoom- Zoom level to be used- Returns:
- This
-
minPitchPreference
Specifies the used minimum pitch for a map view.- Parameters:
minPitch- Pitch to be used- Returns:
- This
-
maxPitchPreference
Specifies the used maximum pitch for a map view.- Parameters:
maxPitch- Pitch to be used- Returns:
- This
-
compassEnabled
Specifies the visibility state of a trimblemaps_compass_icon for a map view.- Parameters:
enabled- True and trimblemaps_compass_icon is shown- Returns:
- This
-
compassGravity
Specifies the gravity state of trimblemaps_compass_icon for a map view.- Parameters:
gravity- Android SDK Gravity.- Returns:
- This
-
compassMargins
Specifies the margin state of trimblemaps_compass_icon for a map view- Parameters:
margins- 4 long array for LTRB margins- Returns:
- This
-
compassFadesWhenFacingNorth
@NonNull public TrimbleMapsMapOptions compassFadesWhenFacingNorth(boolean compassFadeWhenFacingNorth) Specifies if the trimblemaps_compass_icon fades to invisible when facing north.By default this value is true.
- Parameters:
compassFadeWhenFacingNorth- true is trimblemaps_compass_icon fades to invisble- Returns:
- This
-
compassImage
Specifies the image of the CompassView.By default this value is R.drawable.trimblemaps_compass_icon.
- Parameters:
compass- the drawable to show as image compass- Returns:
- This
-
logoEnabled
Specifies the visibility state of a logo for a map view.- Parameters:
enabled- True and logo is shown- Returns:
- This
-
logoGravity
Specifies the gravity state of logo for a map view.- Parameters:
gravity- Android SDK Gravity.- Returns:
- This
-
logoMargins
Specifies the margin state of logo for a map view- Parameters:
margins- 4 long array for LTRB margins- Returns:
- This
-
attributionEnabled
Specifies the visibility state of a attribution for a map view.- Parameters:
enabled- True and attribution is shown- Returns:
- This
-
attributionGravity
Specifies the gravity state of attribution for a map view.- Parameters:
gravity- Android SDK Gravity.- Returns:
- This
-
attributionMargins
Specifies the margin state of attribution for a map view- Parameters:
margins- 4 long array for LTRB margins- Returns:
- This
-
attributionTintColor
Specifies the tint color of the attribution for a map view- Parameters:
color- integer resembling a color- Returns:
- This
-
rotateGesturesEnabled
Specifies if the rotate gesture is enabled for a map view.- Parameters:
enabled- True and gesture will be enabled- Returns:
- This
-
scrollGesturesEnabled
Specifies if the scroll gesture is enabled for a map view.- Parameters:
enabled- True and gesture will be enabled- Returns:
- This
-
horizontalScrollGesturesEnabled
Specifies if the horizontal scroll gesture is enabled for a map view.- Parameters:
enabled- True and gesture will be enabled- Returns:
- This
-
tiltGesturesEnabled
Specifies if the tilt gesture is enabled for a map view.- Parameters:
enabled- True and gesture will be enabled- Returns:
- This
-
zoomGesturesEnabled
Specifies if the zoom gesture is enabled for a map view.- Parameters:
enabled- True and gesture will be enabled- Returns:
- This
-
doubleTapGesturesEnabled
Specifies if the double tap gesture is enabled for a map view.- Parameters:
enabled- True and gesture will be enabled- Returns:
- This
-
quickZoomGesturesEnabled
Specifies whether the user may zoom the map by tapping twice, holding and moving the pointer up and down.- Parameters:
enabled- True and gesture will be enabled- Returns:
- This
-
textureMode
EnableTextureViewas rendered surface.Since the 5.2.0 release we replaced our TextureView with an
GLSurfaceViewimplementation. Enabling this option will use theTextureViewinstead.TextureViewcan be useful in situations where you need to animate, scale or transform the view. This comes at a siginficant performance penalty and should not be considered unless absolutely needed.- Parameters:
textureMode- True to enable texture mode- Returns:
- This
-
translucentTextureSurface
-
foregroundLoadColor
Set the MapView foreground color that is used when the map surface is being created.- Parameters:
loadColor- the color to show during map creation- Returns:
- This
-
setPrefetchesTiles
Deprecated.UsesetPrefetchZoomDelta(int)instead.Enable tile pre-fetching. Loads tiles at a lower zoom-level to pre-render a low resolution preview while more detailed tiles are loaded. Enabled by default- Parameters:
enable- true to enable- Returns:
- This
-
setPrefetchZoomDelta
Set the tile pre-fetching zoom delta. Pre-fetching makes sure that a low-resolution tile at the (current_zoom_level - delta) is rendered as soon as possible at the expense of a little bandwidth. Note: This operation will override the TrimbleMapsMapOptions#setPrefetchesTiles(boolean) Setting zoom delta to 0 will disable pre-fetching. Default zoom delta is 4.- Parameters:
delta- zoom delta- Returns:
- This
-
crossSourceCollisions
Enable cross-source symbol collision detection, defaults to true.If set to false, symbol layers will only run collision detection against other symbol layers that are part of the same source.
- Parameters:
crossSourceCollisions- true to enable, false to disable- Returns:
- This
-
localIdeographFontFamilyEnabled
Enable local ideograph font family, defaults to true.- Parameters:
enabled- true to enable, false to disable- Returns:
- This
-
localIdeographFontFamily
Set the font family for generating glyphs locally for ideographs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges.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 isTrimbleMapsConstants.DEFAULT_FONT.- Parameters:
fontFamily- font family for local ideograph generation.- Returns:
- This
-
localIdeographFontFamily
Set a font family from range of font families for generating glyphs locally for ideographs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges. The first matching font will be selected. If no valid font found, it defaults toTrimbleMapsConstants.DEFAULT_FONT.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.- Parameters:
fontFamilies- an array of font families for local ideograph generation.- Returns:
- This
-
pixelRatio
Set the custom pixel ratio configuration to override the default value from resources. This ratio will be used to initialise the map with.- Parameters:
pixelRatio- the custom pixel ratio of the map under construction- Returns:
- This
-
getPrefetchesTiles
Deprecated.UsegetPrefetchZoomDelta()instead.Check whether tile pre-fetching is enabled.- Returns:
- true if enabled
-
getPrefetchZoomDelta
@IntRange(from=0L) public int getPrefetchZoomDelta()Check current pre-fetching zoom delta.- Returns:
- current zoom delta.
-
getCrossSourceCollisions
public boolean getCrossSourceCollisions()Check whether cross-source symbol collision detection is enabled.- Returns:
- true if enabled
-
renderSurfaceOnTop
public void renderSurfaceOnTop(boolean renderOnTop) Set the flag to render the map surface on top of another surface.- Parameters:
renderOnTop- true if this map is shown on top of another one, false if bottom.
-
getRenderSurfaceOnTop
public boolean getRenderSurfaceOnTop()Get the flag to render the map surface on top of another surface.- Returns:
- true if this map is
-
getApiBaseUrl
Deprecated.usegetApiBaseUri()insteadGet the current configured API endpoint base URL.- Returns:
- Base URL to be used API endpoint.
-
getApiBaseUri
Get the current configured API endpoint base URI.- Returns:
- Base URI to be used API endpoint.
-
getCamera
public com.trimblemaps.mapsdk.camera.CameraPosition getCamera()Get the current configured initial camera position for a map view.- Returns:
- CameraPosition to be initially used.
-
getMinZoomPreference
public double getMinZoomPreference()Get the current configured min zoom for a map view.- Returns:
- Mininum zoom level to be used.
-
getMaxZoomPreference
public double getMaxZoomPreference()Get the current configured maximum zoom for a map view.- Returns:
- Maximum zoom to be used.
-
getMinPitchPreference
public double getMinPitchPreference()Get the current configured min pitch for a map view.- Returns:
- Mininum pitch to be used.
-
getMaxPitchPreference
public double getMaxPitchPreference()Get the current configured maximum pitch for a map view.- Returns:
- Maximum pitch to be used.
-
getCompassEnabled
public boolean getCompassEnabled()Get the current configured visibility state for trimblemaps_compass_icon for a map view.- Returns:
- Visibility state of the trimblemaps_compass_icon
-
getCompassGravity
public int getCompassGravity()Get the current configured gravity state for trimblemaps_compass_icon for a map view.- Returns:
- Gravity state of the trimblemaps_compass_icon
-
getCompassMargins
public int[] getCompassMargins()Get the current configured margins for trimblemaps_compass_icon for a map view.- Returns:
- Margins state of the trimblemaps_compass_icon
-
getCompassFadeFacingNorth
public boolean getCompassFadeFacingNorth()Get the current configured state for fading the trimblemaps_compass_icon when facing north.- Returns:
- True if trimblemaps_compass_icon fades to invisible when facing north
-
getCompassImage
public android.graphics.drawable.Drawable getCompassImage()Get the current configured CompassView image.- Returns:
- the drawable used as compass image
-
getLogoEnabled
public boolean getLogoEnabled()Get the current configured visibility state for trimblemaps_compass_icon for a map view.- Returns:
- Visibility state of the trimblemaps_compass_icon
-
getLogoGravity
public int getLogoGravity()Get the current configured gravity state for logo for a map view.- Returns:
- Gravity state of the logo
-
getLogoMargins
public int[] getLogoMargins()Get the current configured margins for logo for a map view.- Returns:
- Margins state of the logo
-
getRotateGesturesEnabled
public boolean getRotateGesturesEnabled()Get the current configured rotate gesture state for a map view.- Returns:
- True indicates gesture is enabled
-
getScrollGesturesEnabled
public boolean getScrollGesturesEnabled()Get the current configured scroll gesture state for a map view.- Returns:
- True indicates gesture is enabled
-
getHorizontalScrollGesturesEnabled
public boolean getHorizontalScrollGesturesEnabled()Get the current configured horizontal scroll gesture state for a map view.- Returns:
- True indicates horizontal scroll gesture is enabled
-
getTiltGesturesEnabled
public boolean getTiltGesturesEnabled()Get the current configured tilt gesture state for a map view.- Returns:
- True indicates gesture is enabled
-
getZoomGesturesEnabled
public boolean getZoomGesturesEnabled()Get the current configured zoom gesture state for a map view.- Returns:
- True indicates gesture is enabled
-
getDoubleTapGesturesEnabled
public boolean getDoubleTapGesturesEnabled()Get the current configured double tap gesture state for a map view.- Returns:
- True indicates gesture is enabled
-
getQuickZoomGesturesEnabled
public boolean getQuickZoomGesturesEnabled()Get whether the user may zoom the map by tapping twice, holding and moving the pointer up and down.- Returns:
- True indicates gesture is enabled
-
getAttributionEnabled
public boolean getAttributionEnabled()Get the current configured visibility state for attribution for a map view.- Returns:
- Visibility state of the attribution
-
getAttributionGravity
public int getAttributionGravity()Get the current configured gravity state for attribution for a map view.- Returns:
- Gravity state of the logo
-
getAttributionMargins
public int[] getAttributionMargins()Get the current configured margins for attribution for a map view.- Returns:
- Margins state of the logo
-
getAttributionTintColor
@ColorInt public int getAttributionTintColor()Get the current configured tint color for attribution for a map view.- Returns:
- the tint color
-
getDebugActive
public boolean getDebugActive()Get the current configured debug state for a map view.- Returns:
- True indicates debug is enabled.
-
getTextureMode
public boolean getTextureMode()Returns true if TextureView is being used the render view.- Returns:
- True if TextureView is used.
-
getTranslucentTextureSurface
public boolean getTranslucentTextureSurface()Returns true if TextureView supports a translucent surface- Returns:
- True if translucent surface is active
-
getForegroundLoadColor
@ColorInt public int getForegroundLoadColor()Returns the current configured foreground color that is used during map creation.- Returns:
- the load color
-
getLocalIdeographFontFamily
Returns the font-family for locally overriding generation of glyphs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges. Default font for local ideograph font family isTrimbleMapsConstants.DEFAULT_FONT. Returns null if local ideograph font families are disabled.- Returns:
- Local ideograph font family name.
-
isLocalIdeographFontFamilyEnabled
public boolean isLocalIdeographFontFamilyEnabled()Returns true if local ideograph font family is enabled, defaults to true.- Returns:
- True if local ideograph font family is enabled
-
getPixelRatio
public float getPixelRatio()Return the custom configured pixel ratio, returns 0 if not configured.- Returns:
- the pixel ratio used by the map under construction
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int flags) - Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-
equals
-
hashCode
public int hashCode()
-
createFromAttributes(Context, AttributeSet)instead.