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
41 changes: 18 additions & 23 deletions api/android-for-mapbox.api
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public final class com.mapconductor.mapbox.MapboxMapDesignKt {
public static final com.mapconductor.core.map.MapDesignTypeInterface<java.lang.String> toMapDesignType(com.mapbox.maps.Style);
}
public final class com.mapconductor.mapbox.MapboxMapViewController extends com.mapconductor.core.controller.BaseMapViewController implements MapboxMapViewControllerInterface,com.mapbox.maps.plugin.gestures.OnMapClickListener,com.mapbox.maps.plugin.gestures.OnMapLongClickListener,com.mapbox.maps.plugin.gestures.OnMoveListener {
public com.mapconductor.mapbox.MapboxMapViewController(com.mapconductor.mapbox.MapboxMapViewHolder, com.mapconductor.core.map.MapProjection, com.mapconductor.mapbox.marker.MapboxMarkerController, com.mapconductor.mapbox.polyline.MapboxPolylineController, com.mapconductor.mapbox.polygon.MapboxPolygonConductor, com.mapconductor.mapbox.groundimage.MapboxGroundImageController, com.mapconductor.mapbox.circle.MapboxCircleController, com.mapconductor.mapbox.raster.MapboxRasterLayerController, kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.CoroutineScope);
public com.mapconductor.mapbox.MapboxMapViewController(com.mapconductor.mapbox.MapboxMapViewHolder, com.mapconductor.core.map.MapProjection, com.mapconductor.mapbox.marker.MapboxMarkerController, com.mapconductor.mapbox.polyline.MapboxPolylineController, com.mapconductor.mapbox.polygon.MapboxPolygonConductor, com.mapconductor.mapbox.groundimage.MapboxGroundImageController, com.mapconductor.mapbox.circle.MapboxCircleController, com.mapconductor.mapbox.raster.MapboxRasterLayerController, kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.CoroutineScope, int, kotlin.jvm.internal.DefaultConstructorMarker);
public com.mapconductor.mapbox.MapboxMapViewController(com.mapconductor.mapbox.MapboxMapViewHolder, com.mapconductor.core.map.MapProjection, com.mapconductor.mapbox.marker.MapboxMarkerController, com.mapconductor.mapbox.polyline.MapboxPolylineController, com.mapconductor.mapbox.polygon.MapboxPolygonController, com.mapconductor.mapbox.groundimage.MapboxGroundImageController, com.mapconductor.mapbox.circle.MapboxCircleController, com.mapconductor.mapbox.raster.MapboxRasterLayerController, kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.CoroutineScope);
public com.mapconductor.mapbox.MapboxMapViewController(com.mapconductor.mapbox.MapboxMapViewHolder, com.mapconductor.core.map.MapProjection, com.mapconductor.mapbox.marker.MapboxMarkerController, com.mapconductor.mapbox.polyline.MapboxPolylineController, com.mapconductor.mapbox.polygon.MapboxPolygonController, com.mapconductor.mapbox.groundimage.MapboxGroundImageController, com.mapconductor.mapbox.circle.MapboxCircleController, com.mapconductor.mapbox.raster.MapboxRasterLayerController, kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.CoroutineScope, int, kotlin.jvm.internal.DefaultConstructorMarker);
public com.mapconductor.mapbox.MapboxMapViewHolder getHolder();
public kotlinx.coroutines.CoroutineScope getMainCoroutine();
public kotlinx.coroutines.CoroutineScope getDefaultCoroutine();
Expand Down Expand Up @@ -191,7 +191,7 @@ public final class com.mapconductor.mapbox.MapboxMapViewHolder implements com.ma
public final class com.mapconductor.mapbox.MapboxMapViewKt {
public static final void MapboxMapView(com.mapconductor.mapbox.MapboxViewState, androidx.compose.ui.Modifier, com.mapconductor.core.marker.MarkerTilingOptions, com.mapconductor.core.map.CameraRestriction, kotlin.jvm.functions.Function2<? super android.content.Context, ? super kotlin.coroutines.Continuation<? super java.lang.Boolean>, ? extends java.lang.Object>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.map.MapViewStateInterface<?>, kotlin.Unit>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.features.GeoPoint, kotlin.Unit>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.features.GeoPoint, kotlin.Unit>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.map.MapCameraPosition, kotlin.Unit>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.map.MapCameraPosition, kotlin.Unit>, kotlin.jvm.functions.Function1<? super com.mapconductor.core.map.MapCameraPosition, kotlin.Unit>, com.mapconductor.core.map.MapProjection, com.mapconductor.core.map.MapViewStyle, kotlin.jvm.functions.Function1<? super java.util.List<java.lang.String>, kotlin.Unit>, kotlin.jvm.functions.Function3<? super com.mapconductor.mapbox.MapboxMapViewScope, ? super androidx.compose.runtime.Composer, ? super java.lang.Integer, kotlin.Unit>, androidx.compose.runtime.Composer, int, int, int);
public static final com.mapconductor.mapbox.MapboxMapViewController createMapboxViewController(com.mapconductor.mapbox.MapboxMapViewHolder, com.mapconductor.core.marker.MarkerTilingOptions, com.mapconductor.core.map.MapProjection, com.mapconductor.core.map.MutableMapServiceRegistry);
public static final com.mapconductor.mapbox.polygon.MapboxPolygonConductor getPolygonController(com.mapconductor.mapbox.MapboxMapViewHolder);
public static final com.mapconductor.mapbox.polygon.MapboxPolygonController getPolygonController(com.mapconductor.mapbox.MapboxMapViewHolder);
public static final com.mapconductor.mapbox.circle.MapboxCircleController getCircleController(com.mapconductor.mapbox.MapboxMapViewHolder);
public static final com.mapconductor.mapbox.polyline.MapboxPolylineController getPolylineController(com.mapconductor.mapbox.MapboxMapViewHolder);
public static final com.mapconductor.mapbox.marker.MapboxMarkerController getMarkerController(com.mapconductor.mapbox.MapboxMapViewHolder, com.mapconductor.core.marker.MarkerTilingOptions);
Expand Down Expand Up @@ -400,27 +400,22 @@ public class com.mapconductor.mapbox.marker.MarkerLayer {
public final boolean wouldSkipDraw(java.util.List<? extends com.mapconductor.core.marker.MarkerEntityInterface<com.mapbox.geojson.Feature>>);
public final void draw(java.util.List<? extends com.mapconductor.core.marker.MarkerEntityInterface<com.mapbox.geojson.Feature>>);
}
public final class com.mapconductor.mapbox.polygon.MapboxPolygonConductor implements com.mapconductor.core.controller.SlottedOverlayController<com.mapconductor.core.polygon.PolygonState, com.mapconductor.core.polygon.PolygonEntityInterface<com.mapconductor.core.polygon.PolygonState>> {
public com.mapconductor.mapbox.polygon.MapboxPolygonConductor(com.mapconductor.mapbox.polygon.MapboxPolygonOverlayRenderer, com.mapconductor.mapbox.polyline.MapboxPolylineOverlayRenderer);
public final com.mapconductor.mapbox.polygon.MapboxPolygonOverlayRenderer getPolygonOverlay();
public final com.mapconductor.mapbox.polyline.MapboxPolylineOverlayRenderer getPolylineOverlay();
public int getZIndex();
public java.lang.Object add(java.util.List<com.mapconductor.core.polygon.PolygonState>, kotlin.coroutines.Continuation<? super kotlin.Unit>);
public java.lang.Object update(com.mapconductor.core.polygon.PolygonState, kotlin.coroutines.Continuation<? super kotlin.Unit>);
public final void dispatchClick(com.mapconductor.core.polygon.PolygonEvent);
public final kotlin.jvm.functions.Function1<com.mapconductor.core.polygon.PolygonEvent, kotlin.Unit> getClickListener();
public final void setClickListener(kotlin.jvm.functions.Function1<? super com.mapconductor.core.polygon.PolygonEvent, kotlin.Unit>);
public com.mapconductor.core.polygon.PolygonEntityInterface<com.mapconductor.core.polygon.PolygonState> find(com.mapconductor.core.features.GeoPointInterface);
public java.lang.Object clear(kotlin.coroutines.Continuation<? super kotlin.Unit>);
public com.mapconductor.core.controller.OverlayKind getKind();
public boolean has(java.lang.String);
public void setClickListenerAny(java.lang.Object);
public com.mapconductor.core.controller.OverlayHit resolveTap(com.mapconductor.core.features.GeoPointInterface);
public void destroy();
public java.lang.Object update(java.lang.Object, kotlin.coroutines.Continuation);
public java.lang.Object find(com.mapconductor.core.features.GeoPointInterface);
public final class com.mapconductor.mapbox.polygon.MapboxPolygonCompositeRenderer implements com.mapconductor.core.polygon.PolygonOverlayRendererInterface<java.util.List<? extends com.mapbox.geojson.Feature>> {
public com.mapconductor.mapbox.polygon.MapboxPolygonCompositeRenderer(com.mapconductor.mapbox.polygon.MapboxPolygonOverlayRenderer, com.mapconductor.mapbox.polyline.MapboxPolylineOverlayRenderer);
public final com.mapconductor.mapbox.polygon.MapboxPolygonOverlayRenderer getFill();
public final com.mapconductor.mapbox.polyline.MapboxPolylineOverlayRenderer getOutline();
public java.lang.Object onAdd(java.util.List<? extends com.mapconductor.core.polygon.PolygonOverlayRendererInterface$AddParamsInterface>, kotlin.coroutines.Continuation<? super java.util.List<? extends java.util.List<com.mapbox.geojson.Feature>>>);
public java.lang.Object onChange(java.util.List<? extends com.mapconductor.core.polygon.PolygonOverlayRendererInterface$ChangeParamsInterface<java.util.List<com.mapbox.geojson.Feature>>>, kotlin.coroutines.Continuation<? super java.util.List<? extends java.util.List<com.mapbox.geojson.Feature>>>);
public java.lang.Object onRemove(java.util.List<? extends com.mapconductor.core.polygon.PolygonEntityInterface<java.util.List<com.mapbox.geojson.Feature>>>, kotlin.coroutines.Continuation<? super kotlin.Unit>);
public java.lang.Object onPostProcess(kotlin.coroutines.Continuation<? super kotlin.Unit>);
}
public final class com.mapconductor.mapbox.polygon.MapboxPolygonConductorKt {
public final class com.mapconductor.mapbox.polygon.MapboxPolygonCompositeRendererKt {
}
public final class com.mapconductor.mapbox.polygon.MapboxPolygonController extends com.mapconductor.core.polygon.PolygonController<java.util.List<? extends com.mapbox.geojson.Feature>> {
public com.mapconductor.mapbox.polygon.MapboxPolygonController(com.mapconductor.mapbox.polygon.MapboxPolygonCompositeRenderer);
public com.mapconductor.mapbox.polygon.MapboxPolygonCompositeRenderer getRenderer();
public int getZIndex();
public com.mapconductor.core.polygon.PolygonOverlayRendererInterface getRenderer();
}
public final class com.mapconductor.mapbox.polygon.MapboxPolygonLayer {
public com.mapconductor.mapbox.polygon.MapboxPolygonLayer(java.lang.String, java.lang.String);
Expand Down
37 changes: 37 additions & 0 deletions docs/polygon/MapboxPolygonCompositeRenderer.kt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# MapboxPolygonCompositeRenderer

## Signature

```kotlin
class MapboxPolygonCompositeRenderer(
val fill: MapboxPolygonOverlayRenderer,
val outline: MapboxPolylineOverlayRenderer,
) : PolygonOverlayRendererInterface<MapboxActualPolygon>
```

## Description

Presents the fill renderer and the outline renderer to the core `PolygonController` as a single
renderer.

A Mapbox fill layer can only draw a 1 px outline with no width, so to honour `strokeWidth` each
polygon's outer ring is also drawn as a closed polyline with the id `outline-<polygon id>` through
`outline`. Every call the controller makes on this renderer is forwarded to `fill` and mirrored on
`outline`:

- `onAdd` / `onChange`: the fill is created or rebuilt; when that succeeds, the outline polyline is
(re)created with the polygon's `strokeColor`, `strokeWidth`, `geodesic`, `zIndex` and `extra`.
- `onRemove`: the outline polylines are dropped and both sources are redrawn without the removed
polygons (the controller's `clear()` does not call `onPostProcess`).
- `onPostProcess`: both sources are redrawn.

Holes are not outlined.

## Constructor Parameters

- `fill`
- Type: `MapboxPolygonOverlayRenderer`
- Description: Draws the polygon fill (with holes) into the fill source.
- `outline`
- Type: `MapboxPolylineOverlayRenderer`
- Description: Draws the outlines into the polygon outline source.
221 changes: 0 additions & 221 deletions docs/polygon/MapboxPolygonConductor.kt.md

This file was deleted.

30 changes: 30 additions & 0 deletions docs/polygon/MapboxPolygonController.kt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# MapboxPolygonController

## Signature

```kotlin
class MapboxPolygonController(
override val renderer: MapboxPolygonCompositeRenderer,
) : PolygonController<MapboxActualPolygon>(renderer.fill.polygonManager, renderer)
```

## Description

The polygon controller of the Mapbox provider. It extends the core `PolygonController`, so diffing
(add / change / remove), `has`, `find`, the click cascade (`resolveTap`, `dispatchClick`),
`clear` and `destroy` are the core implementation shared with every other provider.

The only provider-specific part is the renderer: a fill layer can only draw a 1 px outline, so the
outline is drawn as a separate polyline by [`MapboxPolygonCompositeRenderer`](./MapboxPolygonCompositeRenderer.kt.md).

## Constructor Parameters

- `renderer`
- Type: `MapboxPolygonCompositeRenderer`
- Description: Draws both the fill and the outline. Its `fill.polygonManager` is used as the
controller's polygon manager, so the controller and the fill renderer always see the same
entities.

## Properties

- `zIndex`: `2` (unchanged from the former `MapboxPolygonConductor`).
Loading
Loading