Skip to content

Marker API: add setColor, setScale, setLabel #9820

Description

@mariusa

Motivation

When users select a location from a list (not on the map, a separate list), we want to highlight the corresponding marker on the map.

Marker has options to set initial color, scale, but can't change them:
https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker

Same for 'label', which is documented at
https://docs.mapbox.com/api/maps/#marker
but not at https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker

Hope 'label' support wasn't dropped, it's extremely useful to add 2 digit numbers/letters to standard markers, without going through the complexity of a custom marker.

Thanks!

Design Alternatives

Design

Mock-Up

Concepts

Implementation

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions