mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
478 stars 135 forks source link

There are gap between images when using PolylineAnnotationOptions.withLinePattern #2420

Open maonanyue opened 4 months ago

maonanyue commented 4 months ago

Environment

Observed behavior and steps to reproduce

 private fun addNavSportTrackLine(
        points: List<Point>,
        line: RouteLine
    ): PolylineAnnotation {
        val polylineAnnotationOptions = PolylineAnnotationOptions()
            .withLineWidth(lineWidth)
            .withPoints(points)
            .withData(JsonPrimitive(line.style.number))
        line.patterType2?.let {
            polylineAnnotationOptions.withLinePattern(ExploreImgCfg.getPatterKeyByType(it))
        }
        line.width?.let {
            polylineAnnotationOptions.withLineWidth(it.toDouble())
        }
        return polySportTrackLineManager.create(polylineAnnotationOptions)
    }

Expected behavior

Without gap between images

Notes / preliminary analysis

Additional links and references

sprite image image

Screenshot image