    
function createLine(points, id) {
    var polyOptions = {geodesic:true};
    var polyline = new GPolyline(points, "#003fff", 5, 1, polyOptions);
    polyline.id = id;
    return polyline;
}


function writeArea(points) {
    var polygon = new GPolygon(points, "#f33f00", 5, 1, "#ff0000", 0.2);
    return polygon;
}


// create marker
var SpotsInfoWindows = new Object();

function createMarker(point, id, iconurl, html) {
    // Create our "tiny" marker icon
    var picto = new GIcon();
    picto.image = iconurl;
    picto.shadow = "../content/TERcategories/2/shadow_1_4.png";
    picto.iconSize = new GSize(64, 64);
    picto.shadowSize = new GSize(128, 64);
    picto.iconAnchor = new GPoint(32, 64);
    picto.infoWindowAnchor = new GPoint(16, 24);
    
    // Set up GMarkerOptions object literal
    markerOptions = { icon:picto, draggable: false };
    var marker = new GMarker(point, markerOptions);
    
    // rajouter l'id au marker
    marker.id = id;
    
    // bind info window with data in it
    SpotsInfoWindows[id] = html;
    marker.bindInfoWindowHtml(html); // "saves" info window with marker
    
    // bind event handlers
    GEvent.addListener(marker, "dblclick", function() {
        // ne fais rien
    });

    return marker;
}
