如何在此代码中设置多边形的坐标..? 这是我网站上Gmap3.js代码的一个片段。我想在其中添加一些多边形..
enter code here
function poly(args,poly,path){
args.todo中的var objs = [],multiple =“values”;
if(!multiple){
args.todo.values = [{options:args.opts}];
}
if(!args.todo.values.length){
manageEnd(args,false);
返回;
}
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");
};