<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19258"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial>Have a look at BaseTypes.js, </FONT></SPAN><SPAN 
class=765215121-20072012><FONT color=#0000ff size=2 
face=Arial>OpenLayers.String.format.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial>// Loop through all subs. Example: ${a.b.c}<BR>// 0 -> 
replacement = context[a];<BR>// 1 -> replacement = context[a][b];<BR>// 2 
-> replacement = context[a][b][c];<BR>var subs = 
match.split(/\.+/);<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial>OL use the period to split the token in parts. 
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial>So it seems, that column names with a period cann't displayed 
as labels.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial>In which context one can use this behavoiur of OL, i 
haven't a clue.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial>Regards</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=765215121-20072012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT size=2 face=Tahoma><B>Von:</B> 
openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von 
</B>uk52rob<BR><B>Gesendet:</B> Donnerstag, 19. Juli 2012 23:38<BR><B>An:</B> 
openlayers-users@lists.osgeo.org<BR><B>Betreff:</B> [OpenLayers-Users] Layer 
Styling - Column names<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV 
style="BACKGROUND-COLOR: #fff; FONT-FAMILY: times new roman, new york, times, serif; COLOR: #000; FONT-SIZE: 12pt">
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt"><SPAN 
style="FONT-SIZE: 12pt">I'm having issues getting OpenLayers.Style to pick up my 
column names as they have a period in their names, e.g. 
'sites.name'</SPAN><BR></DIV>
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt"><SPAN 
style="FONT-SIZE: 12pt"><BR></SPAN></DIV>
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt"><SPAN 
style="FONT-SIZE: 12pt">Here is an example:</SPAN></DIV>
<DIV 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif; FONT-SIZE: 12pt"><BR></DIV>
<DIV>
<DIV>
<DIV><FONT face="times new roman, new york, times, serif">var style = new 
OpenLayers.Style();</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          //rule used for all polygons</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          var rule_sites = new 
OpenLayers.Rule({</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          symbolizer: {</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          fillColor: "#ff9a9a",</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          fillOpacity: 0.5,</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          strokeColor: "#000000",</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          strokeWidth: 1,</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          strokeDashstyle: "solid",</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          label: " ${sites.name}",</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          labelAlign: "cc",</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          fontColor: "#333333",</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          fontOpacity: 0.9,</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          fontFamily: "Arial",</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
          fontSize: 14}</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">      
              });</FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif"><BR></FONT></DIV>
<DIV><FONT face="times new roman, new york, times, serif">This simply displays 
'</FONT><SPAN 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif">${sites.name}' 
on the map, whereas if I change the column name from 'sites.name' to 'name' it 
works fine.</SPAN></DIV>
<DIV><SPAN 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif"><BR></SPAN></DIV>
<DIV><SPAN style="FONT-FAMILY: 'times new roman', 'new york', times, serif">I 
have tried '${sites\\.name}' to escape the period, but this does not 
work.</SPAN></DIV>
<DIV><SPAN 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif"><BR></SPAN></DIV>
<DIV><SPAN style="FONT-FAMILY: 'times new roman', 'new york', times, serif">Does 
anyone know how to get around this (without having to change the column 
names..)?</SPAN></DIV>
<DIV><SPAN 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif"><BR></SPAN></DIV>
<DIV><SPAN 
style="FONT-FAMILY: 'times new roman', 'new york', times, serif">Thanks,</SPAN></DIV>
<DIV><BR></DIV>
<DIV><FONT 
face="times new roman, new york, times, serif">Rob</FONT></DIV></DIV></DIV></DIV></BODY></HTML>