diff --git a/build/library.cfg b/build/library.cfg deleted file mode 100644 index f4d66faffe..0000000000 --- a/build/library.cfg +++ /dev/null @@ -1,45 +0,0 @@ -# This file includes the OpenLayers code to create a build for everything that -# does not require vector support. - -[first] - -[last] - -[include] - -[exclude] -Firebug -OpenLayers.js -OpenLayers/Format/GeoRSS.js -OpenLayers/Format/GML.js -OpenLayers/Format/WKT.js -OpenLayers/Format/KML.js -OpenLayers/Format/WFS.js -OpenLayers/Format.js -OpenLayers/Handler/Path.js -OpenLayers/Handler/Point.js -OpenLayers/Handler/Polygon.js -OpenLayers/Handler/Select.js -OpenLayers/Geometry/Collection.js -OpenLayers/Geometry/Curve.js -OpenLayers/Geometry/LinearRing.js -OpenLayers/Geometry/LineString.js -OpenLayers/Geometry/MultiLineString.js -OpenLayers/Geometry/MultiPoint.js -OpenLayers/Geometry/MultiPolygon.js -OpenLayers/Geometry/Point.js -OpenLayers/Geometry/Polygon.js -OpenLayers/Geometry.js -OpenLayers/Layer/Vector.js -OpenLayers/Control/DrawFeature.js -OpenLayers/Control/EditingToolbar.js -OpenLayers/Control/SelectFeature.js -OpenLayers/Feature/Vector.js -OpenLayers/Renderer -OpenLayers/Renderer/Elements.js -OpenLayers/Renderer/SVG.js -OpenLayers/Renderer/VML.js -OpenLayers/Renderer.js -OpenLayers/Lang - - diff --git a/doc_config/Menu.txt b/doc_config/Menu.txt index 7d685cb73c..1a941749ae 100644 --- a/doc_config/Menu.txt +++ b/doc_config/Menu.txt @@ -458,6 +458,7 @@ Group: OpenLayers { File: Tween (no auto-title, OpenLayers/Tween.js) File: Util (no auto-title, OpenLayers/Util.js) + File: Spherical (no auto-title, OpenLayers/Spherical.js) File: Deprecated (no auto-title, deprecated.js) } # Group: OpenLayers diff --git a/examples/canvas.js b/examples/canvas.js index 6440c39a11..bb2f224f60 100644 --- a/examples/canvas.js +++ b/examples/canvas.js @@ -5,12 +5,7 @@ function init() { map = new OpenLayers.Map({ div: "map", projection: new OpenLayers.Projection("EPSG:900913"), - displayProjection: new OpenLayers.Projection("EPSG:4326"), - units: "m", - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508, -20037508, 20037508, 20037508 - ) + displayProjection: new OpenLayers.Projection("EPSG:4326") }); var g = new OpenLayers.Layer.Google("Google Layer", { diff --git a/examples/clientzoom.js b/examples/clientzoom.js index 65ae758c3c..30071edfef 100644 --- a/examples/clientzoom.js +++ b/examples/clientzoom.js @@ -5,10 +5,6 @@ function init() { map = new OpenLayers.Map({ div: "map", projection: "EPSG:900913", - units: "m", - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [], fractionalZoom: true }); diff --git a/examples/draw-feature.html b/examples/draw-feature.html index d292794f63..f70e9eabf3 100644 --- a/examples/draw-feature.html +++ b/examples/draw-feature.html @@ -33,18 +33,27 @@ var pointLayer = new OpenLayers.Layer.Vector("Point Layer"); var lineLayer = new OpenLayers.Layer.Vector("Line Layer"); var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); + var boxLayer = new OpenLayers.Layer.Vector("Box layer"); - map.addLayers([wmsLayer, pointLayer, lineLayer, polygonLayer]); + map.addLayers([wmsLayer, pointLayer, lineLayer, polygonLayer, boxLayer]); map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MousePosition()); drawControls = { point: new OpenLayers.Control.DrawFeature(pointLayer, - OpenLayers.Handler.Point), + OpenLayers.Handler.Point), line: new OpenLayers.Control.DrawFeature(lineLayer, - OpenLayers.Handler.Path), + OpenLayers.Handler.Path), polygon: new OpenLayers.Control.DrawFeature(polygonLayer, - OpenLayers.Handler.Polygon) + OpenLayers.Handler.Polygon), + box: new OpenLayers.Control.DrawFeature(boxLayer, + OpenLayers.Handler.RegularPolygon, { + handlerOptions: { + sides: 4, + irregular: true + } + } + ) }; for(var key in drawControls) { @@ -80,11 +89,11 @@

