Skip to content

Support rendering 3d extrusions #684

Closed

Description

@amyleew

Please add building height styling options for building data in Mapbox GL.

Specifically building data in CartoCSS can be rendered in a 3d look using building-fill, building-fill-opacity, and building-height.

Can we add this functionality to Mapbox GL?

Activity

  1. kkaefer commented on Aug 11, 2014

    @kkaefer
    Member

    dupe of #292

  2. trallarn commented on Sep 15, 2015

    @trallarn

    I know this issue is closed, but I can't find any doc on how to render extrusions. Has this feature really been added?

  3. kkaefer commented on Sep 15, 2015

    @kkaefer
    Member

    No, this feature hasn't been added yet.

  4. ansis commented on May 12, 2016

    @ansis
    Contributor

    implementing this:

    the first part

    followup

    • fix antialiasing (draw faded 1px lines along all edges?)
    • fix depth related bugs
  5. lbud commented on May 25, 2016

    @lbud
    Contributor

    I've roughly recreated last year's demo branch at https://github.com/mapbox/mapbox-gl-js/tree/building-redux (thanks to the codespirit of @ansis 👻 the old branch ported pretty easily).

    image

    Shaders at https://github.com/mapbox/mapbox-gl-shaders/tree/js-buildings, a spec branch (filled in only by copying fill properties for validation purposes, not definitive spec suggestions) at https://github.com/mapbox/mapbox-gl-style-spec/tree/buildings. I've modified this repo's debug page/style in this branch for the sake of quick iteration, not to be merged.

    Still lots of TODOs to clean up rough edges in this branch + will open a spec ticket to discuss what this should look like.

  6. lbud commented on Jun 7, 2016

    @lbud
    Contributor

    @jonathanward at this time this feature is still very much in development, and spec changes are still not finalized at mapbox/mapbox-gl-style-spec#456, so I really can't give a timeline — though it is looking like at least initially we don't plan to support extruding non-polygon features.

  7. lbud commented on Jun 13, 2016

    @lbud
    Contributor

    quick status update:

    • most of the spec changes proposed for extrusions are implemented in mapbox-gl-js; mostly finished with adding data-driven properties and then need to figure out antialiasing
    • after that, still need to
      • port to native
      • work with Studio team to integrate extrusion type
      • solidify spec changes and do releases of -js, -native and -spec
  8. changed the title [-]Add building height 3d styling to GL[/-] [+]Support rendering 3d extrusions[/+] on Jul 28, 2016
  9. yocontra commented on Oct 8, 2016

    @yocontra

    @iBud Any docs for enabling this feature? Didn't see any in the PR. Demos look great BTW - thanks a lot for putting in the work!

  10. lbud commented on Oct 8, 2016

    @lbud
    Contributor

    @contra check out the accompanying style spec PR mapbox/mapbox-gl-style-spec#495 — the fill-extrude-base and fill-extrude-height paint properties enable this, so a fill layer for buildings might include a property function like

    "paint": {
        "fill-extrude-height": {
            "stops": [[0, 0], [1000, 1000]],
            "property": "height"
        }
    }
    

    if the specified source layer has a property called "height" in its features.
    This feature will be in the next Mapbox GL JS library release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions