Skip to content

Commit 4913035

Browse files
committed
Fix a problem with line break in Layername
1 parent 07cdd65 commit 4913035

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

design/standard/javascript/XROWMap.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ XROWMap.prototype.init = function(element) {
120120
{
121121
url = $(this).data().url;
122122
}
123-
eval("this.layer = new OpenLayers.Layer." + $(this).data().service + "('" + $(this).data().layername + "', '" + url + "', " + stringify($(this).data().layerparams) + ", " + stringify($(this).data().layeroptions) + ");");
123+
var layerNameString = $(this).data().layername.replace(/\n/g, " ");
124+
eval("this.layer = new OpenLayers.Layer." + $(this).data().service + "('" + layerNameString + "', '" + url + "', " + stringify($(this).data().layerparams) + ", " + stringify($(this).data().layeroptions) + ");");
124125
}
125126
//some layers need a special treatment - place it here if needed
126127
switch($(this).data().service)

0 commit comments

Comments
 (0)