pois.js 871 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. var poiAlpha = {
  2. x: 252,
  3. y: 144,
  4. id: "Poi01",
  5. img: null,
  6. type: "GENERIC",
  7. cat: 'FF',
  8. pin: function(){
  9. },
  10. adapt: function(){
  11. },
  12. setIcon: function(filename){
  13. //small
  14. // this.img=loadImage(filename,
  15. // function(img){
  16. // img.resize(20,20);
  17. // });
  18. //big
  19. // this._img=loadImage(filename,
  20. // function(img){
  21. // img.resize(50,50);
  22. // });
  23. }
  24. };
  25. var pois=[];
  26. var poi=Object.create(poiAlpha);
  27. poi.x = 346;
  28. poi.y = 332;
  29. poi.id = "First One";
  30. poi.type = 'F';
  31. poi.cat = 'FF'
  32. pois.push(poi);
  33. poi=Object.create(poiAlpha);
  34. poi.x= 746;
  35. poi.y= 432;
  36. poi.id="Two";
  37. poi.type = 'V';
  38. poi.cat = 'AS'
  39. pois.push(poi);
  40. poi=Object.create(poiAlpha);
  41. poi.x= 716;
  42. poi.y= 412;
  43. poi.id="Two";
  44. poi.type = 'T';
  45. poi.cat = 'PR'
  46. pois.push(poi);