git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1804
7aebc617-e5e2-0310-91dc-
80fb5f6d2477
var EPSG3857 = new OpenLayers.Projection("EPSG:3857"); // google
// tool functions
var EPSG3857 = new OpenLayers.Projection("EPSG:3857"); // google
// tool functions
- function createElement(tagName, attributes={}) {
+ function createElement(tagName, attributes) {
var element = $(document.createElement(tagName));
var element = $(document.createElement(tagName));
+ if (attributes === undefined) return element;
for (var attribute in attributes) {
element.attr(attribute, attributes[attribute]);
}
return element;
}
for (var attribute in attributes) {
element.attr(attribute, attributes[attribute]);
}
return element;
}
- function appendElement(parentElement, tagName, attributes={}) {
+ function appendElement(parentElement, tagName, attributes) {
+ if (attributes === undefined) attributes = {};
var element = createElement(tagName, attributes);
parentElement.append(element);
return element;
var element = createElement(tagName, attributes);
parentElement.append(element);
return element;