Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Layer not displayed when in Arabic locale, Android 8.x #13581

Closed
Oyzuu opened this issue Dec 14, 2018 · 2 comments
Closed

Layer not displayed when in Arabic locale, Android 8.x #13581

Oyzuu opened this issue Dec 14, 2018 · 2 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@Oyzuu
Copy link

Oyzuu commented Dec 14, 2018

Hi,

I'm developing a game where I need to display player location. I do so by drawing two CircleLayers to display a crosshair and one FillLayer to display a perimeter.

It works fine, and worked for a previous version of the game, except when we face an Android 8.x / arabic locale combination.

How is RTL affecting the drawing order ?
Is there something I can do to fix it ?

This is the code for the player crosshair:

protected fun addPlayerSourceAndLayer() {
    // Player source
    map?.addSource(GeoJsonSource(DOT_SOURCE_ID))

    // Player circle stroke
    map?.addLayer(CircleLayer("playerCircleStroke", DOT_SOURCE_ID).apply {
        withProperties(PropertyFactory.circleRadius(PLAYER_CIRCLE_RADIUS),
            PropertyFactory.circleStrokeColor(playerColor),
            PropertyFactory.circleStrokeWidth(PLAYER_CIRCLE_STROKE_WIDTH),
            PropertyFactory.circleOpacity(PLAYER_CIRCLE_OPACITY))
    })

    // Player circle dot
    map?.addLayer(CircleLayer("playerDot", DOT_SOURCE_ID).apply {
        withProperties(PropertyFactory.circleRadius(PLAYER_DOT_RADIUS),
            PropertyFactory.circleColor(playerColor))
    })
}

And the code for the perimeter:

protected fun addPerimeterSourceAndLayer() {
    map?.addSource(GeoJsonSource(PERIMETER_SOURCE_ID))

    // Collection perimeter
    map?.addLayer(FillLayer("playerCollectionPerimeter", PERIMETER_SOURCE_ID).apply {
        withProperties(PropertyFactory.fillColor(perimeterColor),
            PropertyFactory.fillOpacity(PERIMETER_OPACITY),
            PropertyFactory.S)
    })
}

Those are updated every time I get and updated user location, in that order:

private fun refreshUserPosition() {
    updateCameraPosition()
    updatePlayerIndicator()
    updatePlayerPerimeter()
}
@LukasPaczos
Copy link
Contributor

This looks like a duplicate of #13421, resolved by #13393. Would you be able to retest your setup with the 7.0.0-alpha.2, 7.0.0-alpha.3 or 7.0.0-beta.1?

@LukasPaczos LukasPaczos added the Android Mapbox Maps SDK for Android label Dec 18, 2018
@LukasPaczos LukasPaczos added this to the android-v6.8.0 milestone Dec 18, 2018
@LukasPaczos
Copy link
Contributor

#13393 is available in the Maps SDK 6.8.0. I'm going to go ahead and close this as resolved, but please don't hesitate to reach out if that isn't the case and we can reopen. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

2 participants