ProtomapsGridState

open class ProtomapsGridState(val zoomLevel: Int = MAX_ZOOM_LEVEL, val gridSize: Int = GRID_SIZE, passedInTreeContext: CloseableCoroutineDispatcher? = null) : GridState

Constructors

Link copied to clipboard
constructor(zoomLevel: Int = MAX_ZOOM_LEVEL, gridSize: Int = GRID_SIZE, passedInTreeContext: CloseableCoroutineDispatcher? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val treeContext: ExecutorCoroutineDispatcher
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

clearTileConnectionsFromGrid removes all joining ways from the grid.

Link copied to clipboard
open override fun fixupCollections(featureCollections: Array<FeatureCollection>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun locationUpdate(location: LngLatAlt, enabledCategories: Set<String>): Boolean

The tile grid service is called each time the location changes. It checks if the location has moved away from the center of the current tile grid and if it has calculates a new grid.

Link copied to clipboard
fun processGridState(featureCollections: Array<FeatureCollection>, enabledCategories: Set<String>, newGridIntersections: List<HashMap<LngLatAlt, Intersection>>, localTrees: Array<FeatureTree>, intersectionAccumulator: HashMap<LngLatAlt, Intersection>, grid: TileGrid)

processGridState is now called from within the single thread that can access the tile grid. This makes it somewhat performance critical. However, by doing this it allows us to disconnect and reconnect the tile grid

Link copied to clipboard
open override fun start(applicationContext: Context)
Link copied to clipboard
fun stop()