Polyline

Polyline(line)

Description

Set longitude/latitude, color, transparency, line thickness, etc. Draw a line on the map by combining the set value. Collects the values of multiple coordinates and express them as lines.

Parameter

line : object

Name Description Parameter Optional
path Set the latitude. number must
strokeColor specifies a hexadecimal HTML color of the format "#FFFFFF".
The Polyline class does not support named colors.
hex optional
Default '#000000'(black)
strokeOpacity specifies a numerical value between 0.0 and 1.0 to determine the opacity of the line's color. The default is 1.0. float optional
Default 1.0
strokeWeight specifies the width of the line in pixels. number optional Default 1

Example

    let line = [
        {lat: 37.772, lng: -122.214},
        {lat: 21.291, lng: -157.821},
        {lat: -18.142, lng: 178.431},
        {lat: -27.467, lng: 153.027}
    ];
    let polyline = new fatosmap.maps.Polyline({
        path: line,                 // latlng Must
        strokeColor: '#0000FF',     // optional
        strokeOpacity: 0.5,         // optional
        strokeWeight: 10            // optional
    });

    polyline.setMap(test)

removePolyline(null)

Description

Clears the path drawn on the map.

Example

polyline.setMap(null)