Skip to content

Setting class attribute on map-multipolygon does not work #688

Open
@prushforth

Description

@prushforth

If you set a class attribute on a <map-polygon> for instance, you are able to style it with a rule:

<map-style> .foo { fill: red }</map-style>
<map-polygon class="foo">...</map-polygon>

however doing so on a <map-multipolygon> has no effect:

<map-style> .foo {fill: red}</map-style>
<map-multipolygon class="foo">...</map-multipolygon>

This probably applies to all multi geometries, since they are represented in the DOM by an SVG <g> element.

A workaround / hack is to set the class attribute on all the child geometry elements, but it would be ideal to not have to do so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    basic stylingElements should only have basic and native-like styling (W3C TAG Components Guideline)bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions