[OSM-talk-fr] Cluster strategy different styles

2010-07-19 Par sujet Arnaud Vandecasteele
Hi again,

More precisely, I think I need to know how to use the context params in a rule.

For example :

var context = {
'radius' : function(feature){
console.log(vesselStyle);
if (feature.attributes.count1){
return Math.min(feature.attributes.count,7) + 4;
}
},
'iconURL' : function(feature){
if (feature.attributes.count==1){
var type = feature.cluster[0].attributes.type;
var angle = feature.cluster[0].attributes.angle;
if(angle=360){angle=0};
var angle5 = (Math.floor(angle / 5)) * 5;
if(feature.attributes.lengthVessel80){size =
'l'}else{size = 's'}
return iconURL+shipcolor[type]+'1_'+size+'_'+angle5+'.png';
}else{
return
}
}// EOF iconURL
};// EOF context

var ruleLow = new OpenLayers.Rule({
context : context,
filter: new OpenLayers.Filter.Comparison({
  type: OpenLayers.Filter.Comparison.EQUAL_TO,
  property: count,
  value: 1,
}),
symbolizer: {
'externalGraphic': '${iconURL}',
'graphicHeight'  : 24,
'graphicWidth'   : 24,
}
});

Is it possible to use a context in a rule object ?

Regards

Arnaud

___
Talk-fr mailing list
Talk-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-fr


Re: [OSM-talk-fr] Cluster strategy different styles

2010-07-19 Par sujet Pieren
Erreur sur la liste ?
___
Talk-fr mailing list
Talk-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-fr


Re: [OSM-talk-fr] Cluster strategy different styles

2010-07-19 Par sujet Arnaud Vandecasteele
Yeap :)
Mauvaise liste :)

Sorry

2010/7/19 Pieren pier...@gmail.com:
 Erreur sur la liste ?




-- 

Van De Casteele Arnaud
Mines Paris Tech - CRC
Sophia-Antipolis
0698 24 25 29
SIG - WebMapping - SOLAP - BI - GeoCollaboration

Web Site
http://geotribu.net/
http://www.sismaris.org/

___
Talk-fr mailing list
Talk-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-fr