var poiAlpha = { x: 252, y: 144, id: "Poi01", img: null, type: "GENERIC", cat: 'FF', pin: function(){ }, adapt: function(){ }, setIcon: function(filename){ //small // this.img=loadImage(filename, // function(img){ // img.resize(20,20); // }); //big // this._img=loadImage(filename, // function(img){ // img.resize(50,50); // }); } }; var pois=[]; var poi=Object.create(poiAlpha); poi.x = 346; poi.y = 332; poi.id = "First One"; poi.type = 'F'; poi.cat = 'FF' pois.push(poi); poi=Object.create(poiAlpha); poi.x= 746; poi.y= 432; poi.id="Two"; poi.type = 'V'; poi.cat = 'AS' pois.push(poi); poi=Object.create(poiAlpha); poi.x= 716; poi.y= 412; poi.id="Two"; poi.type = 'T'; poi.cat = 'PR' pois.push(poi);