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

MGLFillStyleLayer are drawn at wrong map-layer #14779

Closed

Description

@Jackhammer42

Hey i discovered an issue in version 5.0.0 in the mapbox gl native SDK for iOS.

iOS: 12.2
iPhone XR
Xcode: 10.2

In our app we draw several polygons with the following code:

       `let url = URL(string: overlay.geojson_url)
        
        // Create source and add it to the map style.
        let source = MGLShapeSource(identifier: "\(overlay.id)", url: url!, options: nil)
        
        let layer = MGLFillStyleLayer(identifier: "\(overlay.id)", source: source)
        
        layer.fillColor = NSExpression(forConstantValue: UIColor(rgba: overlay.fill_color))
        layer.fillOpacity = NSExpression(forConstantValue: overlay.fill_opacity as NSNumber)
        
        let sourceAvailable = sources.filter({$0.identifier == overlay.id})
        
        if sourceAvailable.count == 0 {
            
            mapView.style!.addSource(source)
            
        }
        
        let annotationLayer = mapView.style?.layers.filter({$0.identifier == "com.mapbox.annotations.points"}).first
        
        mapView.style!.insertLayer(layer, below: annotationLayer!)`

We expected to see the following behaviour like in version 4.6.0:

2019-05-28_09-26-11

Instead the following happened in version 5.0.0:

2019-05-28_09-25-43

The same happens in the Android SDK Version 8.0.0. In addition we discovered that the position indicator in the Android SDK (v.8.0.0) is drawn below buildings in the map.

mapbox location dot

Activity

  1. changed the title [-]MGLFillStyleLayer are drawn at wrong maplayer[/-] [+]MGLFillStyleLayer are drawn at wrong map-layer[/+] on May 28, 2019
  2. jmkiley commented on May 28, 2019

    @jmkiley
    Contributor

    It looks like fill extrusion layers are being rendered above fill layers. This can be repro'd in iosapp by selecting Add Building Extrusions, then Dynamically Style Polygon.

    cc @kkaefer

  3. added
    Core
    on May 28, 2019
  4. mrfaa commented on Jun 21, 2019

    @mrfaa

    Hi @jmkiley @kkaefer The same happens to me in the Android SDK Version 8.0.0. Is there any update on this issue?

    Thank you very much in advance!

  5. snkashis commented on Jun 23, 2019

    @snkashis
    Contributor

    Yeah, I encountered this as well in the move to 8.0.0. Is this going to be remedied in 8.2.0?

  6. tobrun commented on Jun 25, 2019

    @tobrun
    Member
  7. tmpsantos commented on Jun 25, 2019

    @tmpsantos
    Contributor

    Wondering if this is somehow related to #14844

  8. self-assigned this
    on Jul 6, 2019
  9. tmpsantos commented on Jul 9, 2019

    @tmpsantos
    Contributor

    Fixed in #15065.

  10. added this to the release-picklejuice milestone on Jul 9, 2019
  11. added 4 commits that reference this issue on Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Corebugrendering

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions