Skip to content

How to minimize instruction panel in mapbox gl js but can also be reverted back by clicking a button? help #120

@collegestud101

Description

@collegestud101

The instruction eats all the space of my screen when I run my app in mobile. Is there a way to minimize or toggle the instruction in mapbox gl js?

im using this code to show instructions:

var directions = new MapboxDirections({
accessToken: mapboxgl.accessToken,
interactive: false,
controls: {
inputs: false,
instructions: true, //setting this to true shows the instructions
profileSwitcher: false
}
});
map.addControl(directions, 'top-left');
direct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions