Login

To vote or comment, enter your email and we'll send a magic link

1

FacetMap - Polygon area support

completed

From customer:

Adding the support to display polygons in a map

3 months ago

Comments (2)

For anyone wanting this feature, I'd love to hear what specific use-cases this would help with!

3 months ago

You can already add polygons with custom coding.

I don't think a "polygon builder" needs to be added to Map Facet, if that's what you're suggesting.

The following example adds a polygon around the bermuda triangle:

var triangleCoords = [
    { lat: 25.774, lng: -80.19 },
    { lat: 18.466, lng: -66.118 },
    { lat: 32.321, lng: -64.757 },
    { lat: 25.774, lng: -80.19 }
];

var bermudaTriangle = new google.maps.Polygon({
    paths: triangleCoords,
    strokeColor: "#FF0000",
    strokeOpacity: 0.8,
    strokeWeight: 2,
    fillColor: "#FF0000",
    fillOpacity: 0.35
});

bermudaTriangle.setMap(FWP_MAP.map);
3 months ago