Fixing OpenLayers.Style.createLiteral to work with all strings. r=ahocevar (closes #1439)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6553 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -331,7 +331,7 @@ OpenLayers.Style = OpenLayers.Class({
|
||||
OpenLayers.Style.createLiteral = function(value, context, feature) {
|
||||
if (typeof value == "string" && value.indexOf("${") != -1) {
|
||||
value = OpenLayers.String.format(value, context, [feature]);
|
||||
value = isNaN(value) ? value : parseFloat(value);
|
||||
value = (isNaN(value) || !value) ? value : parseFloat(value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user