Polyline

Connect vertices with lines

Polyline

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

new fatosmap.maps.Polyline({ option })

Parameter

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,                     
    strokeColor:     '#0000FF',         
    strokeOpacity:   0.5,           
    strokeWeight:    10,
    message:         'FATOS',
    anchor:          'bottom',
    offset:          15,
    closeButton:     true,
    closeOnClick:    true,                
});    

polyline.setMap(mapInstance);

How to clear the polyline

Clears the path drawn on the map.

Example

polyline.setMap(null);

Last updated