The following code creates a Vector layer using a styleMap where I set the 
style properties within some functions:
 
...
    var template = {
     fillOpacity: "${getOpacity}",
     externalGraphic: "${getChartURL}",
     graphicWidth: "${getSizeW}",
     graphicHeight: "${getSizeH}",
     strokeWidth: 0,
     graphicXOffset: "${getXOffset}",
     graphicYOffset: "${getYOffset}"
    };
   
    style = new OpenLayers.Style(template, {context: context});
    styleMap = new OpenLayers.StyleMap({'default': style, 'select': 
{fillOpacity: 0.7}});
    
...
    ergebnisL = new OpenLayers.Layer.Vector('Suchergebnis', {
     styleMap: styleMap
    });
 
I´d like to calculate the graphicXOffset manually within the function 
getXOffset. Therefore I would need to access some style properties like 
graphicWidth of my current feature. I thought that it should work using 
something like gW=feature.Vector.style.graphicWidth but feature.Vector is empty 
...
 
Thanks for any help
Peter
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to