OpenLayers Draw Feature Example

- point, line, linestring, polygon, digitizing, geometry, draw, drag + point, line, linestring, polygon, box, digitizing, geometry, draw, drag

- Demonstrate on-screen digitizing tools for point, line, and polygon creation. + Demonstrate on-screen digitizing tools for point, line, polygon and box creation.

@@ -107,6 +116,10 @@ +
  • + + +
  • @@ -119,6 +132,8 @@ Double-click to finish drawing.

    With the polygon drawing control active, click on the map to add the points that make up your polygon. Double-click to finish drawing.

    +

    With the box drawing control active, click in the map and drag the mouse to get a rectangle. Release + the mouse to finish.

    With any drawing control active, paning the map can still be achieved. Drag the map as usual for that.

    Hold down the shift key while drawing to activate freehand mode. While drawing lines or polygons diff --git a/examples/google-static.html b/examples/google-static.html new file mode 100644 index 0000000000..96847cb83b --- /dev/null +++ b/examples/google-static.html @@ -0,0 +1,39 @@ + + + + + + + OpenLayers Google (Static Maps API) Grid Layer Example + + + + +

    Google (Static Maps API) Grid Layer Example

    +
    + Google, grid, static, GMaps +
    +

    + Using the Google Static Maps API with a Grid Layer. +

    +
    +
    +

    A Grid layer with a custom getURL method can be + used to request static maps for a specific extent and zoom + level. The Google Static Maps API is the most reliable way to + get Google base maps in OpenLayers. Note, however, that the + free version of this is limited to a map size of 640x640 pixels + (1280x1280 if the scale=2 url parameter is used) + and 1000 page views per viewer per day. Every map center + or zoom level change increases the page view counter by 1. +

    +

    Look at the + google-static.js + source to see how this is done. See the + Static Maps API V2 Developer Guide + for details on the API. +

    + + + + diff --git a/examples/google-static.js b/examples/google-static.js new file mode 100644 index 0000000000..bc97e4c0bb --- /dev/null +++ b/examples/google-static.js @@ -0,0 +1,61 @@ +var options = { + singleTile: true, + ratio: 1, + isBaseLayer: true, + wrapDateLine: true, + getURL: function() { + var center = this.map.getCenter().transform("EPSG:3857", "EPSG:4326"), + size = this.map.getSize(); + return [ + this.url, "¢er=", center.lat, ",", center.lon, + "&zoom=", this.map.getZoom(), "&size=", size.w, "x", size.h + ].join(""); + } +}; + +var map = new OpenLayers.Map({ + div: "map", + projection: "EPSG:3857", + numZoomLevels: 22, + layers: [ + new OpenLayers.Layer.Grid( + "Google Physical", + "http://maps.googleapis.com/maps/api/staticmap?sensor=false&maptype=terrain", + null, options + ), + new OpenLayers.Layer.Grid( + "Google Streets", + "http://maps.googleapis.com/maps/api/staticmap?sensor=false&maptype=roadmap", + null, options + ), + new OpenLayers.Layer.Grid( + "Google Hybrid", + "http://maps.googleapis.com/maps/api/staticmap?sensor=false&maptype=hybrid", + null, options + ), + new OpenLayers.Layer.Grid( + "Google Satellite", + "http://maps.googleapis.com/maps/api/staticmap?sensor=false&maptype=satellite", + null, options + ), + // the same layer again, but scaled to allow map sizes up to 1280x1280 pixels + new OpenLayers.Layer.Grid( + "Google Satellite (scale=2)", + "http://maps.googleapis.com/maps/api/staticmap?sensor=false&maptype=satellite&scale=2", + null, OpenLayers.Util.applyDefaults({ + getURL: function() { + var center = this.map.getCenter().transform("EPSG:3857", "EPSG:4326"), + size = this.map.getSize(); + return [ + this.url, "¢er=", center.lat, ",", center.lon, + "&zoom=", (this.map.getZoom() - 1), + "&size=", Math.floor(size.w / 2), "x", Math.floor(size.h / 2) + ].join(""); + } + }, options) + ), + ], + center: new OpenLayers.LonLat(10.2, 48.9).transform("EPSG:4326", "EPSG:3857"), + zoom: 5 +}); +map.addControl(new OpenLayers.Control.LayerSwitcher()); diff --git a/examples/google-v3-alloverlays.html b/examples/google-v3-alloverlays.html index 10dcde4364..dac1d15f13 100644 --- a/examples/google-v3-alloverlays.html +++ b/examples/google-v3-alloverlays.html @@ -8,7 +8,7 @@ - + diff --git a/examples/mobile-base.js b/examples/mobile-base.js index 5e123cc3b9..5440f932e2 100644 --- a/examples/mobile-base.js +++ b/examples/mobile-base.js @@ -41,12 +41,7 @@ var init = function (onSelectFeatureFunction) { div: "map", theme: null, projection: sm, - units: "m", numZoomLevels: 18, - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [ new OpenLayers.Control.Attribution(), new OpenLayers.Control.TouchNavigation({ diff --git a/examples/mobile-drawing.js b/examples/mobile-drawing.js index 34b26ec30f..13494ef321 100644 --- a/examples/mobile-drawing.js +++ b/examples/mobile-drawing.js @@ -41,12 +41,7 @@ function init() { map = new OpenLayers.Map({ div: 'map', projection: 'EPSG:900913', - units: 'm', numZoomLevels: 18, - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [ new OpenLayers.Control.TouchNavigation({ dragPanOptions: { diff --git a/examples/mobile-jq.html b/examples/mobile-jq.html index eb9ff6c7c2..470fd39d5d 100644 --- a/examples/mobile-jq.html +++ b/examples/mobile-jq.html @@ -7,7 +7,7 @@ - + diff --git a/examples/mobile-navigation.js b/examples/mobile-navigation.js index ce08b498e6..57929e9de3 100644 --- a/examples/mobile-navigation.js +++ b/examples/mobile-navigation.js @@ -5,12 +5,7 @@ function init() { div: "map", theme: null, projection: new OpenLayers.Projection("EPSG:900913"), - units: "m", numZoomLevels: 18, - maxResolution: 156543.0339, - maxExtent: new OpenLayers.Bounds( - -20037508.34, -20037508.34, 20037508.34, 20037508.34 - ), controls: [ new OpenLayers.Control.TouchNavigation({ dragPanOptions: { diff --git a/examples/mobile-wmts-vienna.css b/examples/mobile-wmts-vienna.css index a5e3f5e167..741cd6d37b 100644 --- a/examples/mobile-wmts-vienna.css +++ b/examples/mobile-wmts-vienna.css @@ -9,6 +9,12 @@ html, body, #map { #title, #tags, #shortdesc { display: none; } +.olTileImage { + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; +} div.olControlAttribution { position: absolute; font-size: 10px; diff --git a/examples/mobile-wmts-vienna.html b/examples/mobile-wmts-vienna.html index 280f66ce74..d6d127c7c6 100644 --- a/examples/mobile-wmts-vienna.html +++ b/examples/mobile-wmts-vienna.html @@ -7,7 +7,6 @@ -

    City of Vienna WMTS for Desktop and Mobile Devices

    @@ -22,6 +21,7 @@ functionality and uses the Geolocate control.

    + diff --git a/examples/mobile-wmts-vienna.js b/examples/mobile-wmts-vienna.js index 692b86afe2..4257f7429b 100644 --- a/examples/mobile-wmts-vienna.js +++ b/examples/mobile-wmts-vienna.js @@ -152,7 +152,6 @@ var map; var defaults = { requestEncoding: "REST", matrixSet: "google3857", - buffer: 4, attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' }; var doc = request.responseText, @@ -182,7 +181,6 @@ var map; requestEncoding: "REST", matrixSet: "google3857", tileFullExtent: extent, - buffer: 4, attribution: 'Datenquelle: Stadt Wien - data.wien.gv.at' }; fmzk = new OpenLayers.Layer.WMTS(OpenLayers.Util.applyDefaults({ diff --git a/examples/modify-feature.html b/examples/modify-feature.html index 8cec2306af..cb19858ddd 100644 --- a/examples/modify-feature.html +++ b/examples/modify-feature.html @@ -96,6 +96,7 @@ if (rotate || drag) { controls.modify.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE; } + controls.modify.createVertices = document.getElementById("createVertices").checked; var sides = parseInt(document.getElementById("sides").value); sides = Math.max(3, isNaN(sides) ? 0 : sides); controls.regular.handler.sides = sides; @@ -161,6 +162,11 @@ onclick="toggleControl(this);" />