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

Prevent/hide map features from rendering #11477

Closed
AliFlux opened this issue Mar 17, 2018 · 3 comments
Closed

Prevent/hide map features from rendering #11477

AliFlux opened this issue Mar 17, 2018 · 3 comments
Labels
Node.js node-mapbox-gl-native support

Comments

@AliFlux
Copy link

AliFlux commented Mar 17, 2018

Hi.

Is there a way to prevent map features (roads, buildings, etc...) from rendering? I am using node-mapbox-gl-native and there isn't much of a documentation available except for this structure:

{
    zoom: {zoom}, // number, defaults to 0
    width: {width}, // number (px), defaults to 512
    height: {height}, // number (px), defaults to 512
    center: [{longitude}, {latitude}], // array of numbers (coordinates), defaults to [0,0]
    bearing: {bearing}, // number (in degrees, counter-clockwise from north), defaults to 0
    pitch: {pitch}, // number (in degrees, arcing towards the horizon), defaults to 0
    classes: {classes} // array of strings
}

I suspect that we can do this via classes: {classes}, however I'm not so sure about what to pass in this parameter. Are there any examples for this?

Thanks.

@tobrun tobrun added Node.js node-mapbox-gl-native support labels Mar 19, 2018
@asheemmamoowala
Copy link
Contributor

Feature rendering is controlled by styles(full specification), which are loaded using map.load().

This repo is for reporting bugs or requesting features. For help with “how do I” questions like this one, please ask on StackOverflow or reach out to our support team.

@AliFlux
Copy link
Author

AliFlux commented Mar 21, 2018

Hi.

The reason why I posted this here is because the documentation is incomplete, which by all means is considered a bug.
classes: {classes} // array of strings is just bad documentation. What exactly is classes? The documentation should be updated to describe this option.

@asheemmamoowala
Copy link
Contributor

@AliFlux Thanks for reporting this. classes is left over from paint classes which were removed in #8953.

Ticketed out a fix in #11495.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Node.js node-mapbox-gl-native support
Projects
None yet
Development

No branches or pull requests

3 participants