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.

FillExtrusionLayer not shown for cached tile #8871

Closed

Description

@tobrun

Use-case to reproduce this:

  • startup a map and wait a few seconds
  • press a button to add a FillExtrusionLayer to the map

ezgif com-video-to-gif 47

I'm noticing that

  • FillExtrusionLayer isn't shown for the current cached tile
  • panning shows extrusions on other tiles
  • zooming out shows extrusions, zooming back in removes them again

Side-note, this doesn't occur if you add a FillExtrusionLayer as result of onDidFinishLoadingStyle.

Activity

  1. added
    Core
    on May 3, 2017
  2. added this to the android-v5.1.0 milestone on May 3, 2017
  3. kkaefer commented on May 9, 2017

    @kkaefer
    Member

    /cc @lbud

  4. lbud commented on May 9, 2017

    @lbud
    Contributor

    🤕
    Does this problem also manifest if you add a different layer type (e.g. a fill layer) at runtime? I can't think of anything about fill extrusion layers that would make them behave differently than other types when it comes to tile parsing 😕

  5. ivovandongen commented on May 10, 2017

    @ivovandongen
    Contributor

    Does this problem also manifest if you add a different layer type

    @lbud I have the strong suspicion that it does. See #8833

  6. tobrun commented on May 10, 2017

    @tobrun
    MemberAuthor

    @lbud to valiidate if this was a general issue with layers, I changed the FillExtrusionLayer with a FillLayer using this geojson source. This seem to be added correctly to the map though the are some differences in setup (filter + geojson source).

    Code used:

        try {
          GeoJsonSource jsonSource = new GeoJsonSource("uk-borders", new URL("https://gist.githubusercontent.com/tobrun/085903199b9926950bafe35d1b4f5ff5/raw/b67da310e4df0491899ba452f899d39c05370c32/gistfile1.geojson"));
          mapboxMap.addSource(jsonSource);
        } catch (MalformedURLException e) {
          throw new RuntimeException();
        }
        FillLayer fillLayer = new FillLayer("uk-borders", "uk-borders");
        fillLayer.setProperties(fillColor(Color.LTGRAY), fillOpacity(0.6f));
        fillLayer.setMinZoom(15);
        mapboxMap.addLayer(fillLayer);

    @ivovandongen while they could be related. There is a small difference: the buildings disappear again when zooming to the initial zoom level. In #8833, the SymbolAnnotation don't disappear after they where rendered correctly by zooming.

  7. lbud commented on May 10, 2017

    @lbud
    Contributor

    I got this set up on the MacOS app where I used the same vector layer setup for both layers:

        MGLSource *streetsSource = [self.mapView.style sourceWithIdentifier:@"composite"];
        MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithIdentifier:@"extrusions" source:streetsSource];
        fillLayer.sourceLayerIdentifier = @"building";
        fillLayer.fillColor = [MGLStyleValue valueWithRawValue:[NSColor blueColor]];
    
        MGLSource *streetsSource = [self.mapView.style sourceWithIdentifier:@"composite"];
        MGLFillExtrusionStyleLayer *fillExtrusionLayer = [[MGLFillExtrusionStyleLayer alloc] initWithIdentifier:@"extrusions" source:streetsSource];
        fillExtrusionLayer.sourceLayerIdentifier = @"building";
        fillExtrusionLayer.fillExtrusionColor = [MGLStyleValue valueWithRawValue:[NSColor blueColor]];
        fillExtrusionLayer.fillExtrusionHeight = [MGLStyleValue valueWithInterpolationMode:MGLInterpolationModeIdentity sourceStops:nil attributeName:@"height" options:nil];
    

    When adding with the same vector source type, this issue is present in both fill and fill-extrusion layers, so I think it is an issue with parsing new buckets on cached tiles when using runtime styling:
    image
    image

  8. jfirebaugh commented on May 11, 2017

    @jfirebaugh
    Contributor

    I first assumed this must be a regression, probably a recent one, but... I went back as far as the iOS 3.4.0 release (first release with runtime styling), and the bug is reproducible there. So surprisingly I think this has never worked -- addLayer needs to trigger redoing layout of the tiles from its source, and it never has. 🤦‍♂️

  9. self-assigned this
    on May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Core

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions