<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=522351810-21122009>The following
code creates a Vector layer using a styleMap where I set the style
properties within some functions:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=522351810-21122009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=522351810-21122009>...</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522351810-21122009>
var template = {<BR> fillOpacity:
"${getOpacity}",<BR> externalGraphic:
"${getChartURL}",<BR> graphicWidth:
"${getSizeW}",<BR> graphicHeight:
"${getSizeH}",<BR> strokeWidth:
0,<BR> graphicXOffset:
"${getXOffset}",<BR> graphicYOffset:
"${getYOffset}"<BR> };<BR> <BR> style
= new OpenLayers.Style(template, {context:
context});<BR> styleMap = new
OpenLayers.StyleMap({'default': style, 'select': {fillOpacity:
0.7}});</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522351810-21122009>
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=522351810-21122009>...</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522351810-21122009>
ergebnisL = new OpenLayers.Layer.Vector('Suchergebnis',
{<BR> styleMap:
styleMap<BR> });</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=522351810-21122009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=522351810-21122009>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. </SPAN></FONT><FONT face=Arial size=2><SPAN class=522351810-21122009>I
thought that it should work using something like
gW=feature.Vector.style.graphicWidth but feature.Vector is empty
...</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=522351810-21122009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=522351810-21122009>Thanks for any
help</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=522351810-21122009>Peter</SPAN></FONT></DIV></BODY></HTML>