Skip to content

[UX Map] Use color attribute on a Polygon with leaflet bridge #2869

@michelcourtade

Description

@michelcourtade

Hi all,

I'm trying to use the color options on a polygon for Leaflet with Ux Map but it does'nt seem to work.
I want to display Polygons on a map with different colors depending on the type of the Polygon (Polygon represent a different zones in my app)
Here is what I'm trying to do (I'm on a foreach loop) :

$mapSite->addPolygon(new Polygon(
                            points: $points,
                            infoWindow: new InfoWindow(
                                content: $feature['properties']['name'],
                            ),
                            extra: [
                                'color' => 'red',
                            ]
                        ));

The result is that the color is not used on the map in my polygon and all polygons have the same original color.
Is there something I'm missing ?

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions