diff --git a/examples/cql-format.js b/examples/cql-format.js index 2119b1aaa2..9b4a21072d 100644 --- a/examples/cql-format.js +++ b/examples/cql-format.js @@ -37,7 +37,7 @@ var map = new OpenLayers.Map({ function loadFeatures(data) { var features = new OpenLayers.Format.GeoJSON().read(data); states.addFeatures(features); -}; +} // update filter and redraw when form is submitted var cql = document.getElementById("cql"); diff --git a/examples/filter-strategy.js b/examples/filter-strategy.js index cacdf8daa6..da5656a1f4 100644 --- a/examples/filter-strategy.js +++ b/examples/filter-strategy.js @@ -20,7 +20,7 @@ function startAnimation() { filter.lowerBoundary = currentDate; filter.upperBoundary = new Date(currentDate.getTime() + (span * 1000)); filterStrategy.setFilter(filter); - currentDate = new Date(currentDate.getTime() + (step * 1000)) + currentDate = new Date(currentDate.getTime() + (step * 1000)); } else { stopAnimation(true); } diff --git a/examples/google-static.js b/examples/google-static.js index bc97e4c0bb..f984f1ab9b 100644 --- a/examples/google-static.js +++ b/examples/google-static.js @@ -53,7 +53,7 @@ var map = new OpenLayers.Map({ ].join(""); } }, options) - ), + ) ], center: new OpenLayers.LonLat(10.2, 48.9).transform("EPSG:4326", "EPSG:3857"), zoom: 5 diff --git a/lib/OpenLayers/Animation.js b/lib/OpenLayers/Animation.js index 17ecf6797b..ed9b62b608 100644 --- a/lib/OpenLayers/Animation.js +++ b/lib/OpenLayers/Animation.js @@ -82,7 +82,7 @@ OpenLayers.Animation = (function(window) { } else { delete loops[id]; } - } + }; requestFrame(loops[id], element); return id; } diff --git a/lib/OpenLayers/Control/OverviewMap.js b/lib/OpenLayers/Control/OverviewMap.js index 29fefeb5b2..c572451495 100644 --- a/lib/OpenLayers/Control/OverviewMap.js +++ b/lib/OpenLayers/Control/OverviewMap.js @@ -202,7 +202,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, { */ draw: function() { OpenLayers.Control.prototype.draw.apply(this, arguments); - if(!(this.layers.length > 0)) { + if (this.layers.length === 0) { if (this.map.baseLayer) { var layer = this.map.baseLayer.clone(); this.layers = [layer]; @@ -356,7 +356,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, { this.minimizeControl(); } else if (evt.buttonElement === this.maximizeDiv) { this.maximizeControl(); - }; + } }, /** diff --git a/lib/OpenLayers/Format/CQL.js b/lib/OpenLayers/Format/CQL.js index b1dce2b1b3..31d292d115 100644 --- a/lib/OpenLayers/Format/CQL.js +++ b/lib/OpenLayers/Format/CQL.js @@ -345,7 +345,7 @@ OpenLayers.Format.CQL = (function() { var result = buildAst(tokenize(text)); if (this.keepData) { this.data = result; - }; + } return result; }, diff --git a/lib/OpenLayers/Format/GeoRSS.js b/lib/OpenLayers/Format/GeoRSS.js index a9e117b2ec..69ecd99e88 100644 --- a/lib/OpenLayers/Format/GeoRSS.js +++ b/lib/OpenLayers/Format/GeoRSS.js @@ -111,7 +111,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, { var box = this.getElementsByTagNameNS(item, this.georssns, "box"); - + if (point.length > 0 || (lat.length > 0 && lon.length > 0)) { var location; if (point.length > 0) { @@ -168,7 +168,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, { point = new OpenLayers.Geometry.Point(coords[1], coords[0]); components.push(point); } - geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]); + geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]); } if (geometry && this.internalProjection && this.externalProjection) { diff --git a/lib/OpenLayers/Format/OWSCommon/v1_1_0.js b/lib/OpenLayers/Format/OWSCommon/v1_1_0.js index acf29bf176..8379389677 100644 --- a/lib/OpenLayers/Format/OWSCommon/v1_1_0.js +++ b/lib/OpenLayers/Format/OWSCommon/v1_1_0.js @@ -64,7 +64,7 @@ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo range.maxValue = this.getChildValue(node); }, "Identifier": function(node, obj) { - obj.identifier = this.getChildValue(node); + obj.identifier = this.getChildValue(node); }, "SupportedCRS": function(node, obj) { obj.supportedCRS = this.getChildValue(node); diff --git a/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js b/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js index 269a291446..a13b257dba 100644 --- a/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js +++ b/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js @@ -147,7 +147,7 @@ OpenLayers.Format.SOSCapabilities.v1_0_0 = OpenLayers.Class( offering.resultModels.push(this.getChildValue(node)); }, "responseMode": function(node, offering) { - offering.responseModes.push(this.getChildValue(node));; + offering.responseModes.push(this.getChildValue(node)); } }, "ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"] diff --git a/lib/OpenLayers/Format/WMC/v1.js b/lib/OpenLayers/Format/WMC/v1.js index ccdbe56c6d..fcaa0ae484 100644 --- a/lib/OpenLayers/Format/WMC/v1.js +++ b/lib/OpenLayers/Format/WMC/v1.js @@ -1044,7 +1044,7 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, { version: server.version }; if (server.title) { - attributes.title = server.title + attributes.title = server.title; } this.setAttributes(node, attributes); diff --git a/lib/OpenLayers/Format/WMSGetFeatureInfo.js b/lib/OpenLayers/Format/WMSGetFeatureInfo.js index 30c00b0d7d..e4614a37ce 100644 --- a/lib/OpenLayers/Format/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Format/WMSGetFeatureInfo.js @@ -248,7 +248,7 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, { var name = (child.prefix) ? child.nodeName.split(":")[1] : child.nodeName; if (grandchildren.length == 0) { - attributes[name] = null + attributes[name] = null; } else if (grandchildren.length == 1) { var grandchild = grandchildren[0]; if (grandchild.nodeType == 3 || diff --git a/lib/OpenLayers/Handler/Path.js b/lib/OpenLayers/Handler/Path.js index 57d112b2a0..8a61f6ac84 100644 --- a/lib/OpenLayers/Handler/Path.js +++ b/lib/OpenLayers/Handler/Path.js @@ -447,7 +447,7 @@ OpenLayers.Handler.Path = OpenLayers.Class(OpenLayers.Handler.Point, { } if(this.maxVertices && this.line && this.line.geometry.components.length === this.maxVertices) { - this.removePoint() + this.removePoint(); this.finalize(); } else { this.addPoint(evt.xy); diff --git a/lib/OpenLayers/Layer/EventPane.js b/lib/OpenLayers/Layer/EventPane.js index ae984356dd..4753735be5 100644 --- a/lib/OpenLayers/Layer/EventPane.js +++ b/lib/OpenLayers/Layer/EventPane.js @@ -255,8 +255,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { var moOldZoom = this.getMapObjectZoom(); var oldZoom= this.getOLZoomFromMapObjectZoom(moOldZoom); - if ( !(newCenter.equals(oldCenter)) || - !(newZoom == oldZoom) ) { + if (!(newCenter.equals(oldCenter)) || newZoom != oldZoom) { if (!zoomChanged && oldCenter && this.dragPanMapObject && this.smoothDragPan) { diff --git a/lib/OpenLayers/Layer/FixedZoomLevels.js b/lib/OpenLayers/Layer/FixedZoomLevels.js index ec75499e5f..a8ebb2f27c 100644 --- a/lib/OpenLayers/Layer/FixedZoomLevels.js +++ b/lib/OpenLayers/Layer/FixedZoomLevels.js @@ -284,7 +284,7 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ if (this.map.baseLayer !== this) { zoom = this.map.baseLayer.getZoomForResolution( this.getResolutionForZoom(zoom) - ) + ); } } return zoom; diff --git a/lib/OpenLayers/Layer/Zoomify.js b/lib/OpenLayers/Layer/Zoomify.js index 722ea3e471..8036ccb6cb 100644 --- a/lib/OpenLayers/Layer/Zoomify.js +++ b/lib/OpenLayers/Layer/Zoomify.js @@ -227,10 +227,10 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, { var h = this.standardTileSize; if (x == this.tierSizeInTiles[z].w -1 ) { var w = this.tierImageSize[z].w % this.standardTileSize; - }; + } if (y == this.tierSizeInTiles[z].h -1 ) { var h = this.tierImageSize[z].h % this.standardTileSize; - }; + } return (new OpenLayers.Size(w, h)); } else { return this.tileSize; diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index 774ecb8c03..6e8a1865e7 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -513,10 +513,9 @@ OpenLayers.Popup = OpenLayers.Class({ this.contentDiv.innerHTML + ""; - var containerElement = (this.map) ? this.map.div - : document.body; + var containerElement = (this.map) ? this.map.div : document.body; var realSize = OpenLayers.Util.getRenderedDimensions( - preparedHTML, null, { + preparedHTML, null, { displayClass: this.displayClass, containerElement: containerElement } @@ -839,12 +838,12 @@ OpenLayers.Popup = OpenLayers.Class({ var contentDivPadding = this._contentDivPadding; if (!contentDivPadding) { - if (this.div.parentNode == null) { - //make the div invisible and add it to the page - this.div.style.display = "none"; - document.body.appendChild(this.div); - } - + if (this.div.parentNode == null) { + //make the div invisible and add it to the page + this.div.style.display = "none"; + document.body.appendChild(this.div); + } + //read the padding settings from css, put them in an OL.Bounds contentDivPadding = new OpenLayers.Bounds( OpenLayers.Element.getStyle(this.contentDiv, "padding-left"), @@ -857,9 +856,9 @@ OpenLayers.Popup = OpenLayers.Class({ this._contentDivPadding = contentDivPadding; if (this.div.parentNode == document.body) { - //remove the div from the page and make it visible again - document.body.removeChild(this.div); - this.div.style.display = ""; + //remove the div from the page and make it visible again + document.body.removeChild(this.div); + this.div.style.display = ""; } } return contentDivPadding; diff --git a/lib/OpenLayers/Protocol/HTTP.js b/lib/OpenLayers/Protocol/HTTP.js index d5c822c7d2..3d613b5841 100644 --- a/lib/OpenLayers/Protocol/HTTP.js +++ b/lib/OpenLayers/Protocol/HTTP.js @@ -132,7 +132,7 @@ OpenLayers.Protocol.HTTP = OpenLayers.Class(OpenLayers.Protocol, { }); this.filterToParams = function(filter, params) { return format.write(filter, params); - } + }; } }, diff --git a/lib/OpenLayers/Renderer/Elements.js b/lib/OpenLayers/Renderer/Elements.js index 68c4671332..eff1223e0d 100644 --- a/lib/OpenLayers/Renderer/Elements.js +++ b/lib/OpenLayers/Renderer/Elements.js @@ -570,7 +570,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { geometry.components[i], style, featureId) && rendered; } return rendered; - }; + } rendered = false; var removeBackground = false; diff --git a/lib/OpenLayers/Request.js b/lib/OpenLayers/Request.js index 86e15d8099..6eae07bad1 100644 --- a/lib/OpenLayers/Request.js +++ b/lib/OpenLayers/Request.js @@ -79,7 +79,7 @@ OpenLayers.Request = { * will be the same as the provided url. */ makeSameOrigin: function(url, proxy) { - var sameOrigin = !(url.indexOf("http") == 0); + var sameOrigin = url.indexOf("http") !== 0; var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX); if (urlParts) { var location = window.location;