I have a vector layer in OpenLayers containing a few point features. Each of my features have an attribute tag which contains a short text identifying the feature.
Example:
tag: '1e-1'
Applied to my vector layer I have a point style where I specify that I want to display my tag as a label above the point:
...
new OpenLayers.Rule(
{
symbolizer: {
"Point": {
label: "${tag}"
}
}
})
...
The problem:
My problem is that my data in this case has some very unfortunate tags, since
'1e-1'
is treated mathematically and displayed on the map as
'0.1'
Question:
Can I avoid the formatting somehow without overriding a bunch of OpenLayers objects and methods?