How do I set the coordinates por a polygon in this code..? This a pieace of the Gmap3.js code on my website. And I want to add some polygons into it..
enter code here
function poly(args, poly, path){
var objs = [], multiple = "values" in args.todo;
if (!multiple){
args.todo.values = [{options:args.opts}];
}
if (!args.todo.values.length){
manageEnd(args, false);
return;
}
newMap();
$.each(args.todo.values, function(_, value){
var id, i, j, obj, todo = tuple(args, value);
if (todo.options[path]){
if (todo.options[path][0][0] && $.isArray(todo.options[path][0][0])){
for(i=0; ipoly;
objs.push(obj);
id = store.add({todo:todo}, poly.toLowerCase(), obj);
attachEvents($this, {todo:todo}, obj, id);
});
manageEnd(args, multiple ? objs : objs[0]);
}
this.polyline = function(args){
poly(args, "Polyline", "path");
};
this.polygon = function(args){
poly(args, "Polygon", "paths");
};