Class Source
java.lang.Object
com.trimblemaps.mapsdk.style.sources.Source
Base Peer class for sources. see source.hpp for the other half of the peer.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidValidates if source interaction is happening on the UI threadRetrieve the source attribution.getId()Retrieve the source idRetrieve current maximum overscale factor for parent tiles.Retrieve the minimum tile update interval, which is used to throttle the tile update network requests.longInternal useRetrieve current pre-fetching zoom delta.Retrieve whether or not the fetched tiles for the given source should be stored in the local cacheprotected Stringprotected Stringprotected Integerprotected Longprotected Integerprotected Booleanprotected voidnativeSetMaxOverscaleFactorForParentTiles(Integer maxOverscaleFactor) protected voidnativeSetMinimumTileUpdateInterval(Long interval) protected voidprotected voidnativeSetVolatile(Boolean value) voidvoidsetMaxOverscaleFactorForParentTiles(Integer maxOverscaleFactor) When a set of tiles for a current zoom level is being rendered and some of the ideal tiles that cover the screen are not yet loaded, parent tile could be used instead.voidsetMinimumTileUpdateInterval(Long interval) Sets the minimum tile update interval, which is used to throttle the tile update network requests.voidsetPrefetchZoomDelta(Integer delta) Set the tile pre-fetching zoom delta for current source.voidsetVolatile(Boolean value) Set a flag defining whether or not the fetched tiles for the given source should be stored in the local cache
-
Field Details
-
detached
protected boolean detached
-
-
Constructor Details
-
Source
protected Source(long nativePtr) Internal use- Parameters:
nativePtr- - pointer to native peer
-
Source
public Source()
-
-
Method Details
-
checkThread
protected void checkThread()Validates if source interaction is happening on the UI thread -
getId
Retrieve the source id- Returns:
- the source id
-
getAttribution
Retrieve the source attribution.Will return an empty String if no attribution is available.
- Returns:
- the string representation of the attribution in html format
-
getPrefetchZoomDelta
Retrieve current pre-fetching zoom delta.- Returns:
- current zoom delta or null if not set.
-
setPrefetchZoomDelta
Set the tile pre-fetching zoom delta for current source. 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. If delta has not been set or set to null, it will use the value in TrimbleMapsMap instance.- Parameters:
delta- zoom delta
-
setMaxOverscaleFactorForParentTiles
When a set of tiles for a current zoom level is being rendered and some of the ideal tiles that cover the screen are not yet loaded, parent tile could be used instead. This might introduce unwanted rendering side-effects, especially for raster tiles that are overscaled multiple times. This method sets the maximum limit for how much a parent tile can be overscaled.- Parameters:
maxOverscaleFactor- maximum overscale factor
-
getMaxOverscaleFactorForParentTiles
Retrieve current maximum overscale factor for parent tiles.- Returns:
- current maximum overscale factor or null if not set.
-
isVolatile
Retrieve whether or not the fetched tiles for the given source should be stored in the local cache- Returns:
- true if tiles are volatile, false if they will be stored in local cache. Default value is false.
-
setVolatile
Set a flag defining whether or not the fetched tiles for the given source should be stored in the local cache- Parameters:
value- current setting for volatile.
-
setMinimumTileUpdateInterval
Sets the minimum tile update interval, which is used to throttle the tile update network requests.- Parameters:
interval- the update interval in milliseconds.
-
getMinimumTileUpdateInterval
Retrieve the minimum tile update interval, which is used to throttle the tile update network requests.- Returns:
- the update interval in milliseconds, default valuse is 0.
-
getNativePtr
public long getNativePtr()Internal use- Returns:
- the native peer pointer
-
nativeGetId
-
nativeGetAttribution
-
nativeGetPrefetchZoomDelta
-
nativeSetPrefetchZoomDelta
-
nativeSetMaxOverscaleFactorForParentTiles
-
nativeGetMaxOverscaleFactorForParentTiles
-
nativeIsVolatile
-
nativeSetVolatile
-
nativeSetMinimumTileUpdateInterval
-
nativeGetMinimumTileUpdateInterval
-
setDetached
public void setDetached()
-