Skip to content

Commit

Permalink
Apply style to polygon drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
gino-m committed Oct 2, 2023
1 parent ee4f070 commit 856124a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,16 @@ internal constructor(private val uuidGenerator: OfflineUuidGenerator, resources:
}

/** Returns a set of [Feature] to be drawn on map for the given [Polygon]. */
private fun refreshFeatures(points: List<Point>, isMarkedComplete: Boolean) {
private fun refreshFeatures(vertices: List<Point>, isMarkedComplete: Boolean) {
featureFlow.value =
if (points.isEmpty()) {
if (vertices.isEmpty()) {
null
} else {
Feature(
id = uuidGenerator.generateUuid(),
type = FeatureType.USER_POLYGON.ordinal,
geometry = createGeometry(points, isMarkedComplete),
// TODO: Set correct color.
style = Feature.Style(Color.CYAN, Feature.VertexStyle.CIRCLE),
geometry = createGeometry(vertices, isMarkedComplete),
style = Feature.Style(strokeColor, Feature.VertexStyle.CIRCLE),
clusterable = false
)
}
Expand Down

0 comments on commit 856124a

Please sign in to comment.