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'
Here is an example:
var style = new OpenLayers.Style();
//rule used for all polygons
var rule_sites = new OpenLayers.Rule({
symbolizer: {
fillColor: "#ff9a9a",
fillOpacity: 0.5,
strokeColor: "#000000",
strokeWidth: 1,
strokeDashstyle: "solid",
label: " ${sites.name}",
labelAlign: "cc",
fontColor: "#333333",
fontOpacity: 0.9,
fontFamily: "Arial",
fontSize: 14}
});
This simply displays '${sites.name}' on the map, whereas if I change the column
name from 'sites.name' to 'name' it works fine.
I have tried '${sites\\.name}' to escape the period, but this does not work.
Does anyone know how to get around this (without having to change the column
names..)?
Thanks,
Rob_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users