From 902936987ae9910aad7734551e7ab8a347251c37 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Sat, 7 Nov 2026 05:40:54 -0800 Subject: [PATCH 1/3] Draw large polygon sets as raster tiles (PolygonTiler) The polygon controller gets a PolygonTiler, whose tiles are shown through the raster layer path the marker tiles use (upsert / removeById, outside the app's RasterLayer composition). Tiled polygons stay registered for taps and give the map SDK nothing. --- .../mapconductor/here/HereMapViewController.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/mapconductor/here/HereMapViewController.kt b/src/main/java/com/mapconductor/here/HereMapViewController.kt index 8150c0d..1e0b58c 100644 --- a/src/main/java/com/mapconductor/here/HereMapViewController.kt +++ b/src/main/java/com/mapconductor/here/HereMapViewController.kt @@ -1,5 +1,8 @@ package com.mapconductor.here +import com.mapconductor.core.polygon.POLYGON_TILE_LAYER_ID +import com.mapconductor.core.polygon.PolygonTiler +import com.mapconductor.core.polygon.polygonTileRasterLayerState import HereMapDesignTypeChangeHandler import HereMapViewControllerInterface import com.here.sdk.core.Point2D @@ -167,6 +170,19 @@ class HereMapViewController( } }, ) + + // Many polygons are drawn as raster tiles, shown through the same RasterLayer + // controller as the marker tiles (upsert / removeById, never the app's layers). + polygonController.tiler = + PolygonTiler().apply { + onTemplate = { template, tileSize -> + if (template != null) { + rasterLayerController.upsert(polygonTileRasterLayerState(template, tileSize)) + } else { + rasterLayerController.removeById(POLYGON_TILE_LAYER_ID) + } + } + } } override fun moveCamera(position: MapCameraPosition) = handleMoveCamera(position) From 1923dc1dc7cea1903379fda3f951b521d150b037 Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Mon, 9 Nov 2026 06:51:43 -0800 Subject: [PATCH 2/3] Stack the polygon tiles at the bottom of the polygon band With develop's OverlayStacking, a raster layer goes in the raster band, under ground images. The polygon tiles are polygons drawn as images, so they go over ground images and under circles, polylines and markers. --- src/main/java/com/mapconductor/here/HereOverlayStacking.kt | 6 ++++++ .../here/raster/HereRasterLayerOverlayRenderer.kt | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/mapconductor/here/HereOverlayStacking.kt b/src/main/java/com/mapconductor/here/HereOverlayStacking.kt index 83f5257..abb1a8b 100644 --- a/src/main/java/com/mapconductor/here/HereOverlayStacking.kt +++ b/src/main/java/com/mapconductor/here/HereOverlayStacking.kt @@ -29,6 +29,12 @@ internal object HereOverlayStacking { /** GroundImage: "traffic_on_route" レイヤーの手前(ラスターより上、map item より下)。 */ fun groundImagePriority(): MapLayerPriority = MapLayerPriorityBuilder().renderedBeforeLayer(GROUND_IMAGE_ANCHOR).build() + /** + * ポリゴンのタイル(SDK が描くラスター): ポリゴンの帯の一番下。GroundImage のアンカー + * "traffic_on_route" の直後(GroundImage より上、map item より下)。 + */ + fun polygonTilePriority(): MapLayerPriority = MapLayerPriorityBuilder().renderedAfterLayer(GROUND_IMAGE_ANCHOR).build() + private const val RASTER_ANCHOR = "route" private const val GROUND_IMAGE_ANCHOR = "traffic_on_route" } diff --git a/src/main/java/com/mapconductor/here/raster/HereRasterLayerOverlayRenderer.kt b/src/main/java/com/mapconductor/here/raster/HereRasterLayerOverlayRenderer.kt index 212000a..53638d3 100644 --- a/src/main/java/com/mapconductor/here/raster/HereRasterLayerOverlayRenderer.kt +++ b/src/main/java/com/mapconductor/here/raster/HereRasterLayerOverlayRenderer.kt @@ -13,6 +13,7 @@ import com.here.sdk.mapview.datasource.TileSource import com.here.sdk.mapview.datasource.TileUrlProviderCallback import com.here.sdk.mapview.datasource.TileUrlProviderFactory import com.here.sdk.mapview.datasource.TilingScheme +import com.mapconductor.core.polygon.POLYGON_TILE_LAYER_ID import com.mapconductor.core.raster.RasterLayerEntityInterface import com.mapconductor.core.raster.RasterLayerOverlayRendererInterface import com.mapconductor.core.raster.RasterLayerSource @@ -156,11 +157,14 @@ class HereRasterLayerOverlayRenderer( /** * アプリのラスターはラスターの帯(GroundImage・map item の下)。マーカーのタイルは - * マーカーの帯なので、ポリゴン等の map item より上(最後に描く)。 + * マーカーの帯なので、ポリゴン等の map item より上(最後に描く)。ポリゴンのタイルは + * ポリゴンの帯の一番下(GroundImage の上、map item の下)。 */ private fun priorityFor(state: RasterLayerState): MapLayerPriority = if (state.id.startsWith("marker-tile-")) { MapLayerPriorityBuilder().renderedLast().build() + } else if (state.id == POLYGON_TILE_LAYER_ID) { + HereOverlayStacking.polygonTilePriority() } else { HereOverlayStacking.rasterPriority() } From d94b6ac7ed31e2d4bb3da1eace2f087e33cf81ec Mon Sep 17 00:00:00 2001 From: Masashi Katsumata Date: Mon, 9 Nov 2026 06:55:03 -0800 Subject: [PATCH 3/3] Update the API baseline Additions only: the polygon tiles' stacking key, and declarations develop added without running apiDump (TILE_REFRESH_COALESCE, and on ArcGIS the marker controller's constructor that takes a boolean). --- api/android-for-here.api | 1 + 1 file changed, 1 insertion(+) diff --git a/api/android-for-here.api b/api/android-for-here.api index bca3220..e3ef70e 100644 --- a/api/android-for-here.api +++ b/api/android-for-here.api @@ -191,6 +191,7 @@ public final class com.mapconductor.here.HereOverlayStacking { public final int polylineDrawOrder(int); public final com.here.sdk.mapview.MapLayerPriority rasterPriority(); public final com.here.sdk.mapview.MapLayerPriority groundImagePriority(); + public final com.here.sdk.mapview.MapLayerPriority polygonTilePriority(); } public final class com.mapconductor.here.HereTypeAliasKt { }