Skip to content

Rename original circle-* properties to circle-fill-* #4346

@stevage

Description

@stevage

With a style like this:

{
  ...
  'circle-fill': 'blue',
  'circle-stroke-color': 'black',
  'circle-opacity': 0.1
}

it's easy to be misled into thinking that the opacity of the whole circle (fill plus stroke) is being set to 0.1. Whereas the opacity setting only applies to the fill, and the stroke has its own opacity setting, circle-stroke-opacity. (I just ran into this minor gotcha).

Possible suggestions:

  • rename it to circle-fill-opacity
  • document it more clearly (The opacity at which the circle will be drawn.The opacity of the circle's filled interior., plus maybe some comment about the possible interaction between this property and the alpha channel of the fill color.)
  • change the behaviour so that it does affect stroke. (Probably not a good idea...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking change ⚠️Requires a backwards-incompatible change to the APIcross-platform 📺Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions