Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.mapconductor.googlemaps

import com.mapconductor.core.circle.CIRCLE_TILE_LAYER_ID
import com.mapconductor.core.circle.CircleTiler
import com.mapconductor.core.circle.circleTileRasterLayerState
import com.google.android.gms.maps.GoogleMap
import com.google.android.gms.maps.GoogleMap.OnCameraIdleListener
import com.google.android.gms.maps.GoogleMap.OnCameraMoveCanceledListener
Expand Down Expand Up @@ -127,6 +130,16 @@ class GoogleMapViewController internal constructor(
}
}
}
circleController.tiler =
CircleTiler().apply {
onTemplate = { template, tileSize ->
if (template != null) {
rasterLayerController.upsert(circleTileRasterLayerState(template, tileSize))
} else {
rasterLayerController.removeById(CIRCLE_TILE_LAYER_ID)
}
}
}
}

override fun moveCamera(position: MapCameraPosition) = handleMoveCamera(position)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.google.android.gms.maps.model.TileProvider.NO_TILE
import com.mapconductor.core.controller.OverlayKind
import com.mapconductor.core.controller.OverlayStacking
import com.mapconductor.core.polygon.POLYGON_TILE_LAYER_ID
import com.mapconductor.core.circle.CIRCLE_TILE_LAYER_ID
import com.mapconductor.core.polyline.POLYLINE_TILE_LAYER_ID
import com.mapconductor.core.raster.RasterLayerEntityInterface
import com.mapconductor.core.raster.RasterLayerOverlayRendererInterface
Expand Down Expand Up @@ -105,6 +106,8 @@ class GoogleMapRasterLayerOverlayRenderer(
} else if (state.id == POLYGON_TILE_LAYER_ID) {
// ポリゴンのタイルはポリゴンの帯の一番下(GroundImage より上、ネイティブのポリゴンより下)。
OverlayStacking.flatZIndex(OverlayKind.Polygon, Int.MIN_VALUE)
} else if (state.id == CIRCLE_TILE_LAYER_ID) {
OverlayStacking.flatZIndex(OverlayKind.Circle, Int.MIN_VALUE)
} else if (state.id == POLYLINE_TILE_LAYER_ID) {
// ポリラインのタイルはポリラインの帯の一番下(サークルより上、ネイティブのポリラインより下)。
OverlayStacking.flatZIndex(OverlayKind.Polyline, Int.MIN_VALUE)
Expand Down
Loading