Changes for page Cartography
on 2015/06/02 15:00
on 2015/06/02 16:03
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -37,16 +37,15 @@ 37 37 38 38 layer = {}; 39 39 layer.title = "Items"; 40 -layer.points = []; 41 41 layer.layers = []; 42 42 43 -var flt = new Filter("s eItem");42 +var flt = new Filter("custItem"); 44 44 45 45 var iter = flt.search(); 46 46 47 47 while(iter.hasNext()) { 48 48 var item = iter.next(); 49 - var pos = item.s eGeoPosition;48 + var pos = item.custGeoPosition; 50 50 51 51 //add the item on the map, at the position specified 52 52 layer.points.push({pos:pos }); ... ... @@ -56,3 +56,19 @@ 56 56 data = new Json(map); 57 57 } 58 58 {{/code}} 58 + 59 +You can change the default icon of the item by adding a icon field in the JSON Object layer.points. 60 +For example: 61 + 62 +{{code language="javascript"}} 63 + 64 +layer.points = []; 65 + 66 +layer.icons = [ { url:'/img/img1.png',x:-16,y:-16}, 67 + { url:'img/img2.png',x:-16,y:-16}, 68 + { url:'img/img3.png',x:-16,y:-16}, 69 + { url:'/img/img4.png',x:-16,y:-16} 70 + ]; 71 +layer.points.push({icon:icon }); 72 + 73 +{{/code}}