googlemaps / googlemaps/android-maps-utils

Kml Style width for LineString is not rendered in pixels

Aperta
#1,401 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
priority: p1 type: bug
Lingua principale
Kotlin
Stelle
3.6k
Fork
1.6k
Merge medio
2g 20h
PR unite (30g)
17

Descrizione

#### Summary

Kml Style width for LineString is not rendered in pixels

#### Expected behavior

The KML style width in float needs to be converted to pixels while rendering map.

#### Observed behavior

The KML style width is very thin on the map and there is a difference between 10dp width line and 10.0 as strokline width. The rendering of the same KML file line strings on google maps on Android is different from the thickness of the line strings on iOS.We also observed that the kml file without width element appears too thick on Android and very thin on iOS.

#### Environment details

1. All android versions and all device model
2. Google maps utility version "com.google.maps.android:android-maps-utils:3.8.2")

#### Steps to reproduce

Render any kml that has this style element and apply to line strings:

<LineStyle>
<color>9aB10FDA</color>
<width>10.0</width>
</LineStyle>

#### Code example

val kmlLayer = KmlLayer(
googleMap,
replaceWidthValue(ByteArrayInputStream(kmlByteArray)),
this
)
kmlLayer?.addLayerToMap()

I am unable to override the style using this kmlLayer object as the KmlStyle is not exposed. Please help to fix this as the rendering is not uniform on iOS and Android. Kindly provide us with as solution or workaround quickly if possible.

Thanks,
Aiswarya

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia tracciando KmlLayer.addLayerToMap() e la gestione della larghezza di KML LineStyle descritta nel report. Riproduci il problema con l'XML fornito contenente width 10.0, quindi verifica che la larghezza della linea renderizzata venga convertita coerentemente in pixel e corrisponda al comportamento Android previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, kotlin
Ambito
mobile
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.