Skip to content

Google V2: Allow closed polyline #27

@adamd

Description

@adamd

At present, when creating a polyline where the first and the last points
are equal, the resulting curve is automatically converted to GPolygon
without an 'opt-out' alternative.

What if to enable such a case, making the following patch to
mxn.google.core.js:504:

Remove:
if (this.closed || gpoints[0].equals(gpoints[length-1])) {

Add:
if (this.closed || !('closed' in this) && gpoints[0].equals(gpoints[length-1])) {

Basically, what it does is checking if a .closed field isn't present before
checking endpoints. This way it's now possible to enforce closed GPolyline
by explicitly setting .closed = false.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions