diff --git a/examples/KMLParser.html b/examples/KMLParser.html index a6ec027f02..7b36ec389d 100644 --- a/examples/KMLParser.html +++ b/examples/KMLParser.html @@ -10,7 +10,7 @@ diff --git a/examples/donut.js b/examples/donut.js index 01ae57d2cb..067be62b80 100644 --- a/examples/donut.js +++ b/examples/donut.js @@ -31,7 +31,7 @@ function updateOutput(event) { map.layers[1].events.on({ sketchmodified: updateOutput, sketchcomplete: updateOutput -}) +}); // add behavior to UI elements function toggleControl(element) { diff --git a/examples/editing-methods.js b/examples/editing-methods.js index 6986a9944e..6c139a276d 100644 --- a/examples/editing-methods.js +++ b/examples/editing-methods.js @@ -29,7 +29,7 @@ $("insertXY").onclick = function() { if (values != null) { draw.insertXY(values[0], values[1]); } -} +}; $("insertDeltaXY").onclick = function() { var values = parseInput( window.prompt( @@ -39,7 +39,7 @@ $("insertDeltaXY").onclick = function() { if (values != null) { draw.insertDeltaXY(values[0], values[1]); } -} +}; $("insertDirectionLength").onclick = function() { var values = parseInput( window.prompt( @@ -49,7 +49,7 @@ $("insertDirectionLength").onclick = function() { if (values != null) { draw.insertDirectionLength(values[0], values[1]); } -} +}; $("insertDeflectionLength").onclick = function() { var values = parseInput( window.prompt( @@ -59,13 +59,13 @@ $("insertDeflectionLength").onclick = function() { if (values != null) { draw.insertDeflectionLength(values[0], values[1]); } -} +}; $("cancel").onclick = function() { draw.cancel(); -} +}; $("finishSketch").onclick = function() { draw.finishSketch(); -} +}; function parseInput(text) { var values = text.split(","); @@ -80,4 +80,4 @@ function parseInput(text) { } } return values; -} \ No newline at end of file +} diff --git a/examples/example-list.html b/examples/example-list.html index 2d3530fff9..3ac9120b4f 100644 --- a/examples/example-list.html +++ b/examples/example-list.html @@ -64,7 +64,7 @@ } .ex_classes{ font-size: .7em; - color: grey; + color: gray; display: none; } #toc { @@ -169,7 +169,7 @@ var words = text.split(/\W+/); var scores = {}; for(var i=0; i diff --git a/examples/filter-strategy.js b/examples/filter-strategy.js index 9f8d3942d9..cacdf8daa6 100644 --- a/examples/filter-strategy.js +++ b/examples/filter-strategy.js @@ -24,7 +24,7 @@ function startAnimation() { } else { stopAnimation(true); } - } + }; animationTimer = window.setInterval(next, interval * 1000); } diff --git a/examples/game-accel-ball.html b/examples/game-accel-ball.html index 75aa1460e7..40bb02d791 100644 --- a/examples/game-accel-ball.html +++ b/examples/game-accel-ball.html @@ -74,7 +74,7 @@
Simple acceleration demo; roll a vector feature around on a map. (Only tested on iOS 4.)
-
+

Demo works best when device is locked in portrait mode.

diff --git a/examples/getfeatureinfo-control.html b/examples/getfeatureinfo-control.html index 96993ff326..cb0bec10e4 100644 --- a/examples/getfeatureinfo-control.html +++ b/examples/getfeatureinfo-control.html @@ -105,7 +105,7 @@ }, queryVisible: true }) - } + }; map.addLayers([political, roads, cities, water, highlightLayer]); for (var i in infoControls) { diff --git a/examples/gutter.html b/examples/gutter.html index ea538546ce..f284f3445e 100644 --- a/examples/gutter.html +++ b/examples/gutter.html @@ -19,7 +19,7 @@ window.onload = function() { options = {maxExtent: new OpenLayers.Bounds(-73.5295, 41.2318, -69.9097, 42.8883), - maxResolution: 0.0003} + maxResolution: 0.0003}; map = new OpenLayers.Map('map', options); var roads15 = new OpenLayers.Layer.WMS( "Roads (15px gutter)", "http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&", diff --git a/examples/layerLoadMonitoring.html b/examples/layerLoadMonitoring.html index a8a17685c3..281fd7894f 100644 --- a/examples/layerLoadMonitoring.html +++ b/examples/layerLoadMonitoring.html @@ -71,7 +71,7 @@ layer.logEvent = function(event) { eventsLog.innerHTML += "
(" + getTimeStamp() + ") " + this.name + ": " + event; - } + }; layer.events.register("loadstart", layer, function() { this.logEvent("Load Start"); diff --git a/examples/mapguide.html b/examples/mapguide.html index 5ecc8b2913..e8ffd0bf90 100644 --- a/examples/mapguide.html +++ b/examples/mapguide.html @@ -54,10 +54,10 @@ var params = { mapdefinition: 'Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition', basemaplayergroupname: "Base Layer Group" - } + }; var options = { singleTile: false - } + }; var layer = new OpenLayers.Layer.MapGuide( "MapGuide OS tiled layer", url, params, options ); map.addLayer(layer); diff --git a/examples/mobile-jq.js b/examples/mobile-jq.js index a7ef681b92..353a645f93 100644 --- a/examples/mobile-jq.js +++ b/examples/mobile-jq.js @@ -17,7 +17,7 @@ $(document).ready(function() { content.height(contentHeight); } - if (window.map) { + if (window.map && window.map instanceof OpenLayers.Map) { map.updateSize(); } else { // initialize map diff --git a/examples/mobile-layers.js b/examples/mobile-layers.js index 05e1f03399..3cb84e08bc 100644 --- a/examples/mobile-layers.js +++ b/examples/mobile-layers.js @@ -40,7 +40,7 @@ function init() { "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'}, {isBaseLayer: true, transitionEffect: 'resize'} - ) + ); var kml = new OpenLayers.Layer.Vector("KML", { projection: map.displayProjection, diff --git a/examples/mvs.html b/examples/mvs.html index e26b0125f0..f3866f5339 100644 --- a/examples/mvs.html +++ b/examples/mvs.html @@ -34,7 +34,7 @@ function runMVS() { // ---- // TODO: Handle all this parsing better. - var safeArgs = {} + var safeArgs = {}; var DEFAULT_LAT = 0; var DEFAULT_LON = 0; diff --git a/examples/ordering.html b/examples/ordering.html index 7cb3f2b584..262c379f34 100644 --- a/examples/ordering.html +++ b/examples/ordering.html @@ -100,7 +100,7 @@ graphicZIndex: useFirst ? FIRST_RED_Z_INDEX : SECOND_RED_Z_INDEX, externalGraphic: "../img/marker.png", pointRadius: 10 - } + }; indexFeatures.push( point diff --git a/examples/osm-layer.html b/examples/osm-layer.html index 58f8158eec..d282a0f8a4 100644 --- a/examples/osm-layer.html +++ b/examples/osm-layer.html @@ -95,9 +95,9 @@ } else { gml = new OpenLayers.Layer.GML("OSM", "xml/cambridgeport.osm", {format: OpenLayers.Format.OSM}); } - } - gml.events.register("loadstart", null, function() { $("status").innerHTML = "Loading..."; }) - gml.events.register("loadend", null, function() { $("status").innerHTML = ""; }) + } + gml.events.register("loadstart", null, function() { $("status").innerHTML = "Loading..."; }); + gml.events.register("loadend", null, function() { $("status").innerHTML = ""; }); map.addLayer(gml); gml.preFeatureInsert = style_osm_feature; var sf = new OpenLayers.Control.SelectFeature(gml, {'onSelect': on_feature_hover}); diff --git a/examples/overviewmap.html b/examples/overviewmap.html index 7ae1ee86c2..2cb9df9fc9 100644 --- a/examples/overviewmap.html +++ b/examples/overviewmap.html @@ -108,7 +108,7 @@ 20037508.34, 20037508.34) }), layers: [jplOverview] - } + }; var overview2 = new OpenLayers.Control.OverviewMap(controlOptions); map2.addControl(overview2); diff --git a/examples/point-grid.js b/examples/point-grid.js index e3a29e89ca..e7b2e2e1b1 100644 --- a/examples/point-grid.js +++ b/examples/point-grid.js @@ -13,7 +13,7 @@ var rotation = document.getElementById("rotation"); rotation.value = String(points.rotation); rotation.onchange = function() { points.setRotation(Number(rotation.value)); -} +}; var dx = document.getElementById("dx"); var dy = document.getElementById("dy"); @@ -21,13 +21,13 @@ dx.value = String(points.dx); dy.value = String(points.dy); dx.onchange = function() { points.setSpacing(Number(dx.value), Number(dy.value)); -} +}; dy.onchange = function() { points.setSpacing(Number(dx.value), Number(dy.value)); -} +}; var max = document.getElementById("max"); max.value = String(points.maxFeatures); max.onchange = function() { points.setMaxFeatures(Number(max.value)); -} +}; diff --git a/examples/popupMatrix.html b/examples/popupMatrix.html index 4a2280ef1d..90b5fc02e3 100644 --- a/examples/popupMatrix.html +++ b/examples/popupMatrix.html @@ -163,25 +163,25 @@ //anchored popup bigger contents autosize ll = new OpenLayers.LonLat(5,20); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.Anchored
autosize
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML); //anchored popup bigger contents autosize closebox ll = new OpenLayers.LonLat(10,20); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize
closebox
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.Anchored
autosize
closebox
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, true); //anchored popup wide short text contents autosize ll = new OpenLayers.LonLat(20,20); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize - wide short text
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.Anchored
autosize - wide short text
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML); //anchored popup wide short text contents autosize closebox ll = new OpenLayers.LonLat(25,20); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize - wide short text
closebox
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.Anchored
autosize - wide short text
closebox
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, true); @@ -214,13 +214,13 @@ //anchored popup wide long fixed contents autosize ll = new OpenLayers.LonLat(65,20); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML); //anchored popup wide long fixed contents autosize closebox ll = new OpenLayers.LonLat(70,20); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true); // @@ -282,64 +282,64 @@ //anchored popup bigger contents autosize overflow ll = new OpenLayers.LonLat(5,15); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize
overflow
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.Anchored
autosize
overflow
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored popup bigger contents autosize closebox overflow ll = new OpenLayers.LonLat(10,15); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize
overflow
closebox
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.Anchored
autosize
overflow
closebox
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored popup wide short text contents autosize overflow ll = new OpenLayers.LonLat(20,15); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize
overflow
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.Anchored
autosize
overflow
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored popup wide short text contents autosize closebox overflow ll = new OpenLayers.LonLat(25,15); popupClass = AutoSizeAnchored; - popupContentHTML = '
Popup.Anchored
autosize
overflow
closebox
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.Anchored
autosize
overflow
closebox
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored popup wide short fixed contents autosize overflow ll = new OpenLayers.LonLat(35,15); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored popup wide short fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(40,15); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored popup thin long fixed contents autosize overflow ll = new OpenLayers.LonLat(50,15); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored popup thin long fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(55,15); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored popup wide long fixed contents autosize overflow ll = new OpenLayers.LonLat(65,15); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored popup wide long fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(70,15); popupClass = AutoSizeAnchored; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); @@ -402,65 +402,65 @@ //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(5,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, false); //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(10,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize
closebox
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize
closebox
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup wide short text contents autosize ll = new OpenLayers.LonLat(20,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize - wide short text
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize - wide short text
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup wide short text contents autosize closebox ll = new OpenLayers.LonLat(25,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize - wide short text
closebox
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize - wide short text
closebox
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup wide short fixed contents autosize ll = new OpenLayers.LonLat(35,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup wide short fixed contents autosize closebox ll = new OpenLayers.LonLat(40,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup thin long fixed contents autosize ll = new OpenLayers.LonLat(50,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup thin long fixed contents autosize closebox ll = new OpenLayers.LonLat(55,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup wide long fixed contents autosize ll = new OpenLayers.LonLat(65,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup wide long fixed contents autosize closebox ll = new OpenLayers.LonLat(70,5); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true); // @@ -522,65 +522,65 @@ //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(5,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize
overflow
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize
overflow
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(10,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize
closebox
overflow
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize
closebox
overflow
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup wide short contents autosize overflow ll = new OpenLayers.LonLat(20,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize
overflow
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize
overflow
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup wide short contents autosize closebox overflow ll = new OpenLayers.LonLat(25,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '
Popup.AnchoredBubble
autosize
overflow
closebox
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.AnchoredBubble
autosize
overflow
closebox
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup wide short fixed contents autosize overflow ll = new OpenLayers.LonLat(35,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup wide short fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(40,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup thin long fixed contents autosize overflow ll = new OpenLayers.LonLat(50,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup thin long fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(55,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup wide long fixed contents autosize overflow ll = new OpenLayers.LonLat(65,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup wide long fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(70,0); popupClass = AutoSizeAnchoredBubble; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); //FRAMED @@ -644,65 +644,65 @@ //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(5,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.FramedCloud
autosize
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, false); //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(10,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize
closebox
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.FramedCloud
autosize
closebox
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup wide short text contents autosize ll = new OpenLayers.LonLat(20,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize - wide short text
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.FramedCloud
autosize - wide short text
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup wide short text contents autosize closebox ll = new OpenLayers.LonLat(25,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize - wide short text
closebox
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.FramedCloud
autosize - wide short text
closebox
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup wide short fixed contents autosize ll = new OpenLayers.LonLat(35,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup wide short fixed contents autosize closebox ll = new OpenLayers.LonLat(40,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup thin long fixed contents autosize ll = new OpenLayers.LonLat(50,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup thin long fixed contents autosize closebox ll = new OpenLayers.LonLat(55,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true); //anchored bubble popup wide long fixed contents autosize ll = new OpenLayers.LonLat(65,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML); //anchored bubble popup wide long fixed contents autosize closebox ll = new OpenLayers.LonLat(70,-15); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true); // @@ -764,65 +764,65 @@ //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(5,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize
overflow
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.FramedCloud
autosize
overflow
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup bigger contents autosize closebox ll = new OpenLayers.LonLat(10,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize
closebox
overflow
' + samplePopupContentsHTML + '
' + popupContentHTML = '
Popup.FramedCloud
autosize
closebox
overflow
' + samplePopupContentsHTML + '
'; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup wide short contents autosize overflow ll = new OpenLayers.LonLat(20,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize
overflow
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.FramedCloud
autosize
overflow
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup wide short contents autosize closebox overflow ll = new OpenLayers.LonLat(25,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '
Popup.FramedCloud
autosize
overflow
closebox
' + samplePopupContentsHTML_WideShort + '
' + popupContentHTML = '
Popup.FramedCloud
autosize
overflow
closebox
' + samplePopupContentsHTML_WideShort + '
'; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup wide short fixed contents autosize overflow ll = new OpenLayers.LonLat(35,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup wide short fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(40,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup thin long fixed contents autosize overflow ll = new OpenLayers.LonLat(50,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup thin long fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(55,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); //anchored bubble popup wide long fixed contents autosize overflow ll = new OpenLayers.LonLat(65,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, false, true); //anchored bubble popup wide long fixed contents autosize closebox overflow ll = new OpenLayers.LonLat(70,-20); popupClass = AutoSizeFramedCloud; - popupContentHTML = '' + popupContentHTML = ''; addMarker(ll, popupClass, popupContentHTML, true, true); diff --git a/examples/popups.html b/examples/popups.html index 36200438f0..640c44e57b 100644 --- a/examples/popups.html +++ b/examples/popups.html @@ -124,7 +124,7 @@
click to add a Marker with an AnchoredBubble popup
click to modify popup's attributes
click to remove the popup from map
-
click to remove the markers layer
+
click to remove the markers layer
marker.onscreen()?
click to destroy the popup from map
diff --git a/examples/protocol-gears.html b/examples/protocol-gears.html index 23799ec83c..052a7c70b7 100644 --- a/examples/protocol-gears.html +++ b/examples/protocol-gears.html @@ -179,7 +179,7 @@ error = true; return; } - modify.selectControl.unselectAll() + modify.selectControl.unselectAll(); if (resp.reqFeatures) { vector.destroyFeatures(resp.reqFeatures); @@ -214,7 +214,7 @@ } var feature = vector.selectedFeatures[0]; if (feature) { - modify.selectControl.unselectAll() + modify.selectControl.unselectAll(); feature.state = OpenLayers.State.DELETE; displayStatus(); } diff --git a/examples/restricted-extent.html b/examples/restricted-extent.html index 5117453758..db5d7ec513 100644 --- a/examples/restricted-extent.html +++ b/examples/restricted-extent.html @@ -16,7 +16,7 @@ function init() { var options = { restrictedExtent: extent - } + }; map = new OpenLayers.Map('map', options); var wms = new OpenLayers.Layer.WMS( @@ -74,4 +74,4 @@ - \ No newline at end of file + diff --git a/examples/snap-grid.js b/examples/snap-grid.js index 81a72dab11..4478c5a1d1 100644 --- a/examples/snap-grid.js +++ b/examples/snap-grid.js @@ -66,16 +66,16 @@ var rotation = document.getElementById("rotation"); rotation.value = String(points.rotation); rotation.onchange = function() { points.setRotation(Number(rotation.value)); -} +}; var spacing = document.getElementById("spacing"); spacing.value = String(points.dx); spacing.onchange = function() { points.setSpacing(Number(spacing.value)); -} +}; var max = document.getElementById("max"); max.value = String(points.maxFeatures); max.onchange = function() { points.setMaxFeatures(Number(max.value)); -} +}; diff --git a/examples/snapping.html b/examples/snapping.html index 6747e899f6..6c735fe3fc 100644 --- a/examples/snapping.html +++ b/examples/snapping.html @@ -208,7 +208,7 @@ sel.value = "poly"; sel.onchange = function() { updateEditable(sel.value); - } + }; var target, type, tog, tol; var types = ["node", "vertex", "edge"]; diff --git a/examples/strategy-cluster.html b/examples/strategy-cluster.html index 49344230ab..bebbfddc82 100644 --- a/examples/strategy-cluster.html +++ b/examples/strategy-cluster.html @@ -53,7 +53,7 @@ right: 80px; } #photos ul li { - padding 10px; + padding: 10px; margin: 0; list-style: none; display: inline; diff --git a/examples/style.mobile.css b/examples/style.mobile.css index d9e9425310..31c27ffd92 100644 --- a/examples/style.mobile.css +++ b/examples/style.mobile.css @@ -1,5 +1,5 @@ div.olControlZoomPanel { - height: 108px + height: 108px; width: 36px; position: absolute; top: 20px; diff --git a/examples/styles-unique.html b/examples/styles-unique.html index 0d2e1ec500..7135466f72 100644 --- a/examples/styles-unique.html +++ b/examples/styles-unique.html @@ -39,7 +39,7 @@ 0: {externalGraphic: "../img/marker-blue.png"}, 1: {externalGraphic: "../img/marker-green.png"}, 2: {externalGraphic: "../img/marker-gold.png"} - } + }; // add rules from the above lookup table, with the keyes mapped to // the "type" property of the features, for the "default" intent @@ -69,7 +69,7 @@ var context = function(feature) { return feature; - } + }; var styleMap = new OpenLayers.StyleMap(); // create a lookup table with different symbolizers for the different diff --git a/examples/wmts-capabilities.js b/examples/wmts-capabilities.js index 7f138b4d1a..27fa54a9c3 100644 --- a/examples/wmts-capabilities.js +++ b/examples/wmts-capabilities.js @@ -43,7 +43,7 @@ function init() { alert("Trouble getting capabilities doc"); OpenLayers.Console.error.apply(OpenLayers.Console, arguments); } - }) + }); map = new OpenLayers.Map({ div: "map", diff --git a/examples/xyz-esri.html b/examples/xyz-esri.html index dfb5ca1b48..f6855a52ed 100644 --- a/examples/xyz-esri.html +++ b/examples/xyz-esri.html @@ -16,7 +16,7 @@ - - - -

XYZ Layer with Offset

-
- XYZ, layer, tile -
-
Using a limited set of levels from an XYZ layer with zoomOffset.
- -
- -
-

- The XYZ layer allows a zoomOffset to be set if you want to have - a maximum resolution for the map that differs from the maxiumum - resolution of the cached tiles. This example uses only 6 of the - levels in the cache, starting with the ninth level (index of 8) - in the cache. To do this, the layer is constructed with a - zoomOffset of 8. When the map zoom level is zero, the level - with index 8 will be requested from the cache. -

-

- See the - xyz-offset.js source to see how this is done. -

-
- - diff --git a/examples/xyz-offset.js b/examples/xyz-offset.js deleted file mode 100644 index 251a8c1720..0000000000 --- a/examples/xyz-offset.js +++ /dev/null @@ -1,32 +0,0 @@ -var map, layer; - -// called on body load -function init() { - - var extent = new OpenLayers.Bounds( - -13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881 - ); - - map = new OpenLayers.Map({ - div: "map", - maxExtent: new OpenLayers.Bounds( - -128 * 156543.0339, -128 * 156543.0339, - 128 * 156543.0339, 128 * 156543.0339 - ), - restrictedExtent: extent, - maxResolution: 611.496226171875, // corresponds to level 8 in the cache - numZoomLevels: 6, - projection: new OpenLayers.Projection("EPSG:900913"), - units: "m", - layers: [ - new OpenLayers.Layer.XYZ( - "ESRI", - "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer/tile/${z}/${y}/${x}", - {zoomOffset: 8} // since our map maxResolution differs from cache max resolution - ) - ] - }); - - map.zoomToExtent(extent); - -} diff --git a/lib/Firebug/firebug.js b/lib/Firebug/firebug.js index a6242c3bc5..f07825e029 100644 --- a/lib/Firebug/firebug.js +++ b/lib/Firebug/firebug.js @@ -208,7 +208,7 @@ if (!window.console || !console.firebug) { (function() consoleBody = doc.getElementById("log"); layout(); flush(); - } + }; var baseURL = getFirebugURL(); diff --git a/lib/OpenLayers/Control/WMSGetFeatureInfo.js b/lib/OpenLayers/Control/WMSGetFeatureInfo.js index 82c37d6e69..2093575d97 100644 --- a/lib/OpenLayers/Control/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Control/WMSGetFeatureInfo.js @@ -210,35 +210,6 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { } }, - /** - * Method: activate - * Activates the control. - * - * Returns: - * {Boolean} The control was effectively activated. - */ - activate: function () { - if (!this.active) { - this.handler.activate(); - } - return OpenLayers.Control.prototype.activate.apply( - this, arguments - ); - }, - - /** - * Method: deactivate - * Deactivates the control. - * - * Returns: - * {Boolean} The control was effectively deactivated. - */ - deactivate: function () { - return OpenLayers.Control.prototype.deactivate.apply( - this, arguments - ); - }, - /** * Method: getInfoForClick * Called on click diff --git a/lib/OpenLayers/Format/Context.js b/lib/OpenLayers/Format/Context.js index b73a4204e4..4798db4125 100644 --- a/lib/OpenLayers/Format/Context.js +++ b/lib/OpenLayers/Format/Context.js @@ -267,7 +267,7 @@ OpenLayers.Format.Context = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, keywords: context.keywords, logo: context.logo, descriptionURL: context.descriptionURL - } + }; options.metadata = metadata; diff --git a/lib/OpenLayers/Format/Filter/v1.js b/lib/OpenLayers/Format/Filter/v1.js index 7fd9830451..76b0c5743f 100644 --- a/lib/OpenLayers/Format/Filter/v1.js +++ b/lib/OpenLayers/Format/Filter/v1.js @@ -297,7 +297,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { "Filter": function(filter) { var node = this.createElementNSPlus("ogc:Filter"); if (filter.type === "FID") { - this.writeFeatureIdNodes(filter, node); + OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, filter, node); } else { this.writeNode(this.getFilterType(filter), filter, node); } @@ -314,7 +314,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { for (var i=0, ii=filter.filters.length; i element - } + }, + "LegendURL": function(node, obj) { + obj.legend = {}; + obj.legend.href = node.getAttribute("xlink:href"); + obj.legend.format = node.getAttribute("format"); + }, + "Dimension": function(node, obj) { + var dimension = {values: []}; + this.readChildNodes(node, dimension); + obj.dimensions.push(dimension); + }, + "Default": function(node, obj) { + obj["default"] = this.getChildValue(node); + }, + "Value": function(node, obj) { + obj.values.push(this.getChildValue(node)); + } }, "ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"] }, diff --git a/lib/OpenLayers/Format/WPSExecute.js b/lib/OpenLayers/Format/WPSExecute.js index 9b0d6e78c5..9761e1a010 100644 --- a/lib/OpenLayers/Format/WPSExecute.js +++ b/lib/OpenLayers/Format/WPSExecute.js @@ -242,6 +242,7 @@ OpenLayers.Format.WPSExecute = OpenLayers.Class(OpenLayers.Format.XML, { }, "wcs": OpenLayers.Format.WCSGetCoverage.prototype.writers.wcs, "wfs": OpenLayers.Format.WFST.v1_1_0.prototype.writers.wfs, + "ogc": OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc, "ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.writers.ows }, diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 4256bda5cb..407ad14fc4 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -325,15 +325,15 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { /** * Method: getServerResolution - * Return the server-supported resolution that is the closest to - * the resolution passed as a parameter. If no resolution is - * passed the map resolution is used. + * Return the closest highest server-supported resolution. Throw an + * exception if none is found in the serverResolutions array. * * Parameters: - * resolution - {Number} The base resolution. + * resolution - {Number} The base resolution. If undefined the + * map resolution is used. * * Returns: - * {Number} The closest server supported resolution. + * {Number} The closest highest server resolution value. */ getServerResolution: function(resolution) { resolution = resolution || this.map.getResolution(); diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 3315494bf3..8ce24e374d 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -299,11 +299,11 @@ OpenLayers.Map = OpenLayers.Class({ /** * APIProperty: maxExtent * {} The maximum extent for the map. Defaults to the - * whole world in decimal degrees - * (-180, -90, 180, 90). Specify a different - * extent in the map options if you are not using a - * geographic projection and displaying the whole - * world. + * whole world in decimal degrees (-180, -90, 180, 90). Specify a + * different extent in the map options if you are not using a geographic + * projection and displaying the whole world. To restrict user panning + * and zooming of the map, use instead. The value + * for will change calculations for tile URLs. */ maxExtent: null, diff --git a/lib/OpenLayers/Renderer/SVG.js b/lib/OpenLayers/Renderer/SVG.js index b2d475a4f0..89da0bd5fd 100644 --- a/lib/OpenLayers/Renderer/SVG.js +++ b/lib/OpenLayers/Renderer/SVG.js @@ -132,7 +132,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, { this.translate(this.xOffset, 0); return true; } else { - inRange = this.translate(left - this.left + this.xOffset, top - this.top); + var inRange = this.translate(left - this.left + this.xOffset, top - this.top); if (!inRange) { // recenter the coordinate system this.setExtent(extent, true); diff --git a/tests/Format/WMTSCapabilities/v1_0_0.html b/tests/Format/WMTSCapabilities/v1_0_0.html index af01d7c0b4..9ed58b3580 100644 --- a/tests/Format/WMTSCapabilities/v1_0_0.html +++ b/tests/Format/WMTSCapabilities/v1_0_0.html @@ -36,7 +36,7 @@ } function test_layers(t) { - t.plan(25); + t.plan(37); var xml = document.getElementById("ogcsample").firstChild.nodeValue; var doc = new OpenLayers.Format.XML().read(xml); @@ -61,9 +61,12 @@ t.eq(layer.styles[0].identifier, "DarkBlue", "style 0 identifier is correct"); t.eq(layer.styles[0].isDefault, true, "style 0 isDefault is correct"); t.eq(layer.styles[0].title, "Dark Blue", "style 0 title is correct"); + t.eq(layer.styles[0].legend.href, "http://www.miramon.uab.es/wmts/Coastlines/coastlines_darkBlue.png", "style 0 legend href is correct"); + t.eq(layer.styles[0].legend.format, "image/png", "style 0 legend format is correct"); t.eq(layer.styles[1].identifier, "thickAndRed", "style 1 identifier is correct"); t.ok(!layer.styles[1].isDefault, "style 1 isDefault is correct"); t.eq(layer.styles[1].title, "Thick And Red", "style 1 title is correct"); + t.eq(layer.styles[1].legend, undefined, "style 1 legend is not set"); //t.eq(layer.styles[1].abstract, "Specify this style if you want your maps to have thick red coastlines. ", "style 1 abstract is correct"); t.eq(layer.tileMatrixSetLinks.length, 1, "correct count of tileMatrixSetLinks"); @@ -83,6 +86,17 @@ t.eq(layer.resourceUrl.FeatureInfo.format, "application/gml+xml; version=3.1", "resourceUrl.FeatureInfo.format is correct"); t.eq(layer.resourceUrl.FeatureInfo.template, "http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml", "resourceUrl.FeatureInfo.template is correct"); + + var dimensions = layer.dimensions; + t.eq(dimensions.length, 1, "correct count of dimensions"); + t.eq(dimensions[0].title, "Time", "first dimension title is correct"); + t.eq(dimensions[0].abstract, "Monthly datasets", "first dimension abstract is correct"); + t.eq(dimensions[0].identifier, "TIME", "first dimension identifier is correct"); + t.eq(dimensions[0]['default'], "default", "first dimension default is correct"); + t.eq(dimensions[0].values.length, 3, "first dimension has correct count of values"); + t.eq(dimensions[0].values[0], "2007-05", "first value is correct"); + t.eq(dimensions[0].values[1], "2007-06", "second value is correct"); + t.eq(dimensions[0].values[2], "2007-07", "third value is correct"); } function test_tileMatrixSets(t) { @@ -271,6 +285,7 @@ http://schemas.opengis.net/wmts/1.0/examples/wmtsGetCapabilities_response.xml 2007-05 2007-06 2007-07 + default BigWorld diff --git a/tests/Format/WPSExecute.html b/tests/Format/WPSExecute.html index 124bd9722f..4e9ed6ddd5 100644 --- a/tests/Format/WPSExecute.html +++ b/tests/Format/WPSExecute.html @@ -458,6 +458,65 @@ t.xml_eq(result, expected, "WPS Execute written out correctly"); } + function test_write_WPSExecuteFID(t) { + t.plan(1); + + var result, + expected, + format = ({geometryName: 'the_geom'}); + + expected = '' + + '' + + ' gs:Bounds' + + ' ' + + ' ' + + ' features' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' bounds' + + ' ' + + ' ' + + ''; + + result = new OpenLayers.Format.WPSExecute().write({ + identifier: 'gs:Bounds', + dataInputs: [{ + identifier: 'features', + reference: { + mimeType: 'text/xml', + href: 'http://geoserver/wfs', + method: 'POST', + body: { + wfs: { + featureType: 'foo:bar', + version: '1.0.0', + filter: new OpenLayers.Filter.FeatureId({fids: [123]}) + } + } + } + }], + responseForm: { + rawDataOutput: { + identifier: 'bounds' + } + } + }); + t.xml_eq(result, expected, 'WPS Execute written out correctly with a FID filter'); + } + diff --git a/tests/Layer/WMTS.html b/tests/Layer/WMTS.html index 98bb6cdb07..5b87d32e49 100644 --- a/tests/Layer/WMTS.html +++ b/tests/Layer/WMTS.html @@ -272,7 +272,7 @@ style: "blue_marble", matrixSet: "arcgis_online", tileSize: new OpenLayers.Size(512, 512), - requestEncoding: "REST", + requestEncoding: "REST" }); map.addLayer(layer); map.setCenter(new OpenLayers.LonLat(0,0), 5);