eegeo.js

L.eeGeo.polygon(latLngs, options)

// Create a polygon covering downtown San Francisco.
L.eeGeo.polygon([
    [37.786617, -122.404654],
    [37.797843, -122.407057],
    [37.798962, -122.398260],
    [37.794299, -122.395234]
]).addTo(map);
Argument Type Description
latLngs L.LatLng[] An array of points that define the perimeter of the polygon.
options object Accepts all of the options to L.polygon.

Options

Options Type Default Description
color number[] [0,0,1,0.5] The color of the polygon as an array [R,G,B,A], with values between 0.0 and 1.0

Methods

polygon.getColor()

Get the color of the polygon.

polygon.setColor(color)

Set the color of the polygon.

Argument Type Description
color number[] The color of the polygon as an array [R,G,B,A], with values between 0.0 and 1.0

polygon.getPoints()

Get the points that define the perimeter of the polygon.

v0.1.780