Skip to content

[google_maps_flutter_web] Holes in Polygons not rendered correctly in example app. #74096

@ditman

Description

@ditman

According to the docs, holes in polygons must be "wound in the opposite direction to the outer path."

The native version seems to be able to handle holes regardless of the winding of their coordinates: "A hole is specified in exactly the same way as the outline.",

Neither the web plugin nor the JS SDK handle the winding direction of the polygons/holes, so holes that are not correctly wound don't render correctly.

It's possible to detect the direction of a polygon; the web version could warn the user that their holes are wound in the opposite way of their corresponding polygon.

(At the very least, we should fix the example app so the holes added to polygons are reversed so they work on the web correctly.)

Expected results:

Screen Shot 2021-01-15 at 6 04 08 PM

Actual results:

Screen Shot 2021-01-15 at 6 03 38 PM

This has been observed in a yet-unpublished version of the google_maps_flutter_web package: 0.1.0+10, merged here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.platform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions