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.

new fatosmap.maps.Polyline({ option })


Required Parameter Description
path Set an array of coordinate objects
[{lat: ,lng: },{lat: lng: },,,,,]

Optional Parameter Description
strokeColor specifies a hexadecimal HTML color of the format "#FFFFFF",Default is '#000000'
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
strokeWeight specifies the width of the line in pixels.Default is 1
message(popup) Set the message of popup, type is string or html
event *if set the meassge option
popup mouse event click or mouseover
default click
anchor(popup) * if set the message of popup
A string indicating the part of the Marker that should be positioned closest to the coordinate set via Marker#setLngLat . Options are 'center' , 'top' , 'bottom' , 'left' , 'right'.
default bottom
offset(popup) * if set the message of popup
The offset in pixels as a PointLike object to apply relative to the element's center. Negatives indicate left and up.
default 15
closeButton(popup) * if set the message of popup
If true , a close button will appear in the top right corner of the popup.
default false
closeOnClick(popup) * if set the message of popup
If true , the popup will closed when the map is clicked.
default false


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,            	




Clears the path drawn on the map.