SD Maps Polyline / Polygon

Polyline / Polygon
All polyline / polygon in SD Maps API manage by PolylineManager, we must define that before add new polyline / polygon in map.
function initialize() {

    var myLatlng = new GeoPoint(103.80733282853, 1.289478890541);
    
    var myOptions = {
    
        zoom: 13,
        
        center: myLatlng,
        
        showCopyright: false 
        
    }
    
    var line = new SD.genmap.PolylineManager({
    
        map: map
    
    });
    
    // add polyline
    
    var points = [
        
        {x:103.80774640286, y:1.2893984905756}, 
        
        {x:103.80746059365, y:1.2890435810602}, 
        
        {x:103.80684764749, y:1.2895577741863}, 
        
        {x:103.80712153237, y:1.2898979372866}, 
        
        {x:103.80774640286, y:1.2893984905756}
        
    ];
    
    var options = {
    
        color: "#FF0000",
        
        size: 5,
        
        opacity: 0.7,
        
        bgColor: "grey",
        
        fillOpacity: 0.5
    };
    
    line.add(points, options);
}
Every time PolylineManager add new Polyline / Polygon will return instance object of SD.shape.Polyline. See Map Polyline / Polygon Reference for more information.