[OpenLayers-Commits] r12438 - in sandbox/august/trunk: . examples
lib/Firebug lib/OpenLayers lib/OpenLayers/BaseTypes
lib/OpenLayers/Control lib/OpenLayers/Filter
lib/OpenLayers/Format lib/OpenLayers/Format/Filter
lib/OpenLayers/Format/WFST lib/OpenLayers/Format/WMC
lib/OpenLayers/Format/WMSCapabilities
lib/OpenLayers/Format/WMTSCapabilities lib/OpenLayers/Lang
lib/OpenLayers/Layer lib/OpenLayers/Renderer
lib/OpenLayers/Tile lib/OpenLayers/Tile/Image playground
playground/wms playground/wmts tests tests/BaseTypes
tests/Control tests/Format tests/Format/WFST
tests/Format/WMSCapabilities tests/Format/WMTSCapabilities
tests/Layer tests/Renderer tests/Tile tests/Tile/Image
tests/manual theme/default util
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Fri Dec 2 12:50:29 EST 2011
Author: augusttown
Date: 2011-12-02 09:50:27 -0800 (Fri, 02 Dec 2011)
New Revision: 12438
Added:
sandbox/august/trunk/examples/clientzoom.html
sandbox/august/trunk/examples/clientzoom.js
sandbox/august/trunk/playground/wms/
sandbox/august/trunk/playground/wms/wms-capabilities.html
sandbox/august/trunk/playground/wms/wms-capabilities.js
sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema-nowkid-mixed-compact.html
sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.html
sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.js
sandbox/august/trunk/tests/manual/dateline-smallextent.html
Modified:
sandbox/august/trunk/
sandbox/august/trunk/examples/KMLParser.html
sandbox/august/trunk/examples/WMSDescribeLayerParser.html
sandbox/august/trunk/examples/animator.js
sandbox/august/trunk/examples/bing.html
sandbox/august/trunk/examples/buffer.html
sandbox/august/trunk/examples/donut.js
sandbox/august/trunk/examples/editing-methods.js
sandbox/august/trunk/examples/example-list.html
sandbox/august/trunk/examples/filter-strategy.js
sandbox/august/trunk/examples/game-accel-ball.html
sandbox/august/trunk/examples/getfeatureinfo-control.html
sandbox/august/trunk/examples/gutter.html
sandbox/august/trunk/examples/layerLoadMonitoring.html
sandbox/august/trunk/examples/mapguide.html
sandbox/august/trunk/examples/mobile-jq.js
sandbox/august/trunk/examples/mobile-layers.js
sandbox/august/trunk/examples/mvs.html
sandbox/august/trunk/examples/ordering.html
sandbox/august/trunk/examples/osm-layer.html
sandbox/august/trunk/examples/osm.html
sandbox/august/trunk/examples/overviewmap.html
sandbox/august/trunk/examples/point-grid.js
sandbox/august/trunk/examples/popupMatrix.html
sandbox/august/trunk/examples/popups.html
sandbox/august/trunk/examples/protocol-gears.html
sandbox/august/trunk/examples/restricted-extent.html
sandbox/august/trunk/examples/snap-grid.js
sandbox/august/trunk/examples/snapping.html
sandbox/august/trunk/examples/spherical-mercator.html
sandbox/august/trunk/examples/strategy-cluster.html
sandbox/august/trunk/examples/style.mobile.css
sandbox/august/trunk/examples/styles-unique.html
sandbox/august/trunk/examples/tilecache.html
sandbox/august/trunk/examples/wmts-capabilities.js
sandbox/august/trunk/examples/xyz-esri.html
sandbox/august/trunk/lib/Firebug/firebug.js
sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js
sandbox/august/trunk/lib/OpenLayers/BaseTypes/Date.js
sandbox/august/trunk/lib/OpenLayers/BaseTypes/LonLat.js
sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js
sandbox/august/trunk/lib/OpenLayers/Control.js
sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js
sandbox/august/trunk/lib/OpenLayers/Control/DrawFeature.js
sandbox/august/trunk/lib/OpenLayers/Control/WMSGetFeatureInfo.js
sandbox/august/trunk/lib/OpenLayers/Filter/Comparison.js
sandbox/august/trunk/lib/OpenLayers/Filter/Spatial.js
sandbox/august/trunk/lib/OpenLayers/Format.js
sandbox/august/trunk/lib/OpenLayers/Format/ArcXML.js
sandbox/august/trunk/lib/OpenLayers/Format/Atom.js
sandbox/august/trunk/lib/OpenLayers/Format/Context.js
sandbox/august/trunk/lib/OpenLayers/Format/Filter/v1.js
sandbox/august/trunk/lib/OpenLayers/Format/GML.js
sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js
sandbox/august/trunk/lib/OpenLayers/Format/KML.js
sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js
sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1_1_0.js
sandbox/august/trunk/lib/OpenLayers/Format/WMC/v1.js
sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities/v1.js
sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
sandbox/august/trunk/lib/OpenLayers/Format/WPSExecute.js
sandbox/august/trunk/lib/OpenLayers/Lang.js
sandbox/august/trunk/lib/OpenLayers/Lang/ar.js
sandbox/august/trunk/lib/OpenLayers/Lang/be-tarask.js
sandbox/august/trunk/lib/OpenLayers/Lang/bg.js
sandbox/august/trunk/lib/OpenLayers/Lang/br.js
sandbox/august/trunk/lib/OpenLayers/Lang/ca.js
sandbox/august/trunk/lib/OpenLayers/Lang/cs-CZ.js
sandbox/august/trunk/lib/OpenLayers/Lang/da-DK.js
sandbox/august/trunk/lib/OpenLayers/Lang/de.js
sandbox/august/trunk/lib/OpenLayers/Lang/en.js
sandbox/august/trunk/lib/OpenLayers/Lang/es.js
sandbox/august/trunk/lib/OpenLayers/Lang/fr.js
sandbox/august/trunk/lib/OpenLayers/Lang/gl.js
sandbox/august/trunk/lib/OpenLayers/Lang/gsw.js
sandbox/august/trunk/lib/OpenLayers/Lang/hr.js
sandbox/august/trunk/lib/OpenLayers/Lang/hsb.js
sandbox/august/trunk/lib/OpenLayers/Lang/hu.js
sandbox/august/trunk/lib/OpenLayers/Lang/ia.js
sandbox/august/trunk/lib/OpenLayers/Lang/id.js
sandbox/august/trunk/lib/OpenLayers/Lang/is.js
sandbox/august/trunk/lib/OpenLayers/Lang/it.js
sandbox/august/trunk/lib/OpenLayers/Lang/ja.js
sandbox/august/trunk/lib/OpenLayers/Lang/km.js
sandbox/august/trunk/lib/OpenLayers/Lang/ksh.js
sandbox/august/trunk/lib/OpenLayers/Lang/lt.js
sandbox/august/trunk/lib/OpenLayers/Lang/nb.js
sandbox/august/trunk/lib/OpenLayers/Lang/nds.js
sandbox/august/trunk/lib/OpenLayers/Lang/nl.js
sandbox/august/trunk/lib/OpenLayers/Lang/nn.js
sandbox/august/trunk/lib/OpenLayers/Lang/oc.js
sandbox/august/trunk/lib/OpenLayers/Lang/pt-BR.js
sandbox/august/trunk/lib/OpenLayers/Lang/pt.js
sandbox/august/trunk/lib/OpenLayers/Lang/ru.js
sandbox/august/trunk/lib/OpenLayers/Lang/sk.js
sandbox/august/trunk/lib/OpenLayers/Lang/sv-SE.js
sandbox/august/trunk/lib/OpenLayers/Lang/vi.js
sandbox/august/trunk/lib/OpenLayers/Lang/zh-CN.js
sandbox/august/trunk/lib/OpenLayers/Lang/zh-TW.js
sandbox/august/trunk/lib/OpenLayers/Layer.js
sandbox/august/trunk/lib/OpenLayers/Layer/GML.js
sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js
sandbox/august/trunk/lib/OpenLayers/Layer/PointTrack.js
sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js
sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js
sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js
sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js
sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js
sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js
sandbox/august/trunk/lib/OpenLayers/Map.js
sandbox/august/trunk/lib/OpenLayers/Renderer.js
sandbox/august/trunk/lib/OpenLayers/Renderer/Canvas.js
sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js
sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js
sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js
sandbox/august/trunk/lib/OpenLayers/Request.js
sandbox/august/trunk/lib/OpenLayers/Style.js
sandbox/august/trunk/lib/OpenLayers/Tile.js
sandbox/august/trunk/lib/OpenLayers/Tile/Image.js
sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js
sandbox/august/trunk/lib/OpenLayers/Tween.js
sandbox/august/trunk/lib/OpenLayers/Util.js
sandbox/august/trunk/playground/index.html
sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema.html
sandbox/august/trunk/tests/BaseTypes/Bounds.html
sandbox/august/trunk/tests/BaseTypes/Date.html
sandbox/august/trunk/tests/BaseTypes/LonLat.html
sandbox/august/trunk/tests/BaseTypes/Pixel.html
sandbox/august/trunk/tests/Control/DrawFeature.html
sandbox/august/trunk/tests/Control/WMSGetFeatureInfo.html
sandbox/august/trunk/tests/Format/WFST/v1.html
sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html
sandbox/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html
sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html
sandbox/august/trunk/tests/Format/WPSExecute.html
sandbox/august/trunk/tests/Layer/ArcGIS93Rest.html
sandbox/august/trunk/tests/Layer/Grid.html
sandbox/august/trunk/tests/Layer/MapServer.html
sandbox/august/trunk/tests/Layer/PointTrack.html
sandbox/august/trunk/tests/Layer/Vector.html
sandbox/august/trunk/tests/Layer/WMS.html
sandbox/august/trunk/tests/Layer/WMTS.html
sandbox/august/trunk/tests/Map.html
sandbox/august/trunk/tests/Marker.html
sandbox/august/trunk/tests/Renderer.html
sandbox/august/trunk/tests/Renderer/Canvas.html
sandbox/august/trunk/tests/Renderer/Elements.html
sandbox/august/trunk/tests/Request.html
sandbox/august/trunk/tests/Style.html
sandbox/august/trunk/tests/Tile.html
sandbox/august/trunk/tests/Tile/Image.html
sandbox/august/trunk/tests/Tile/Image/IFrame.html
sandbox/august/trunk/tests/Tile/WFS.html
sandbox/august/trunk/tests/Util.html
sandbox/august/trunk/tests/list-tests.html
sandbox/august/trunk/tests/manual/dateline-sketch.html
sandbox/august/trunk/theme/default/style.css
sandbox/august/trunk/util/ags-proxy.jsp
Log:
Merge with Trunk @ Revision 12437
Property changes on: sandbox/august/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/openlayers:10329-10354,10357-10502,10504-12408
+ /trunk/openlayers:10329-10354,10357-10502,10504-12437
Modified: sandbox/august/trunk/examples/KMLParser.html
===================================================================
--- sandbox/august/trunk/examples/KMLParser.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/KMLParser.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -10,7 +10,7 @@
<script type="text/javascript">
function parseData(req) {
g = new OpenLayers.Format.KML({extractStyles: true});
- html = ""
+ html = "";
features = g.read(req.responseText);
for(var feat in features) {
html += "Feature: Geometry: "+ features[feat].geometry+",";
@@ -18,7 +18,7 @@
for (var j in features[feat].attributes) {
html += "<li>Attribute "+j+":"+features[feat].attributes[j]+"</li>";
}
- html += "</ul>"
+ html += "</ul>";
html += "<ul>";
for (var j in features[feat].style) {
html += "<li>Style "+j+":"+features[feat].style[j]+"</li>";
Modified: sandbox/august/trunk/examples/WMSDescribeLayerParser.html
===================================================================
--- sandbox/august/trunk/examples/WMSDescribeLayerParser.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/WMSDescribeLayerParser.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -10,7 +10,7 @@
<script type="text/javascript">
function parseData(req) {
format = new OpenLayers.Format.WMSDescribeLayer();
- html = "<br>"
+ html = "<br>";
resp = format.read(req.responseText);
for(var i = 0; i < resp.length; i++) {
html += "Layer: typeName: "+ resp[i].typeName+",";
Modified: sandbox/august/trunk/examples/animator.js
===================================================================
--- sandbox/august/trunk/examples/animator.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/animator.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -131,14 +131,14 @@
str += ">";
return str;
}
-}
+};
// merge the properties of two objects
Animator.applyDefaults = function(defaults, prefs) {
prefs = prefs || {};
var prop, result = {};
for (prop in defaults) result[prop] = prefs[prop] !== undefined ? prefs[prop] : defaults[prop];
return result;
-}
+};
// make an array from any object
Animator.makeArray = function(o) {
if (o == null) return [];
@@ -146,7 +146,7 @@
var result = [];
for (var i=0; i<o.length; i++) result[i] = o[i];
return result;
-}
+};
// convert a dash-delimited-property to a camelCaseProperty (c/o Prototype, thanks Sam!)
Animator.camelize = function(string) {
var oStringList = string.split('-');
@@ -161,27 +161,27 @@
camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
}
return camelizedString;
-}
+};
// syntactic sugar for creating CSSStyleSubjects
Animator.apply = function(el, style, options) {
if (style instanceof Array) {
return new Animator(options).addSubject(new CSSStyleSubject(el, style[0], style[1]));
}
return new Animator(options).addSubject(new CSSStyleSubject(el, style));
-}
+};
// make a transition function that gradually accelerates. pass a=1 for smooth
// gravitational acceleration, higher values for an exaggerated effect
Animator.makeEaseIn = function(a) {
return function(state) {
return Math.pow(state, a*2);
}
-}
+};
// as makeEaseIn but for deceleration
Animator.makeEaseOut = function(a) {
return function(state) {
return 1 - Math.pow(1 - state, a*2);
}
-}
+};
// make a transition function that, like an object with momentum being attracted to a point,
// goes past the target then returns
Animator.makeElastic = function(bounces) {
@@ -189,7 +189,7 @@
state = Animator.tx.easeInOut(state);
return ((1-Math.cos(state * Math.PI * bounces)) * (1 - state)) + state;
}
-}
+};
// make an Attack Decay Sustain Release envelope that starts and finishes on the same level
//
Animator.makeADSR = function(attackEnd, decayEnd, sustainEnd, sustainLevel) {
@@ -206,7 +206,7 @@
}
return sustainLevel * (1 - ((state - sustainEnd) / (1 - sustainEnd)));
}
-}
+};
// make a transition function that, like a ball falling to floor, reaches the target and/
// bounces back again
Animator.makeBounce = function(bounces) {
@@ -215,7 +215,7 @@
state = fn(state);
return state <= 1 ? state : 2-state;
}
-}
+};
// pre-made transition functions to use with the 'transition' option
Animator.tx = {
@@ -233,7 +233,7 @@
veryElastic: Animator.makeElastic(3),
bouncy: Animator.makeBounce(1),
veryBouncy: Animator.makeBounce(3)
-}
+};
// animates a pixel-based style property between two integer values
function NumericalStyleSubject(els, property, from, to, units) {
@@ -271,7 +271,7 @@
inspect: function() {
return "\t" + this.property + "(" + this.from + this.units + " to " + this.to + this.units + ")\n";
}
-}
+};
// animates a colour based style property between two hex values
function ColorStyleSubject(els, property, from, to) {
@@ -313,7 +313,7 @@
inspect: function() {
return "\t" + this.property + "(" + this.origFrom + " to " + this.origTo + ")\n";
}
-}
+};
// return a properly formatted 6-digit hex colour spec, or false
ColorStyleSubject.parseColor = function(string) {
@@ -336,14 +336,14 @@
return '#' + match[1];
}
return false;
-}
+};
// convert a number to a 2 digit hex string
ColorStyleSubject.toColorPart = function(number) {
if (number > 255) number = 255;
var digits = number.toString(16);
if (number < 16) return '0' + digits;
return digits;
-}
+};
ColorStyleSubject.parseColor.rgbRe = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;
ColorStyleSubject.parseColor.hexRe = /^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
@@ -367,7 +367,7 @@
inspect: function() {
return "\t" + this.property + "(" + this.from + " to " + this.to + " @ " + this.threshold + ")\n";
}
-}
+};
// animates between two styles defined using CSS.
// if style1 and style2 are present, animate between them, if only style1
@@ -482,7 +482,7 @@
}
return str;
}
-}
+};
// get the current value of a css property,
CSSStyleSubject.getStyle = function(el, property){
var style;
@@ -497,7 +497,7 @@
style = el.currentStyle[property];
}
return style || el.style[property]
-}
+};
CSSStyleSubject.ruleRe = /^\s*([a-zA-Z\-]+)\s*:\s*(\S(.+\S)?)\s*$/;
@@ -604,7 +604,7 @@
this.animators[this.current].seekTo(1);
}
}
-}
+};
// an Accordion is a class that creates and controls a number of Animators. An array of elements is passed in,
// and for each element an Animator and a activator button is created. When an Animator's activator button is
@@ -667,4 +667,4 @@
document.location.hash = this.rememberanceTexts[section];
}
}
-}
+};
Modified: sandbox/august/trunk/examples/bing.html
===================================================================
--- sandbox/august/trunk/examples/bing.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/bing.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -7,35 +7,37 @@
<title>OpenLayers Bing Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
- <script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&mkt=en-us"></script>
<script src="../lib/OpenLayers.js"></script>
<script>
+ // API key for http://openlayers.org. Please get your own at
+ // http://bingmapsportal.com/ and use that instead.
+ var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
var map;
-
- function init(){
- // setting restrictedExtent so that we can use the
- // VirtualEarth-layers, see e.g.
- // http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/VirtualEarth-js.html
- var restrictedExtent = new OpenLayers.Bounds(-180, -90,
- 180, 90);
-
+
+ function init() {
map = new OpenLayers.Map("map");
map.addControl(new OpenLayers.Control.LayerSwitcher());
- var shaded = new OpenLayers.Layer.VirtualEarth("Shaded", {
- type: VEMapStyle.Shaded
+ var road = new OpenLayers.Layer.Bing({
+ name: "Road",
+ key: apiKey,
+ type: "Road"
});
- var hybrid = new OpenLayers.Layer.VirtualEarth("Hybrid", {
- type: VEMapStyle.Hybrid
+ var hybrid = new OpenLayers.Layer.Bing({
+ name: "Hybrid",
+ key: apiKey,
+ type: "AerialWithLabels"
});
- var aerial = new OpenLayers.Layer.VirtualEarth("Aerial", {
- type: VEMapStyle.Aerial
+ var aerial = new OpenLayers.Layer.Bing({
+ name: "Aerial",
+ key: apiKey,
+ type: "Aerial"
});
- map.addLayers([shaded, hybrid, aerial]);
+ map.addLayers([road, hybrid, aerial]);
map.setCenter(new OpenLayers.LonLat(-110, 45), 3);
}
Modified: sandbox/august/trunk/examples/buffer.html
===================================================================
--- sandbox/august/trunk/examples/buffer.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/buffer.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -28,7 +28,7 @@
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'buffer':4} );
map.addLayer(layer);
- map.addControl(new OpenLayers.Control.LayerSwitcher())
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
</script>
Copied: sandbox/august/trunk/examples/clientzoom.html (from rev 12437, trunk/openlayers/examples/clientzoom.html)
===================================================================
--- sandbox/august/trunk/examples/clientzoom.html (rev 0)
+++ sandbox/august/trunk/examples/clientzoom.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <title>OpenLayers Client Zoom Example</title>
+ <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
+ <link rel="stylesheet" href="style.css" type="text/css">
+ <script src="../lib/Firebug/firebug.js"></script>
+ <script src="../lib/OpenLayers.js"></script>
+ <script src="clientzoom.js"></script>
+ <style>
+ .olControlAttribution {
+ bottom: 5px;
+ }
+ #map {
+ width: 600px;
+ height: 400px;
+ }
+ </style>
+ </head>
+ <body onload="init();">
+ <h1 id="title">Client Zoom</h1>
+ <div id="tags">
+ client zoom continuous zooming
+ </div>
+ <p id="shortdesc">
+
+ This example demonstrates the <strong>"client zoom"</strong>
+ functionality, where OpenLayers stretches the layer div when the
+ resolution is not supported by that layer's tile service.
+
+ </p>
+
+ <div id="map"></div>
+
+ <div id="docs">
+
+ <p>
+
+ The map of this example is configured with 22 resolutions, while
+ the OSM tile server supports the first 19 resolutions only. When
+ the zoom level is 19, 20 or 21 "client zoom" is applied to the OSM
+ layer, i.e. the OSM layer div is stretched as necessary. The map's
+ initial zoom is 18. So if you zoom in using the zoom bar's "+"
+ button you'll effectively trigger "client zoom".
+
+ </p>
+
+ <p>
+
+ For demonstration purpose the map of this example has
+ <code>fractionalZoom</code> set to true. So "client zoom" also
+ applies if you choose arbitrary zoom levels using the slider of the
+ zoom bar, or shift-drag boxes to zoom to arbitrary extents.
+ "client zoom" therefore allows continous zooming for tiled layers.
+
+ </p>
+
+ <p>
+
+ Enabling "client zoom" on a layer is done by passing
+ <code>serverResolutions</code> to the layer constructor.
+ <code>serverResolutions</code> is the list of resolutions supported
+ by the tile service. See the <a href="clientzoom.js"
+ target="_blank"> clientzoom.js source</a>.
+
+ </p>
+ </div>
+ </body>
+</html>
Copied: sandbox/august/trunk/examples/clientzoom.js (from rev 12437, trunk/openlayers/examples/clientzoom.js)
===================================================================
--- sandbox/august/trunk/examples/clientzoom.js (rev 0)
+++ sandbox/august/trunk/examples/clientzoom.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,43 @@
+var map;
+
+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
+ });
+
+ var osm = new OpenLayers.Layer.OSM(null, null, {
+ resolutions: [156543.03390625, 78271.516953125, 39135.7584765625,
+ 19567.87923828125, 9783.939619140625, 4891.9698095703125,
+ 2445.9849047851562, 1222.9924523925781, 611.4962261962891,
+ 305.74811309814453, 152.87405654907226, 76.43702827453613,
+ 38.218514137268066, 19.109257068634033, 9.554628534317017,
+ 4.777314267158508, 2.388657133579254, 1.194328566789627,
+ 0.5971642833948135, 0.25, 0.1, 0.05],
+ serverResolutions: [156543.03390625, 78271.516953125, 39135.7584765625,
+ 19567.87923828125, 9783.939619140625,
+ 4891.9698095703125, 2445.9849047851562,
+ 1222.9924523925781, 611.4962261962891,
+ 305.74811309814453, 152.87405654907226,
+ 76.43702827453613, 38.218514137268066,
+ 19.109257068634033, 9.554628534317017,
+ 4.777314267158508, 2.388657133579254,
+ 1.194328566789627, 0.5971642833948135],
+ transitionEffect: 'resize'
+ });
+
+ map.addLayers([osm]);
+ map.addControls([
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.PanZoomBar()
+ ]);
+ map.setCenter(new OpenLayers.LonLat(659688.852138, 5710701.2962197), 18);
+}
Modified: sandbox/august/trunk/examples/donut.js
===================================================================
--- sandbox/august/trunk/examples/donut.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/donut.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -31,7 +31,7 @@
map.layers[1].events.on({
sketchmodified: updateOutput,
sketchcomplete: updateOutput
-})
+});
// add behavior to UI elements
function toggleControl(element) {
Modified: sandbox/august/trunk/examples/editing-methods.js
===================================================================
--- sandbox/august/trunk/examples/editing-methods.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/editing-methods.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -29,7 +29,7 @@
if (values != null) {
draw.insertXY(values[0], values[1]);
}
-}
+};
$("insertDeltaXY").onclick = function() {
var values = parseInput(
window.prompt(
@@ -39,7 +39,7 @@
if (values != null) {
draw.insertDeltaXY(values[0], values[1]);
}
-}
+};
$("insertDirectionLength").onclick = function() {
var values = parseInput(
window.prompt(
@@ -49,7 +49,7 @@
if (values != null) {
draw.insertDirectionLength(values[0], values[1]);
}
-}
+};
$("insertDeflectionLength").onclick = function() {
var values = parseInput(
window.prompt(
@@ -59,13 +59,13 @@
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 @@
}
}
return values;
-}
\ No newline at end of file
+}
Modified: sandbox/august/trunk/examples/example-list.html
===================================================================
--- sandbox/august/trunk/examples/example-list.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/example-list.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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<words.length; ++i) {
- var word = words[i].toLowerCase()
+ var word = words[i].toLowerCase();
var dict = info.index[word];
var updateScores = function() {
for(exIndex in dict) {
@@ -185,7 +185,7 @@
scores[exIndex][word] = count;
}
}
- }
+ };
if(dict) {
updateScores();
} else {
@@ -255,7 +255,7 @@
template = new jugl.Template("template");
target = document.getElementById("examples");
listExamples(info.examples);
- document.getElementById("keywords").onkeyup = inputChange
+ document.getElementById("keywords").onkeyup = inputChange;
parseQuery();
};
</script>
Modified: sandbox/august/trunk/examples/filter-strategy.js
===================================================================
--- sandbox/august/trunk/examples/filter-strategy.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/filter-strategy.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -24,7 +24,7 @@
} else {
stopAnimation(true);
}
- }
+ };
animationTimer = window.setInterval(next, interval * 1000);
}
Modified: sandbox/august/trunk/examples/game-accel-ball.html
===================================================================
--- sandbox/august/trunk/examples/game-accel-ball.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/game-accel-ball.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -74,7 +74,7 @@
<div id="shortdesc">Simple acceleration demo; roll a vector feature around
on a map. (Only tested on iOS 4.)</div>
- <div id="map" width="100%" height="100%" style="background-color: grey"></div>
+ <div id="map" width="100%" height="100%" style="background-color: gray"></div>
<div id="docs">
<p>Demo works best when device is locked in portrait mode.</p>
</div>
Modified: sandbox/august/trunk/examples/getfeatureinfo-control.html
===================================================================
--- sandbox/august/trunk/examples/getfeatureinfo-control.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/getfeatureinfo-control.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -105,7 +105,7 @@
},
queryVisible: true
})
- }
+ };
map.addLayers([political, roads, cities, water, highlightLayer]);
for (var i in infoControls) {
Modified: sandbox/august/trunk/examples/gutter.html
===================================================================
--- sandbox/august/trunk/examples/gutter.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/gutter.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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&",
Modified: sandbox/august/trunk/examples/layerLoadMonitoring.html
===================================================================
--- sandbox/august/trunk/examples/layerLoadMonitoring.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/layerLoadMonitoring.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -71,7 +71,7 @@
layer.logEvent = function(event) {
eventsLog.innerHTML += "<br>(" + getTimeStamp() + ") " +
this.name + ": " + event;
- }
+ };
layer.events.register("loadstart", layer, function() {
this.logEvent("Load Start");
Modified: sandbox/august/trunk/examples/mapguide.html
===================================================================
--- sandbox/august/trunk/examples/mapguide.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/mapguide.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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);
Modified: sandbox/august/trunk/examples/mobile-jq.js
===================================================================
--- sandbox/august/trunk/examples/mobile-jq.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/mobile-jq.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -17,7 +17,7 @@
content.height(contentHeight);
}
- if (window.map) {
+ if (window.map && window.map instanceof OpenLayers.Map) {
map.updateSize();
} else {
// initialize map
Modified: sandbox/august/trunk/examples/mobile-layers.js
===================================================================
--- sandbox/august/trunk/examples/mobile-layers.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/mobile-layers.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -40,7 +40,7 @@
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'},
{isBaseLayer: true, transitionEffect: 'resize'}
- )
+ );
var kml = new OpenLayers.Layer.Vector("KML", {
projection: map.displayProjection,
Modified: sandbox/august/trunk/examples/mvs.html
===================================================================
--- sandbox/august/trunk/examples/mvs.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/mvs.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -34,7 +34,7 @@
// ----
// TODO: Handle all this parsing better.
- var safeArgs = {}
+ var safeArgs = {};
var DEFAULT_LAT = 0;
var DEFAULT_LON = 0;
Modified: sandbox/august/trunk/examples/ordering.html
===================================================================
--- sandbox/august/trunk/examples/ordering.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/ordering.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -100,7 +100,7 @@
graphicZIndex: useFirst ? FIRST_RED_Z_INDEX : SECOND_RED_Z_INDEX,
externalGraphic: "../img/marker.png",
pointRadius: 10
- }
+ };
indexFeatures.push(
point
Modified: sandbox/august/trunk/examples/osm-layer.html
===================================================================
--- sandbox/august/trunk/examples/osm-layer.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/osm-layer.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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});
Modified: sandbox/august/trunk/examples/osm.html
===================================================================
--- sandbox/august/trunk/examples/osm.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/osm.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
- <title>OpenLayers Basic Single WMS Example</title>
+ <title>OpenLayers Basic OSM Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/OpenLayers.js"></script>
Modified: sandbox/august/trunk/examples/overviewmap.html
===================================================================
--- sandbox/august/trunk/examples/overviewmap.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/overviewmap.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -108,7 +108,7 @@
20037508.34, 20037508.34)
}),
layers: [jplOverview]
- }
+ };
var overview2 = new OpenLayers.Control.OverviewMap(controlOptions);
map2.addControl(overview2);
Modified: sandbox/august/trunk/examples/point-grid.js
===================================================================
--- sandbox/august/trunk/examples/point-grid.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/point-grid.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -13,7 +13,7 @@
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 @@
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));
-}
+};
Modified: sandbox/august/trunk/examples/popupMatrix.html
===================================================================
--- sandbox/august/trunk/examples/popupMatrix.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/popupMatrix.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -163,25 +163,25 @@
//anchored popup bigger contents autosize
ll = new OpenLayers.LonLat(5,20);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,20);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup wide short text contents autosize
ll = new OpenLayers.LonLat(20,20);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup wide short text contents autosize closebox
ll = new OpenLayers.LonLat(25,20);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
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 = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup wide long fixed contents autosize closebox
ll = new OpenLayers.LonLat(70,20);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//
@@ -282,64 +282,64 @@
//anchored popup bigger contents autosize overflow
ll = new OpenLayers.LonLat(5,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup bigger contents autosize closebox overflow
ll = new OpenLayers.LonLat(10,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup wide short text contents autosize overflow
ll = new OpenLayers.LonLat(20,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup wide short text contents autosize closebox overflow
ll = new OpenLayers.LonLat(25,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup wide short fixed contents autosize overflow
ll = new OpenLayers.LonLat(35,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup wide short fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(40,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup thin long fixed contents autosize overflow
ll = new OpenLayers.LonLat(50,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup thin long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(55,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup wide long fixed contents autosize overflow
ll = new OpenLayers.LonLat(65,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup wide long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(70,15);
popupClass = AutoSizeAnchored;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
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 = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short text contents autosize
ll = new OpenLayers.LonLat(20,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short text contents autosize closebox
ll = new OpenLayers.LonLat(25,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short fixed contents autosize
ll = new OpenLayers.LonLat(35,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short fixed contents autosize closebox
ll = new OpenLayers.LonLat(40,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup thin long fixed contents autosize
ll = new OpenLayers.LonLat(50,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup thin long fixed contents autosize closebox
ll = new OpenLayers.LonLat(55,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide long fixed contents autosize
ll = new OpenLayers.LonLat(65,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide long fixed contents autosize closebox
ll = new OpenLayers.LonLat(70,5);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
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 = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,0);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short contents autosize overflow
ll = new OpenLayers.LonLat(20,0);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide short contents autosize closebox overflow
ll = new OpenLayers.LonLat(25,0);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short fixed contents autosize overflow
ll = new OpenLayers.LonLat(35,0);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
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 = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup thin long fixed contents autosize overflow
ll = new OpenLayers.LonLat(50,0);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
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 = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide long fixed contents autosize overflow
ll = new OpenLayers.LonLat(65,0);
popupClass = AutoSizeAnchoredBubble;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
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 = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
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 = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short text contents autosize
ll = new OpenLayers.LonLat(20,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short text contents autosize closebox
ll = new OpenLayers.LonLat(25,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short fixed contents autosize
ll = new OpenLayers.LonLat(35,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short fixed contents autosize closebox
ll = new OpenLayers.LonLat(40,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup thin long fixed contents autosize
ll = new OpenLayers.LonLat(50,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup thin long fixed contents autosize closebox
ll = new OpenLayers.LonLat(55,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide long fixed contents autosize
ll = new OpenLayers.LonLat(65,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide long fixed contents autosize closebox
ll = new OpenLayers.LonLat(70,-15);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
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 = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,-20);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short contents autosize overflow
ll = new OpenLayers.LonLat(20,-20);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide short contents autosize closebox overflow
ll = new OpenLayers.LonLat(25,-20);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
+ popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short fixed contents autosize overflow
ll = new OpenLayers.LonLat(35,-20);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
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 = '<img src="img/wideshort.jpg"></img>'
+ popupContentHTML = '<img src="img/wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup thin long fixed contents autosize overflow
ll = new OpenLayers.LonLat(50,-20);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
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 = '<img src="img/thinlong.jpg"></img>'
+ popupContentHTML = '<img src="img/thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide long fixed contents autosize overflow
ll = new OpenLayers.LonLat(65,-20);
popupClass = AutoSizeFramedCloud;
- popupContentHTML = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
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 = '<img src="img/widelong.jpg"></img>'
+ popupContentHTML = '<img src="img/widelong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
Modified: sandbox/august/trunk/examples/popups.html
===================================================================
--- sandbox/august/trunk/examples/popups.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/popups.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -124,7 +124,7 @@
<div style="background-color:green" onclick="addMarker()"> click to add a Marker with an AnchoredBubble popup</div>
<div style="background-color:blue" onclick="changer()"> click to modify popup's attributes</div>
<div style="background-color:red" onclick="remove()"> click to remove the popup from map</div>
- <div style="background-color:grey" onclick="removelayer()"> click to remove the markers layer</div>
+ <div style="background-color:gray" onclick="removelayer()"> click to remove the markers layer</div>
<div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
<div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div>
<div id="docs">
Modified: sandbox/august/trunk/examples/protocol-gears.html
===================================================================
--- sandbox/august/trunk/examples/protocol-gears.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/protocol-gears.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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();
}
Modified: sandbox/august/trunk/examples/restricted-extent.html
===================================================================
--- sandbox/august/trunk/examples/restricted-extent.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/restricted-extent.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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 @@
</label>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: sandbox/august/trunk/examples/snap-grid.js
===================================================================
--- sandbox/august/trunk/examples/snap-grid.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/snap-grid.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -66,16 +66,16 @@
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));
-}
+};
Modified: sandbox/august/trunk/examples/snapping.html
===================================================================
--- sandbox/august/trunk/examples/snapping.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/snapping.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -208,7 +208,7 @@
sel.value = "poly";
sel.onchange = function() {
updateEditable(sel.value);
- }
+ };
var target, type, tog, tol;
var types = ["node", "vertex", "edge"];
Modified: sandbox/august/trunk/examples/spherical-mercator.html
===================================================================
--- sandbox/august/trunk/examples/spherical-mercator.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/spherical-mercator.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -11,74 +11,84 @@
<![endif]-->
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
- .olControlAttribution { bottom: 0px!important }
+ .olControlAttribution {
+ bottom: 0px
+ }
#map {
height: 512px;
}
-
- /* avoid pink tiles */
- .olImageLoadError {
- background-color: transparent !important;
- }
</style>
- <script src='http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'></script>
- <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
+ <script src="http://maps.google.com/maps/api/js?v=3.5&sensor=false"></script>
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
<script src="../lib/OpenLayers.js"></script>
- <script type="text/javascript">
+ </head>
+ <body>
+ <h1 id="title">OpenLayers Spherical Mercator Example</h1>
-// make map available for easy debugging
-var map;
+ <div id="tags">
+ spherical, mercator, osm, xyz, google, virtual earth, yahoo, tile
+ </div>
+ <p id="shortdesc">
+ Shows the use of the Spherical Mercator Layers, for overlaying
+ Google, Yahoo, Microsoft, and other layers with XYZ tiles.
+ </p>
+ <div id="map" class="smallmap"></div>
-// increase reload attempts
-OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
+ <div id="docs"></div>
+ <script type="text/javascript">
-function init(){
- var maxExtent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508),
- restrictedExtent = maxExtent.clone(),
- maxResolution = 156543.0339;
-
- var options = {
+ var map = new OpenLayers.Map({
+ div: "map",
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
numZoomLevels: 18,
- maxResolution: maxResolution,
- maxExtent: maxExtent,
- restrictedExtent: restrictedExtent
- };
- map = new OpenLayers.Map('map', options);
+ maxResolution: 156543.0339,
+ maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508),
+ });
// create Google Mercator layers
+ var gphy = new OpenLayers.Layer.Google(
+ "Google Physical",
+ {type: google.maps.MapTypeId.TERRAIN}
+ );
var gmap = new OpenLayers.Layer.Google(
- "Google Streets",
- {sphericalMercator: true}
+ "Google Streets", // the default
+ {numZoomLevels: 20}
);
- var gsat = new OpenLayers.Layer.Google(
- "Google Satellite",
- {type: G_SATELLITE_MAP, sphericalMercator: true, numZoomLevels: 22}
- );
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
- {type: G_HYBRID_MAP, sphericalMercator: true}
+ {type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}
);
-
- // create Virtual Earth layers
- var veroad = new OpenLayers.Layer.VirtualEarth(
- "Virtual Earth Roads",
- {'type': VEMapStyle.Road, sphericalMercator: true}
+ var gsat = new OpenLayers.Layer.Google(
+ "Google Satellite",
+ {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}
);
- var veaer = new OpenLayers.Layer.VirtualEarth(
- "Virtual Earth Aerial",
- {'type': VEMapStyle.Aerial, sphericalMercator: true}
- );
- var vehyb = new OpenLayers.Layer.VirtualEarth(
- "Virtual Earth Hybrid",
- {'type': VEMapStyle.Hybrid, sphericalMercator: true}
- );
+ // create Bing layers
+
+ // API key for http://openlayers.org. Please get your own at
+ // http://bingmapsportal.com/ and use that instead.
+ var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
+
+ var veroad = new OpenLayers.Layer.Bing({
+ key: apiKey,
+ type: "Road",
+ wrapDateLine: true
+ });
+ var veaer = new OpenLayers.Layer.Bing({
+ key: apiKey,
+ type: "Aerial",
+ wrapDateLine: true
+ });
+ var vehyb = new OpenLayers.Layer.Bing({
+ key: apiKey,
+ type: "AerialWithLabels",
+ wrapDateLine: true
+ });
+
// create Yahoo layer
var yahoo = new OpenLayers.Layer.Yahoo(
"Yahoo Street",
@@ -93,64 +103,28 @@
{'type': YAHOO_MAP_HYB, sphericalMercator: true}
);
- // create OSM layer
+ // create OSM layers
var mapnik = new OpenLayers.Layer.OSM();
- // create OAM layer
- var oam = new OpenLayers.Layer.XYZ(
- "OpenAerialMap",
- "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/${z}/${x}/${y}.png",
- {
- sphericalMercator: true
- }
- );
- // create OSM layer
var osmarender = new OpenLayers.Layer.OSM(
"OpenStreetMap (Tiles at Home)",
"http://tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png"
);
-
- // create WMS layer
- var wms = new OpenLayers.Layer.WMS(
- "World Map",
- "http://world.freemap.in/tiles/",
- {'layers': 'factbook-overlay', 'format':'png'},
- {
- 'opacity': 0.4, visibility: false,
- 'isBaseLayer': false,'wrapDateLine': true
- }
- );
-
// create a vector layer for drawing
var vector = new OpenLayers.Layer.Vector("Editable Vectors");
- map.addLayers([gmap, gsat, ghyb, veroad, veaer, vehyb,
- yahoo, yahoosat, yahoohyb, oam, mapnik, osmarender,
- wms, vector]);
+ map.addLayers([
+ gphy, gmap, gsat, ghyb, veroad, veaer, vehyb, yahoo, yahoosat,
+ yahoohyb, mapnik, osmarender, vector
+ ]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.EditingToolbar(vector));
map.addControl(new OpenLayers.Control.Permalink());
map.addControl(new OpenLayers.Control.MousePosition());
- if (!map.getCenter()) {map.zoomToMaxExtent()}
-}
+ map.zoomToMaxExtent();
</script>
- </head>
- <body onload="init()">
- <h1 id="title">OpenLayers Spherical Mercator Example</h1>
-
- <div id="tags">
- spherical, mercator, osm, xyz, google, virtual earth, yahoo, tms, tile
- </div>
- <p id="shortdesc">
- Shows the use of the Spherical Mercator Layers, for overlaying
- Google, Yahoo, Microsoft, and other layers with WMS and TMS tiles.
- </p>
- <div id="map" class="smallmap"></div>
-
- <div id="docs">
- </div>
</body>
</html>
Modified: sandbox/august/trunk/examples/strategy-cluster.html
===================================================================
--- sandbox/august/trunk/examples/strategy-cluster.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/strategy-cluster.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -53,7 +53,7 @@
right: 80px;
}
#photos ul li {
- padding 10px;
+ padding: 10px;
margin: 0;
list-style: none;
display: inline;
Modified: sandbox/august/trunk/examples/style.mobile.css
===================================================================
--- sandbox/august/trunk/examples/style.mobile.css 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/style.mobile.css 2011-12-02 17:50:27 UTC (rev 12438)
@@ -1,5 +1,5 @@
div.olControlZoomPanel {
- height: 108px
+ height: 108px;
width: 36px;
position: absolute;
top: 20px;
Modified: sandbox/august/trunk/examples/styles-unique.html
===================================================================
--- sandbox/august/trunk/examples/styles-unique.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/styles-unique.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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
Modified: sandbox/august/trunk/examples/tilecache.html
===================================================================
--- sandbox/august/trunk/examples/tilecache.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/tilecache.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -32,17 +32,6 @@
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
}
-
- OpenLayers.Util.onImageLoadError = function() {
- /**
- * For images that don't exist in the cache, you can display
- * a default image - one that looks like water for example.
- * To show nothing at all, leave the following lines commented out.
- */
-
- //this.src = "../img/blank.gif";
- //this.style.display = "";
- };
</script>
</head>
<body onload="init()">
Modified: sandbox/august/trunk/examples/wmts-capabilities.js
===================================================================
--- sandbox/august/trunk/examples/wmts-capabilities.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/wmts-capabilities.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -43,7 +43,7 @@
alert("Trouble getting capabilities doc");
OpenLayers.Console.error.apply(OpenLayers.Console, arguments);
}
- })
+ });
map = new OpenLayers.Map({
div: "map",
Modified: sandbox/august/trunk/examples/xyz-esri.html
===================================================================
--- sandbox/august/trunk/examples/xyz-esri.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/examples/xyz-esri.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -16,7 +16,7 @@
<script type="text/javascript">
var map, layer;
function init(){
- var layerExtent = new OpenLayers.Bounds( -13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881)
+ var layerExtent = new OpenLayers.Bounds( -13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881);
map = new OpenLayers.Map( 'map', {'restrictedExtent': layerExtent} );
layer = new OpenLayers.Layer.XYZ( "ESRI",
"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer/tile/${z}/${y}/${x}",
Modified: sandbox/august/trunk/lib/Firebug/firebug.js
===================================================================
--- sandbox/august/trunk/lib/Firebug/firebug.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/Firebug/firebug.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -208,7 +208,7 @@
consoleBody = doc.getElementById("log");
layout();
flush();
- }
+ };
var baseURL = getFirebugURL();
Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,8 +5,6 @@
/**
* @requires OpenLayers/BaseTypes/Class.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -300,9 +298,7 @@
*/
add:function(x, y) {
if ( (x == null) || (y == null) ) {
- var msg = OpenLayers.i18n("boundsAddError");
- OpenLayers.Console.error(msg);
- return null;
+ throw new TypeError('Bounds.add cannot receive null values');
}
return new OpenLayers.Bounds(this.left + x, this.bottom + y,
this.right + x, this.top + y);
@@ -358,14 +354,37 @@
*
* Parameters:
* ll - {<OpenLayers.LonLat>}
+ * options - {Object} Optional parameters
+ *
+ * Acceptable options:
* inclusive - {Boolean} Whether or not to include the border.
* Default is true.
+ * worldBounds - {<OpenLayers.Bounds>} If a worldBounds is provided, the
+ * ll will be considered as contained if it exceeds the world bounds,
+ * but can be wrapped around the dateline so it is contained by this
+ * bounds.
*
* Returns:
* {Boolean} The passed-in lonlat is within this bounds.
*/
- containsLonLat:function(ll, inclusive) {
- return this.contains(ll.lon, ll.lat, inclusive);
+ containsLonLat: function(ll, options) {
+ if (typeof options === "boolean") {
+ options = {inclusive: options};
+ }
+ options = options || {};
+ var contains = this.contains(ll.lon, ll.lat, options.inclusive),
+ worldBounds = options.worldBounds;
+ if (worldBounds && !contains) {
+ var worldWidth = worldBounds.getWidth();
+ ll = ll.clone();
+ var worldCenterX = (worldBounds.left + worldBounds.right) / 2;
+ var worldsAway = Math.round((ll.lon - worldCenterX) / worldWidth);
+ ll.lon -= (worldsAway * worldWidth);
+ contains = this.containsLonLat(
+ ll, {inclusive: options.inclusive}
+ );
+ }
+ return contains;
},
/**
@@ -428,48 +447,79 @@
*
* Parameters:
* bounds - {<OpenLayers.Bounds>} The target bounds.
+ * options - {Object} Optional parameters.
+ *
+ * Acceptable options:
* inclusive - {Boolean} Treat coincident borders as intersecting. Default
* is true. If false, bounds that do not overlap but only touch at the
* border will not be considered as intersecting.
+ * worldBounds - {<OpenLayers.Bounds>} If a worldBounds is provided, two
+ * bounds will be considered as intersecting if they intersect when
+ * shifted to within the world bounds. This applies only to bounds that
+ * cross or are completely outside the world bounds.
*
* Returns:
* {Boolean} The passed-in bounds object intersects this bounds.
*/
- intersectsBounds:function(bounds, inclusive) {
- if (inclusive == null) {
- inclusive = true;
+ intersectsBounds:function(bounds, options) {
+ if (typeof options === "boolean") {
+ options = {inclusive: options};
}
+ options = options || {};
+ if (options.worldBounds) {
+ var self = this.wrapDateLine(options.worldBounds);
+ bounds = bounds.wrapDateLine(options.worldBounds);
+ } else {
+ self = this;
+ }
+ if (options.inclusive == null) {
+ options.inclusive = true;
+ }
var intersects = false;
var mightTouch = (
- this.left == bounds.right ||
- this.right == bounds.left ||
- this.top == bounds.bottom ||
- this.bottom == bounds.top
+ self.left == bounds.right ||
+ self.right == bounds.left ||
+ self.top == bounds.bottom ||
+ self.bottom == bounds.top
);
// if the two bounds only touch at an edge, and inclusive is false,
// then the bounds don't *really* intersect.
- if (inclusive || !mightTouch) {
+ if (options.inclusive || !mightTouch) {
// otherwise, if one of the boundaries even partially contains another,
// inclusive of the edges, then they do intersect.
var inBottom = (
- ((bounds.bottom >= this.bottom) && (bounds.bottom <= this.top)) ||
- ((this.bottom >= bounds.bottom) && (this.bottom <= bounds.top))
+ ((bounds.bottom >= self.bottom) && (bounds.bottom <= self.top)) ||
+ ((self.bottom >= bounds.bottom) && (self.bottom <= bounds.top))
);
var inTop = (
- ((bounds.top >= this.bottom) && (bounds.top <= this.top)) ||
- ((this.top > bounds.bottom) && (this.top < bounds.top))
+ ((bounds.top >= self.bottom) && (bounds.top <= self.top)) ||
+ ((self.top > bounds.bottom) && (self.top < bounds.top))
);
var inLeft = (
- ((bounds.left >= this.left) && (bounds.left <= this.right)) ||
- ((this.left >= bounds.left) && (this.left <= bounds.right))
+ ((bounds.left >= self.left) && (bounds.left <= self.right)) ||
+ ((self.left >= bounds.left) && (self.left <= bounds.right))
);
var inRight = (
- ((bounds.right >= this.left) && (bounds.right <= this.right)) ||
- ((this.right >= bounds.left) && (this.right <= bounds.right))
+ ((bounds.right >= self.left) && (bounds.right <= self.right)) ||
+ ((self.right >= bounds.left) && (self.right <= bounds.right))
);
intersects = ((inBottom || inTop) && (inLeft || inRight));
}
+ // document me
+ if (options.worldBounds && !intersects) {
+ var world = options.worldBounds;
+ var width = world.getWidth();
+ var selfCrosses = !world.containsBounds(self);
+ var boundsCrosses = !world.containsBounds(bounds);
+ if (selfCrosses && !boundsCrosses) {
+ bounds = bounds.add(-width, 0);
+ intersects = self.intersectsBounds(bounds, {inclusive: options.inclusive});
+ } else if (boundsCrosses && !selfCrosses) {
+ self = self.add(-width, 0);
+ intersects = bounds.intersectsBounds(self, {inclusive: options.inclusive});
+ }
+ }
return intersects;
},
@@ -577,8 +627,9 @@
* a different bounds value if this bounds is
* *entirely* outside of the maxExtent. If this
* bounds straddles the dateline (is part in/part
- * out of maxExtent), the returned bounds will be
- * merely a copy of this one.
+ * out of maxExtent), the returned bounds will always
+ * cross the left edge of the given maxExtent.
+ *.
*/
wrapDateLine: function(maxExtent, options) {
options = options || {};
@@ -589,18 +640,26 @@
var newBounds = this.clone();
if (maxExtent) {
+ var width = maxExtent.getWidth();
- //shift right?
- while ( newBounds.left < maxExtent.left &&
- (newBounds.right - rightTolerance) <= maxExtent.left ) {
- newBounds = newBounds.add(maxExtent.getWidth(), 0);
- }
+ //shift right?
+ while (newBounds.left < maxExtent.left &&
+ newBounds.right - rightTolerance <= maxExtent.left ) {
+ newBounds = newBounds.add(width, 0);
+ }
- //shift left?
- while ( (newBounds.left + leftTolerance) >= maxExtent.right &&
+ //shift left?
+ while (newBounds.left + leftTolerance >= maxExtent.right &&
newBounds.right > maxExtent.right ) {
- newBounds = newBounds.add(-maxExtent.getWidth(), 0);
- }
+ newBounds = newBounds.add(-width, 0);
+ }
+
+ // crosses right only? force left
+ var newLeft = newBounds.left + leftTolerance;
+ if (newLeft < maxExtent.right && newLeft > maxExtent.left &&
+ newBounds.right - rightTolerance > maxExtent.right) {
+ newBounds = newBounds.add(-width, 0);
+ }
}
return newBounds;
@@ -641,14 +700,8 @@
*/
OpenLayers.Bounds.fromArray = function(bbox, reverseAxisOrder) {
return reverseAxisOrder === true ?
- new OpenLayers.Bounds(parseFloat(bbox[1]),
- parseFloat(bbox[0]),
- parseFloat(bbox[3]),
- parseFloat(bbox[2])) :
- new OpenLayers.Bounds(parseFloat(bbox[0]),
- parseFloat(bbox[1]),
- parseFloat(bbox[2]),
- parseFloat(bbox[3]));
+ new OpenLayers.Bounds(bbox[1], bbox[0], bbox[3], bbox[2]) :
+ new OpenLayers.Bounds(bbox[0], bbox[1], bbox[2], bbox[3]);
};
/**
Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes/Date.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes/Date.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes/Date.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -87,7 +87,7 @@
*/
parse: function(str) {
var date;
- var match = str.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);
+ var match = str.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/);
if (match && (match[1] || match[7])) { // must have at least year or time
var year = parseInt(match[1], 10) || 0;
var month = (parseInt(match[2], 10) - 1) || 0;
Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes/LonLat.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes/LonLat.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes/LonLat.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,8 +5,6 @@
/**
* @requires OpenLayers/BaseTypes/Class.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -91,9 +89,7 @@
*/
add:function(lon, lat) {
if ( (lon == null) || (lat == null) ) {
- var msg = OpenLayers.i18n("lonlatAddError");
- OpenLayers.Console.error(msg);
- return null;
+ throw new TypeError('LonLat.add cannot receive null values');
}
return new OpenLayers.LonLat(this.lon + OpenLayers.Util.toFloat(lon),
this.lat + OpenLayers.Util.toFloat(lat));
Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,8 +5,6 @@
/**
* @requires OpenLayers/BaseTypes/Class.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -116,9 +114,7 @@
*/
add:function(x, y) {
if ( (x == null) || (y == null) ) {
- var msg = OpenLayers.i18n("pixelAddError");
- OpenLayers.Console.error(msg);
- return null;
+ throw new TypeError('Pixel.add cannot receive null values');
}
return new OpenLayers.Pixel(this.x + x, this.y + y);
},
Modified: sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -10,7 +10,7 @@
/**
* Class: OpenLayers.Control.ArgParser
- * The ArgParser control adds location bar querystring parsing functionality
+ * The ArgParser control adds location bar query string parsing functionality
* to an OpenLayers Map.
* When added to a Map control, on a page load/refresh, the Map will
* automatically take the href string and parse it for lon, lat, zoom, and
@@ -43,7 +43,6 @@
* APIProperty: displayProjection
* {<OpenLayers.Projection>} Requires proj4js support.
* Projection used when reading the coordinates from the URL. This will
- *
* reproject the map coordinates from the URL into the map's
* projection.
*
@@ -68,10 +67,10 @@
url = url || window.location.href;
var parameters = OpenLayers.Util.getParameters(url);
- // If we have an chchor in the url use it to split the url
+ // If we have an anchor in the url use it to split the url
var index = url.indexOf('#');
if (index > 0) {
- // create an url to parce on the getParameters
+ // create an url to parse on the getParameters
url = '?' + url.substring(index + 1, url.length);
OpenLayers.Util.extend(parameters,
@@ -122,7 +121,7 @@
this.center = new OpenLayers.LonLat(parseFloat(args.lon),
parseFloat(args.lat));
if (args.zoom) {
- this.zoom = parseInt(args.zoom);
+ this.zoom = parseFloat(args.zoom);
}
// when we add a new baselayer to see when we can set the center
Modified: sandbox/august/trunk/lib/OpenLayers/Control/DrawFeature.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/DrawFeature.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Control/DrawFeature.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -83,6 +83,11 @@
);
this.layer = layer;
this.handlerOptions = this.handlerOptions || {};
+ this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults(
+ this.handlerOptions.layerOptions, {
+ renderers: layer.renderers, rendererOptions: layer.rendererOptions
+ }
+ );
if (!("multi" in this.handlerOptions)) {
this.handlerOptions.multi = this.multi;
}
Modified: sandbox/august/trunk/lib/OpenLayers/Control/WMSGetFeatureInfo.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/WMSGetFeatureInfo.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Control/WMSGetFeatureInfo.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -211,35 +211,6 @@
},
/**
- * 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
*
@@ -287,7 +258,7 @@
var candidates = this.layers || this.map.layers;
var layers = [];
var layer, url;
- for(var i=0, len=candidates.length; i<len; ++i) {
+ for(var i = candidates.length - 1; i >= 0; --i) {
layer = candidates[i];
if(layer instanceof OpenLayers.Layer.WMS &&
(!this.queryVisible || layer.getVisibility())) {
Modified: sandbox/august/trunk/lib/OpenLayers/Control.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Control.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,7 +5,6 @@
/**
* @requires OpenLayers/BaseTypes/Class.js
- * @requires OpenLayers/Console.js
*/
/**
Modified: sandbox/august/trunk/lib/OpenLayers/Filter/Comparison.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Filter/Comparison.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Filter/Comparison.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,7 +5,6 @@
/**
* @requires OpenLayers/Filter.js
- * @requires OpenLayers/Console.js
*/
/**
@@ -179,10 +178,8 @@
*/
value2regex: function(wildCard, singleChar, escapeChar) {
if (wildCard == ".") {
- var msg = "'.' is an unsupported wildCard character for "+
- "OpenLayers.Filter.Comparison";
- OpenLayers.Console.error(msg);
- return null;
+ throw new Error("'.' is an unsupported wildCard character for " +
+ "OpenLayers.Filter.Comparison");
}
Modified: sandbox/august/trunk/lib/OpenLayers/Filter/Spatial.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Filter/Spatial.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Filter/Spatial.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,8 +5,6 @@
/**
* @requires OpenLayers/Filter.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -96,9 +94,7 @@
}
break;
default:
- OpenLayers.Console.error(
- OpenLayers.i18n("filterEvaluateNotImplemented"));
- break;
+ throw new Error('evaluate is not implemented for this filter type.');
}
return intersect;
},
Modified: sandbox/august/trunk/lib/OpenLayers/Format/ArcXML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/ArcXML.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/ArcXML.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -885,7 +885,7 @@
coordArr = coordArr.split(/;/);
for (var cn = 0; cn < coordArr.length; cn++) {
var coordItems = coordArr[cn].split(/ /);
- ringPoints.push(new OpenLayers.Geometry.Point(parseFloat(coordItems[0]), parseFloat(coordItems[1])));
+ ringPoints.push(new OpenLayers.Geometry.Point(coordItems[0], coordItems[1]));
}
coords = null;
} else {
Modified: sandbox/august/trunk/lib/OpenLayers/Format/Atom.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/Atom.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/Atom.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -607,12 +607,7 @@
point[i].firstChild.nodeValue
).split(/\s*,\s*/);
}
- components.push(
- new OpenLayers.Geometry.Point(
- parseFloat(xy[1]),
- parseFloat(xy[0])
- )
- );
+ components.push(new OpenLayers.Geometry.Point(xy[1], xy[0]));
}
}
@@ -627,10 +622,7 @@
).split(/\s+/);
points = [];
for (var j=0, jj=coords.length; j<jj; j+=2) {
- p = new OpenLayers.Geometry.Point(
- parseFloat(coords[j+1]),
- parseFloat(coords[j])
- );
+ p = new OpenLayers.Geometry.Point(coords[j+1], coords[j]);
points.push(p);
}
components.push(
@@ -650,10 +642,7 @@
).split(/\s+/);
points = [];
for (var j=0, jj=coords.length; j<jj; j+=2) {
- p = new OpenLayers.Geometry.Point(
- parseFloat(coords[j+1]),
- parseFloat(coords[j])
- );
+ p = new OpenLayers.Geometry.Point(coords[j+1], coords[j]);
points.push(p);
}
components.push(
Modified: sandbox/august/trunk/lib/OpenLayers/Format/Context.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/Context.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/Context.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -267,7 +267,7 @@
keywords: context.keywords,
logo: context.logo,
descriptionURL: context.descriptionURL
- }
+ };
options.metadata = metadata;
Modified: sandbox/august/trunk/lib/OpenLayers/Format/Filter/v1.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/Filter/v1.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/Filter/v1.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -297,7 +297,7 @@
"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 @@
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
childFilter = filter.filters[i];
if (childFilter.type === "FID") {
- this.writeFeatureIdNodes(childFilter, node);
+ OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
} else {
this.writeNode(
this.getFilterType(childFilter), childFilter, node
@@ -329,7 +329,7 @@
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
childFilter = filter.filters[i];
if (childFilter.type === "FID") {
- this.writeFeatureIdNodes(childFilter, node);
+ OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
} else {
this.writeNode(
this.getFilterType(childFilter), childFilter, node
@@ -342,7 +342,7 @@
var node = this.createElementNSPlus("ogc:Not");
var childFilter = filter.filters[0];
if (childFilter.type === "FID") {
- this.writeFeatureIdNodes(childFilter, node);
+ OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
} else {
this.writeNode(
this.getFilterType(childFilter), childFilter, node
Modified: sandbox/august/trunk/lib/OpenLayers/Format/GML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/GML.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/GML.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -12,8 +12,6 @@
* @requires OpenLayers/Geometry/MultiLineString.js
* @requires OpenLayers/Geometry/Polygon.js
* @requires OpenLayers/Geometry/MultiPolygon.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -159,8 +157,7 @@
this.internalProjection);
}
} else {
- OpenLayers.Console.error(OpenLayers.i18n(
- "unsupportedGeometryType", {'geomType':type}));
+ throw new TypeError("Unsupported geometry type: " + type);
}
// stop looking for different geometry types
break;
Modified: sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -126,16 +126,14 @@
parseFloat(lon[0].firstChild.nodeValue)];
}
- var geometry = new OpenLayers.Geometry.Point(parseFloat(location[1]),
- parseFloat(location[0]));
+ var geometry = new OpenLayers.Geometry.Point(location[1], location[0]);
} else if (line.length > 0) {
var coords = OpenLayers.String.trim(this.concatChildValues(line[0])).split(/\s+/);
var components = [];
var point;
for (var i=0, len=coords.length; i<len; i+=2) {
- point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),
- parseFloat(coords[i]));
+ point = new OpenLayers.Geometry.Point(coords[i+1], coords[i]);
components.push(point);
}
geometry = new OpenLayers.Geometry.LineString(components);
@@ -144,8 +142,7 @@
var components = [];
var point;
for (var i=0, len=coords.length; i<len; i+=2) {
- point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]),
- parseFloat(coords[i]));
+ point = new OpenLayers.Geometry.Point(coords[i+1], coords[i]);
components.push(point);
}
geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);
@@ -160,20 +157,15 @@
var components = [];
var point;
if (coords.length > 3) {
- point = new OpenLayers.Geometry.Point(parseFloat(coords[1]),
- parseFloat(coords[0]));
+ point = new OpenLayers.Geometry.Point(coords[1], coords[0]);
components.push(point);
- point = new OpenLayers.Geometry.Point(parseFloat(coords[1]),
- parseFloat(coords[2]));
+ point = new OpenLayers.Geometry.Point(coords[1], coords[2]);
components.push(point);
- point = new OpenLayers.Geometry.Point(parseFloat(coords[3]),
- parseFloat(coords[2]));
+ point = new OpenLayers.Geometry.Point(coords[3], coords[2]);
components.push(point);
- point = new OpenLayers.Geometry.Point(parseFloat(coords[3]),
- parseFloat(coords[0]));
+ point = new OpenLayers.Geometry.Point(coords[3], coords[0]);
components.push(point);
- point = new OpenLayers.Geometry.Point(parseFloat(coords[1]),
- parseFloat(coords[0]));
+ point = new OpenLayers.Geometry.Point(coords[1], coords[0]);
components.push(point);
}
geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);
Modified: sandbox/august/trunk/lib/OpenLayers/Format/KML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/KML.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/KML.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -12,8 +12,6 @@
* @requires OpenLayers/Geometry/Polygon.js
* @requires OpenLayers/Geometry/Collection.js
* @requires OpenLayers/Request/XMLHttpRequest.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
* @requires OpenLayers/Projection.js
*/
@@ -693,11 +691,15 @@
}
this.readChildNodes(node, obj);
if (obj.whens.length !== obj.points.length) {
- throw new Error("gx:Track with unequal number of when (" + obj.whens.length + ") and gx:coord (" + obj.points.length + ") elements.");
+ throw new Error("gx:Track with unequal number of when (" +
+ obj.whens.length + ") and gx:coord (" +
+ obj.points.length + ") elements.");
}
var hasAngles = obj.angles.length > 0;
if (hasAngles && obj.whens.length !== obj.angles.length) {
- throw new Error("gx:Track with unequal number of when (" + obj.whens.length + ") and gx:angles (" + obj.angles.length + ") elements.");
+ throw new Error("gx:Track with unequal number of when (" +
+ obj.whens.length + ") and gx:angles (" +
+ obj.angles.length + ") elements.");
}
var feature, point, angles;
for (var i=0, ii=obj.whens.length; i<ii; ++i) {
@@ -778,8 +780,7 @@
this.internalProjection);
}
} else {
- OpenLayers.Console.error(OpenLayers.i18n(
- "unsupportedGeometryType", {'geomType':type}));
+ throw new TypeError("Unsupported geometry type: " + type);
}
// stop looking for different geometry types
break;
Modified: sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -429,11 +429,11 @@
setFilterProperty: function(filter) {
if(filter.filters) {
for(var i=0, len=filter.filters.length; i<len; ++i) {
- this.setFilterProperty(filter.filters[i]);
+ OpenLayers.Format.WFST.v1.prototype.setFilterProperty.call(this, filter.filters[i]);
}
} else {
- if(filter instanceof OpenLayers.Filter.Spatial) {
- // got a spatial filter, set its property
+ if(filter instanceof OpenLayers.Filter.Spatial && !filter.property) {
+ // got a spatial filter without property, so set it
filter.property = this.geometryName;
}
}
Modified: sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1_1_0.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1_1_0.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1_1_0.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -169,7 +169,7 @@
}
}
if(options.filter) {
- this.setFilterProperty(options.filter);
+ OpenLayers.Format.WFST.v1_1_0.prototype.setFilterProperty.call(this, options.filter);
this.writeNode("ogc:Filter", options.filter, node);
}
return node;
Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMC/v1.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMC/v1.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMC/v1.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -147,10 +147,8 @@
read_wmc_BoundingBox: function(context, node) {
context.projection = node.getAttribute("SRS");
context.bounds = new OpenLayers.Bounds(
- parseFloat(node.getAttribute("minx")),
- parseFloat(node.getAttribute("miny")),
- parseFloat(node.getAttribute("maxx")),
- parseFloat(node.getAttribute("maxy"))
+ node.getAttribute("minx"), node.getAttribute("miny"),
+ node.getAttribute("maxx"), node.getAttribute("maxy")
);
},
Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities/v1.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities/v1.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities/v1.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -112,6 +112,9 @@
if (layer.formats === undefined) {
layer.formats = capability.request.getmap.formats;
}
+ if (layer.infoFormats === undefined && capability.request.getfeatureinfo) {
+ layer.infoFormats = capability.request.getfeatureinfo.formats;
+ }
var i, len;
Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -112,6 +112,7 @@
var layer = {
styles: [],
formats: [],
+ dimensions: [],
tileMatrixSetLinks: []
};
layer.layers = [];
@@ -221,7 +222,23 @@
obj.serviceMetadataUrl = {};
obj.serviceMetadataUrl.href = node.getAttribute("xlink:href");
// TODO: other attributes of <ServiceMetadataURL> 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"]
},
Modified: sandbox/august/trunk/lib/OpenLayers/Format/WPSExecute.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WPSExecute.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WPSExecute.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -242,6 +242,7 @@
},
"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
},
Modified: sandbox/august/trunk/lib/OpenLayers/Format.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Format.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -6,8 +6,6 @@
/**
* @requires OpenLayers/BaseTypes/Class.js
* @requires OpenLayers/Util.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -104,7 +102,7 @@
* Depends on the subclass
*/
read: function(data) {
- OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"));
+ throw new Error('Read not implemented.');
},
/**
@@ -118,7 +116,7 @@
* {String} A string representation of the object.
*/
write: function(object) {
- OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"));
+ throw new Error('Write not implemented.');
},
CLASS_NAME: "OpenLayers.Format"
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/ar.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/ar.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/ar.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -19,12 +19,6 @@
'Base Layer': "الطبقة الاساسية",
- 'readNotImplemented': "القراءة غير محققة.",
-
- 'writeNotImplemented': "الكتابة غير محققة",
-
- 'errorLoadingGML': "خطأ عند تحميل الملف جي ام ال ${url}",
-
'Scale = 1 : ${scaleDenom}': "النسبة = 1 : ${scaleDenom}",
'W': "غ",
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/be-tarask.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/be-tarask.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/be-tarask.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -23,20 +23,10 @@
'Base Layer': "Базавы слой",
- 'readNotImplemented': "Функцыянальнасьць чытаньня ня створаная.",
-
- 'writeNotImplemented': "Функцыянальнасьць запісу ня створаная.",
-
'noFID': "Немагчыма абнавіць магчымасьць, для якога не існуе FID.",
- 'errorLoadingGML': "Памылка загрузкі файла GML ${url}",
-
'browserNotSupported': "Ваш браўзэр не падтрымлівае вэктарную графіку. У цяперашні момант падтрымліваюцца: ${renderers}",
- 'componentShouldBe': "addFeatures : кампанэнт павінен быць ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent выкліканы для слоя бяз рэндэру. Звычайна гэта азначае, што Вы зьнішчылі слой, але пакінулі зьвязаны зь ім апрацоўшчык.",
-
'minZoomLevelError': "Уласьцівасьць minZoomLevel прызначана толькі для выкарыстаньня са слаямі вытворнымі ад FixedZoomLevels. Тое, што гэты wfs-слой правяраецца на minZoomLevel — рэха прошлага. Але мы ня можам выдаліць гэтую магчымасьць, таму што ад яе залежаць некаторыя заснаваныя на OL дастасаваньні. Тым ня менш, праверка minZoomLevel будзе выдаленая ў вэрсіі 3.0. Калі ласка, выкарыстоўваеце замест яе ўстаноўкі мінімальнага/максымальнага памераў, як апісана тут: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-транзакцыя: ПОСЬПЕХ ${response}",
@@ -57,20 +47,8 @@
'S': "Пд",
- 'layerAlreadyAdded': "Вы паспрабавалі дадаць слой ${layerName} на мапу, але ён ужо дададзены",
-
'reprojectDeprecated': "Вы выкарыстоўваеце ўстаноўку \'reproject\' для слоя ${layerName}. Гэтая ўстаноўка зьяўляецца састарэлай: яна выкарыстоўвалася для падтрымкі паказу зьвестак на камэрцыйных базавых мапах, але гэта функцыя цяпер рэалізаваная ў убудаванай падтрымцы сфэрычнай праекцыі Мэркатара. Дадатковая інфармацыя ёсьць на http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Гэты мэтад састарэлы і будзе выдалены ў вэрсіі 3.0. Калі ласка, замест яго выкарыстоўвайце ${newMethod}.",
+ 'methodDeprecated': "Гэты мэтад састарэлы і будзе выдалены ў вэрсіі 3.0. Калі ласка, замест яго выкарыстоўвайце ${newMethod}."
- 'boundsAddError': "Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",
-
- 'lonlatAddError': "Вам неабходна падаць абодва значэньні lon і lat для функцыі складаньня.",
-
- 'pixelAddError': "Вам неабходна падаць абодва значэньні x і y для функцыі складаньня.",
-
- 'unsupportedGeometryType': "Тып геамэтрыі не падтрымліваецца: ${geomType}",
-
- 'filterEvaluateNotImplemented': "evaluate не рэалізаваны для гэтага тыпу фільтру."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/bg.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/bg.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/bg.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,12 +18,8 @@
'Base Layer': "Основен слой",
- 'errorLoadingGML': "Грешка при зареждане на GML файл ${url}",
-
'Scale = 1 : ${scaleDenom}': "Мащаб = 1 : ${scaleDenom}",
- 'layerAlreadyAdded': "Опитахте да добавите слой ${layerName} в картата, но той вече е добавен",
-
'methodDeprecated': "Този метод е остарял и ще бъде премахват в 3.0. Вместо него използвайте ${newMethod}."
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/br.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/br.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/br.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Gwiskad diazez",
- 'readNotImplemented': "N\'eo ket emplementet al lenn.",
-
- 'writeNotImplemented': "N\'eo ket emplementet ar skrivañ.",
-
'noFID': "N\'haller ket hizivaat un elfenn ma n\'eus ket a niverenn-anaout (FID) eviti.",
- 'errorLoadingGML': "Fazi e-ser kargañ ar restr GML ${url}",
-
'browserNotSupported': "N\'eo ket skoret an daskor vektorel gant ho merdeer. Setu aze an daskorerioù skoret evit ar poent :\n${renderers}",
- 'componentShouldBe': "addFeatures : bez\' e tlefe ar parzh besañ eus ar seurt ${geomType}",
-
- 'getFeatureError': "Galvet eo bet getFeatureFromEvent called war ur gwiskad hep daskorer. Kement-se a dalvez ez eus bet freuzet ur gwiskad hag hoc\'h eus miret un embreger bennak stag outañ.",
-
'minZoomLevelError': "Ne zleer implijout ar perzh minZoomLevel nemet evit gwiskadoù FixedZoomLevels-descendent. Ar fed ma wiria ar gwiskad WHS-se hag-eñ ez eus eus minZoomLevel zo un aspadenn gozh. Koulskoude n\'omp ket evit e ziverkañ kuit da derriñ arloadoù diazezet war OL a c\'hallfe bezañ stag outañ. Setu perak eo dispredet -- Lamet kuit e vo ar gwiriañ minZoomLevel a-is er stumm 3.0. Ober gant an arventennoù bihanañ/brasañ evel deskrivet amañ e plas : http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Treuzgread WFS : MAT EO ${response}",
@@ -56,20 +46,8 @@
'S': "S",
- 'layerAlreadyAdded': "Klasket hoc\'h eus ouzhpennañ ar gwiskad : ${layerName} d\'ar gartenn, met ouzhpennet e oa bet c\'hoazh",
-
'reprojectDeprecated': "Emaoc\'h oc\'h implijout an dibarzh \'reproject\' war ar gwiskad ${layerName}. Dispredet eo an dibarzh-mañ : bet eo hag e talveze da ziskwel roadennoù war-c\'horre kartennoù diazez kenwerzhel, un dra hag a c\'haller ober bremañ gant an arc\'hwel dre skor banndres boullek Mercator. Muioc\'h a ditouroù a c\'haller da gaout war http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Dispredet eo an daore-se ha tennet e vo kuit eus ar stumm 3.0. Grit gant ${newMethod} e plas.",
+ 'methodDeprecated': "Dispredet eo an daore-se ha tennet e vo kuit eus ar stumm 3.0. Grit gant ${newMethod} e plas."
- 'boundsAddError': "Rekis eo tremen an div dalvoudenn x ha y d\'an arc\'hwel add.",
-
- 'lonlatAddError': "Rekis eo tremen an div dalvoudenn hedred ha ledred d\'an arc\'hwel add.",
-
- 'pixelAddError': "Rekis eo tremen an div dalvoudenn x ha y d\'an arc\'hwel add.",
-
- 'unsupportedGeometryType': "Seurt mentoniezh anskoret : ${geomType}",
-
- 'filterEvaluateNotImplemented': "N\'eo ket bet emplementet ar priziañ evit seurt siloù c\'hoazh."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/ca.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/ca.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/ca.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,25 +18,12 @@
'Base Layer': "Capa Base",
- 'readNotImplemented': "Lectura no implementada.",
-
- 'writeNotImplemented': "Escriptura no implementada.",
-
'noFID': "No es pot actualitzar un element per al que no existeix FID.",
- 'errorLoadingGML': "Error carregant el fitxer GML ${url}",
-
'browserNotSupported':
"El seu navegador no suporta renderització vectorial. Els renderitzadors suportats actualment són:\n${renderers}",
- 'componentShouldBe': "addFeatures : el component ha de ser de tipus ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent ha estat cridat des d'una capa sense renderizador. Això normalment vol dir que " +
- "s'ha eliminat una capa, però no el handler associat a ella.",
-
- // console message
'minZoomLevelError':
"La propietat minZoomLevel s'ha d'utilitzar només " +
"amb les capes que tenen FixedZoomLevels. El fet que " +
@@ -83,10 +70,6 @@
'Graticule': 'Retícula',
// console message
- 'layerAlreadyAdded':
- "Heu intentat afegir la capa: ${layerName} al mapa, però ja ha estat afegida anteriorment",
-
- // console message
'reprojectDeprecated':
"Esteu fent servir l'opció 'reproject' a la capa " +
"${layerName}. Aquesta opció és obsoleta: el seu ús fou concebut " +
@@ -100,21 +83,6 @@
"Aquest mètode és obsolet i s'eliminarà a la versió 3.0. " +
"Si us plau feu servir em mètode alternatiu ${newMethod}.",
- // console message
- 'boundsAddError': "Ha de proporcionar els valors x i y a la funció add.",
-
- // console message
- 'lonlatAddError': "Ha de proporcionar els valors lon i lat a la funció add.",
-
- // console message
- 'pixelAddError': "Ha de proporcionar els valors x i y a la funció add.",
-
- // console message
- 'unsupportedGeometryType': "Tipus de geometria no suportada: ${geomType}",
-
- // console message
- 'filterEvaluateNotImplemented': "evaluate no està implementat per aquest tipus de filtre.",
-
// **** end ****
'end': ''
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/cs-CZ.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/cs-CZ.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/cs-CZ.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Podkladové vrstvy",
- 'readNotImplemented': "Read není implementováno.",
-
- 'writeNotImplemented': "Write není implementováno.",
-
'noFID': "Nelze aktualizovat prvek, pro který neexistuje FID.",
- 'errorLoadingGML': "Chyba při načítání souboru GML ${url}",
-
'browserNotSupported': "Váš prohlížeč nepodporuje vykreslování vektorů. Momentálně podporované nástroje jsou::\n${renderers}",
- 'componentShouldBe': "addFeatures : komponenta by měla být ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent bylo zavoláno na vrstvě, která nemá vykreslovač. To obyčejně znamená, že jste odstranil vrstvu, ale ne rutinu s ní asociovanou.",
-
'minZoomLevelError': "Vlastnost minZoomLevel by se měla používat pouze s potomky FixedZoomLevels vrstvami. To znamená, že vrstva wfs kontroluje, zda-li minZoomLevel není zbytek z minulosti.Nelze to ovšem vyjmout bez možnosti, že bychom rozbili aplikace postavené na OL, které by na tom mohly záviset. Proto tuto vlastnost nedoporučujeme používat -- kontrola minZoomLevel bude odstraněna ve verzi 3.0. Použijte prosím raději nastavení min/max podle příkaldu popsaného na: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS Transaction: ÚSPĚCH ${response}",
@@ -48,18 +38,8 @@
'Scale = 1 : ${scaleDenom}': "Měřítko = 1 : ${scaleDenom}",
- 'layerAlreadyAdded': "Pokusili jste se přidat vrstvu: ${layerName} do mapy, ale tato vrstva je již v mapě přítomna.",
-
'reprojectDeprecated': "Použil jste volbu \'reproject\' ve vrstvě ${layerName}. Tato volba není doporučená: byla zde proto, aby bylo možno zobrazovat data z okomerčních serverů, ale tato funkce je nyní zajištěna pomocí podpory Spherical Mercator. Více informací naleznete na http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Tato metoda je zavržená a bude ve verzi 3.0 odstraněna. Prosím, použijte raději ${newMethod}.",
+ 'methodDeprecated': "Tato metoda je zavržená a bude ve verzi 3.0 odstraněna. Prosím, použijte raději ${newMethod}."
- 'boundsAddError': "Pro přídavnou funkci musíte zadat obě souřadnice x a y.",
-
- 'lonlatAddError': "Pro přídavnou funkci musíte zadat obě souřadnice lon a lat.",
-
- 'pixelAddError': "Pro přídavnou funkci musíte zadat obě souřadnice x a y.",
-
- 'unsupportedGeometryType': "Nepodporovaný typ geometrie: ${geomType}"
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/da-DK.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/da-DK.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/da-DK.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,25 +18,12 @@
'Base Layer': "Baggrundslag",
- 'readNotImplemented': "Læsning er ikke implementeret.",
-
- 'writeNotImplemented': "Skrivning er ikke implementeret.",
-
'noFID': "Kan ikke opdateret en feature (et objekt) der ikke har et FID.",
- 'errorLoadingGML': "Fejlede under indlæsning af GML fil ${url}",
-
'browserNotSupported':
"Din browser understøtter ikke vektor visning. Følgende vektor visninger understøttes:\n${renderers}",
- 'componentShouldBe': "addFeatures : komponenten skal være en ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent blev kaldt på et lag uden en visning. Dette betyder som regel at du " +
- "har destrueret et lag, men ikke de håndteringer der var tilknyttet.",
-
- // console message
'minZoomLevelError':
"Egenskaben minZoomLevel er kun beregnet til brug " +
"med FixedZoomLevels. At dette WFS lag kontrollerer " +
@@ -78,10 +65,6 @@
'Scale = 1 : ${scaleDenom}': "Målforhold = 1 : ${scaleDenom}",
// console message
- 'layerAlreadyAdded':
- "Du har forsøgt at tilføje laget: ${layerName} til kortet, men det er allerede tilføjet",
-
- // console message
'reprojectDeprecated':
"Du anvender indstillingen 'reproject' på laget ${layerName}." +
"Denne indstilling bør ikke længere anvendes. Den var beregnet " +
@@ -93,20 +76,5 @@
// console message
'methodDeprecated':
"Denne funktion bør ikke længere anvendes, og vil blive fjernet i version 3.0. " +
- "Anvend venligst funktionen ${newMethod} istedet.",
-
- // console message
- 'boundsAddError': "Du skal angive både x og y værdier i kaldet til add funktionen.",
-
- // console message
- 'lonlatAddError': "Du skal angive både lon og lat værdier i kaldet til add funktionen.",
-
- // console message
- 'pixelAddError': "Du skal angive både x og y værdier i kaldet til add funktionen.",
-
- // console message
- 'unsupportedGeometryType': "Geometri typen: ${geomType} er ikke understøttet.",
-
- // console message
- 'filterEvaluateNotImplemented': "evaluering er ikke implementeret for denne filter type."
+ "Anvend venligst funktionen ${newMethod} istedet."
};
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/de.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/de.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/de.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -24,20 +24,10 @@
'Base Layer': "Grundkarte",
- 'readNotImplemented': "Lesen nicht implementiert.",
-
- 'writeNotImplemented': "Schreiben nicht implementiert.",
-
'noFID': "Ein Feature, für das keine FID existiert, kann nicht aktualisiert werden.",
- 'errorLoadingGML': "Fehler beim Laden der GML-Datei ${url}",
-
'browserNotSupported': "Ihr Browser unterstützt keine Vektordarstellung. Aktuell unterstützte Renderer:\n${renderers}",
- 'componentShouldBe': "addFeatures: Komponente muss vom Typ ${geomType} sein",
-
- 'getFeatureError': "getFeatureFromEvent wurde vom einem Layer ohne Renderer aufgerufen. Dies bedeutet normalerweise, dass ein Layer entfernt wurde, aber nicht Handler, die auf ihn verweisen.",
-
'minZoomLevelError': "Die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Eigenschaft ist nur für die Verwendung mit \x3ccode\x3eFixedZoomLevels\x3c/code\x3e-untergeordneten Layers vorgesehen. Das dieser \x3ctt\x3ewfs\x3c/tt\x3e-Layer die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Eigenschaft überprüft ist ein Relikt der Vergangenheit. Wir können diese Überprüfung nicht entfernen, ohne das OL basierende Applikationen nicht mehr funktionieren. Daher markieren wir es als veraltet - die \x3ccode\x3eminZoomLevel\x3c/code\x3e-Überprüfung wird in Version 3.0 entfernt werden. Bitte verwenden Sie stattdessen die Min-/Max-Lösung, wie sie unter http://trac.openlayers.org/wiki/SettingZoomLevels beschrieben ist.",
'commitSuccess': "WFS-Transaktion: Erfolgreich ${response}",
@@ -58,20 +48,8 @@
'S': "S",
- 'layerAlreadyAdded': "Sie versuchen den Layer „${layerName}“ zur Karte hinzuzufügen, er wurde aber bereits hinzugefügt",
-
'reprojectDeprecated': "Sie verwenden die „Reproject“-Option des Layers ${layerName}. Diese Option ist veraltet: Sie wurde entwickelt um die Anzeige von Daten auf kommerziellen Basiskarten zu unterstützen, aber diese Funktion sollte jetzt durch Unterstützung der „Spherical Mercator“ erreicht werden. Weitere Informationen sind unter http://trac.openlayers.org/wiki/SphericalMercator verfügbar.",
- 'methodDeprecated': "Die Methode ist veraltet und wird in 3.0 entfernt. Bitte verwende stattdessen ${newMethod}.",
+ 'methodDeprecated': "Die Methode ist veraltet und wird in 3.0 entfernt. Bitte verwende stattdessen ${newMethod}."
- 'boundsAddError': "Beide Werte (x und y) müssen der add-Funktion übergeben werden.",
-
- 'lonlatAddError': "Beide Werte (lon und lat) müssen der add-Funktion übergeben werden.",
-
- 'pixelAddError': "Beide Werte (x und y) müssen der add-Funktion übergeben werden.",
-
- 'unsupportedGeometryType': "Nicht unterstützter Geometrie-Typ: ${geomType}",
-
- 'filterEvaluateNotImplemented': "„evaluate“ ist für diesen Filter-Typ nicht implementiert."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/en.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/en.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/en.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,25 +18,12 @@
'Base Layer': "Base Layer",
- 'readNotImplemented': "Read not implemented.",
-
- 'writeNotImplemented': "Write not implemented.",
-
'noFID': "Can't update a feature for which there is no FID.",
- 'errorLoadingGML': "Error in loading GML file ${url}",
-
'browserNotSupported':
"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",
- 'componentShouldBe': "addFeatures : component should be an ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent called on layer with no renderer. This usually means you " +
- "destroyed a layer, but not some handler which is associated with it.",
-
- // console message
'minZoomLevelError':
"The minZoomLevel property is only intended for use " +
"with the FixedZoomLevels-descendent layers. That this " +
@@ -83,10 +70,6 @@
'Graticule': 'Graticule',
// console message
- 'layerAlreadyAdded':
- "You tried to add the layer: ${layerName} to the map, but it has already been added",
-
- // console message
'reprojectDeprecated':
"You are using the 'reproject' option " +
"on the ${layerName} layer. This option is deprecated: " +
@@ -100,21 +83,6 @@
"This method has been deprecated and will be removed in 3.0. " +
"Please use ${newMethod} instead.",
- // console message
- 'boundsAddError': "You must pass both x and y values to the add function.",
-
- // console message
- 'lonlatAddError': "You must pass both lon and lat values to the add function.",
-
- // console message
- 'pixelAddError': "You must pass both x and y values to the add function.",
-
- // console message
- 'unsupportedGeometryType': "Unsupported geometry type: ${geomType}",
-
- // console message
- 'filterEvaluateNotImplemented': "evaluate is not implemented for this filter type.",
-
'proxyNeeded': "You probably need to set OpenLayers.ProxyHost to access ${url}."+
"See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost",
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/es.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/es.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/es.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,25 +18,12 @@
'Base Layer': "Capa Base",
- 'readNotImplemented': "Lectura no implementada.",
-
- 'writeNotImplemented': "Escritura no implementada.",
-
'noFID': "No se puede actualizar un elemento para el que no existe FID.",
- 'errorLoadingGML': "Error cargando el fichero GML ${url}",
-
'browserNotSupported':
"Su navegador no soporta renderización vectorial. Los renderizadores soportados actualmente son:\n${renderers}",
- 'componentShouldBe': "addFeatures : el componente debe ser del tipo ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent se ha llamado desde una capa sin renderizador. Esto normalmente quiere decir que " +
- "se ha destruido una capa, pero no el manejador asociado a ella.",
-
- // console message
'minZoomLevelError':
"La propiedad minZoomLevel debe sólo utilizarse " +
"con las capas que tienen FixedZoomLevels. El hecho de que " +
@@ -84,10 +71,6 @@
'Graticule': 'Retícula',
// console message
- 'layerAlreadyAdded':
- "Intentó añadir la capa: ${layerName} al mapa, pero ya había sido añadida previamente",
-
- // console message
'reprojectDeprecated':
"Está usando la opción 'reproject' en la capa " +
"${layerName}. Esta opción es obsoleta: su uso fue diseñado " +
@@ -101,21 +84,6 @@
"Este método es obsoleto y se eliminará en la versión 3.0. " +
"Por favor utilice el método ${newMethod} en su lugar.",
- // console message
- 'boundsAddError': "Debe proporcionar los valores x e y a la función add.",
-
- // console message
- 'lonlatAddError': "Debe proporcionar los valores lon y lat a la función add.",
-
- // console message
- 'pixelAddError': "Debe proporcionar los valores x e y a la función add.",
-
- // console message
- 'unsupportedGeometryType': "Tipo de geometría no soportada: ${geomType}",
-
- // console message
- 'filterEvaluateNotImplemented': "evaluate no está implementado para este tipo de filtro.",
-
// **** end ****
'end': ''
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/fr.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/fr.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/fr.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -23,20 +23,10 @@
'Base Layer': "Calque de base",
- 'readNotImplemented': "Lecture non implémentée.",
-
- 'writeNotImplemented': "Ecriture non implémentée.",
-
'noFID': "Impossible de mettre à jour un objet sans identifiant (fid).",
- 'errorLoadingGML': "Erreur au chargement du fichier GML ${url}",
-
'browserNotSupported': "Votre navigateur ne supporte pas le rendu vectoriel. Les renderers actuellement supportés sont : \n${renderers}",
- 'componentShouldBe': "addFeatures : le composant devrait être de type ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent a été appelé sur un calque sans renderer. Cela signifie généralement que vous avez détruit cette couche, mais que vous avez conservé un handler qui lui était associé.",
-
'minZoomLevelError': "La propriété minZoomLevel doit seulement être utilisée pour des couches FixedZoomLevels-descendent. Le fait que cette couche WFS vérifie la présence de minZoomLevel est une relique du passé. Nous ne pouvons toutefois la supprimer sans casser des applications qui pourraient en dépendre. C\'est pourquoi nous la déprécions -- la vérification du minZoomLevel sera supprimée en version 3.0. A la place, merci d\'utiliser les paramètres de résolutions min/max tel que décrit sur : http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Transaction WFS : SUCCES ${response}",
@@ -57,21 +47,9 @@
'S': "S",
- 'layerAlreadyAdded': "Vous avez essayé d\'ajouter à la carte le calque : ${layerName}, mais il est déjà présent",
-
'reprojectDeprecated': "Vous utilisez l\'option \'reproject\' sur la couche ${layerName}. Cette option est dépréciée : Son usage permettait d\'afficher des données au dessus de couches raster commerciales.Cette fonctionalité est maintenant supportée en utilisant le support de la projection Mercator Sphérique. Plus d\'information est disponible sur http://trac.openlayers.org/wiki/SphericalMercator.",
'methodDeprecated': "Cette méthode est dépréciée, et sera supprimée à la version 3.0. Merci d\'utiliser ${newMethod} à la place.",
- 'boundsAddError': "Vous devez passer les deux valeurs x et y à la fonction add.",
-
- 'lonlatAddError': "Vous devez passer les deux valeurs lon et lat à la fonction add.",
-
- 'pixelAddError': "Vous devez passer les deux valeurs x et y à la fonction add.",
-
- 'unsupportedGeometryType': "Type de géométrie non supporté : ${geomType}",
-
- 'filterEvaluateNotImplemented': "évaluer n\'a pas encore été implémenté pour ce type de filtre.",
-
'proxyNeeded': "Vous avez très probablement besoin de renseigner OpenLayers.ProxyHost pour accéder à ${url}. Voir http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost"
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/gl.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/gl.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/gl.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Capa base",
- 'readNotImplemented': "Lectura non implementada.",
-
- 'writeNotImplemented': "Escritura non implementada.",
-
'noFID': "Non se pode actualizar a funcionalidade para a que non hai FID.",
- 'errorLoadingGML': "Erro ao cargar o ficheiro GML ${url}",
-
'browserNotSupported': "O seu navegador non soporta a renderización de vectores. Os renderizadores soportados actualmente son:\n${renderers}",
- 'componentShouldBe': "addFeatures: o compoñente debera ser de tipo ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent ten sido chamado a unha capa sen renderizador. Isto normalmente significa que destruíu unha capa, mais non o executador que está asociado con ela.",
-
'minZoomLevelError': "A propiedade minZoomLevel é só para uso conxuntamente coas capas FixedZoomLevels-descendent. O feito de que esa capa wfs verifique o minZoomLevel é unha reliquia do pasado. Non podemos, con todo, eliminala sen a posibilidade de non romper as aplicacións baseadas en OL que poidan depender dela. Por iso a estamos deixando obsoleta (a comprobación minZoomLevel de embaixo será eliminada na versión 3.0). Por favor, no canto diso use o axuste de resolución mín/máx tal e como está descrito aquí: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Transacción WFS: ÉXITO ${response}",
@@ -56,20 +46,8 @@
'S': "S",
- 'layerAlreadyAdded': "Intentou engadir a capa: ${layerName} ao mapa, pero xa fora engadida",
-
'reprojectDeprecated': "Está usando a opción \"reproject\" na capa ${layerName}. Esta opción está obsoleta: o seu uso foi deseñado para a visualización de datos sobre mapas base comerciais, pero esta funcionalidade debera agora ser obtida utilizando a proxección Spherical Mercator. Hai dispoñible máis información en http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Este método está obsoleto e será eliminado na versión 3.0. Por favor, no canto deste use ${newMethod}.",
+ 'methodDeprecated': "Este método está obsoleto e será eliminado na versión 3.0. Por favor, no canto deste use ${newMethod}."
- 'boundsAddError': "Debe achegar os valores x e y á función add.",
-
- 'lonlatAddError': "Debe achegar tanto o valor lon coma o lat á función add.",
-
- 'pixelAddError': "Debe achegar os valores x e y á función add.",
-
- 'unsupportedGeometryType': "Tipo xeométrico non soportado: ${geomType}",
-
- 'filterEvaluateNotImplemented': "avaliar non está implementado para este tipo de filtro."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/gsw.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/gsw.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/gsw.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Grundcharte",
- 'readNotImplemented': "Läse nit implementiert.",
-
- 'writeNotImplemented': "Schrybe nit implementiert.",
-
'noFID': "E Feature, wu s kei FID derfir git, cha nit aktualisiert wäre.",
- 'errorLoadingGML': "Fähler bim Lade vu dr GML-Datei ${url}",
-
'browserNotSupported': "Dyy Browser unterstitzt kei Vektordarstellig. Aktuäll unterstitzti Renderer:\n${renderers}",
- 'componentShouldBe': "addFeatures : Komponänt sott dr Typ ${geomType} syy",
-
- 'getFeatureError': "getFeatureFromEvent isch uf eme Layer ohni Renderer ufgruefe wore. Des heisst normalerwys, ass Du e Layer kaputt gmacht hesch, aber nit dr Handler, wu derzue ghert.",
-
'minZoomLevelError': "D minZoomLevel-Eigeschaft isch nume dänk fir d Layer, wu vu dr FixedZoomLevels abstamme. Ass dää wfs-Layer minZoomLevel prieft, scih e Relikt us dr Vergangeheit. Mir chenne s aber nit ändere ohni OL_basierti Aawändige villicht kaputt gehn, wu dervu abhänge. Us däm Grund het die Funktion d Eigeschaft \'deprecated\' iberchuu. D minZoomLevel-Priefig unte wird in dr Version 3.0 usegnuu. Bitte verwänd statt däm e min/max-Uflesig wie s do bschriben isch: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-Transaktion: ERFOLGRYCH ${response}",
@@ -56,20 +46,8 @@
'S': "S",
- 'layerAlreadyAdded': "Du hesch versuecht dää Layer in d Charte yyzfiege: ${layerName}, aber är isch schoi yygfiegt",
-
'reprojectDeprecated': "Du bruchsch d \'reproject\'-Option bim ${layerName}-Layer. Die Option isch nimi giltig: si isch aagleit wore go Date iber kommerziälli Grundcharte lege, aber des sott mer jetz mache mit dr Unterstitzig vu Spherical Mercator. Meh Informatione git s uf http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Die Methode isch veraltet un wird us dr Version 3.0 usegnuu. Bitte verwäbnd statt däm ${newMethod}.",
+ 'methodDeprecated': "Die Methode isch veraltet un wird us dr Version 3.0 usegnuu. Bitte verwäbnd statt däm ${newMethod}."
- 'boundsAddError': "Du muesch e x-Wärt un e y-Wärt yygee bi dr Zuefieg-Funktion",
-
- 'lonlatAddError': "Du meusch e Lengi- un e Breiti-Grad yygee bi dr Zuefieg-Funktion.",
-
- 'pixelAddError': "Du muesch x- un y-Wärt aagee bi dr Zuefieg-Funktion.",
-
- 'unsupportedGeometryType': "Nit unterstitze Geometrii-Typ: ${geomType}",
-
- 'filterEvaluateNotImplemented': "evaluiere isch nit implemäntiert in däm Filtertyp."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/hr.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/hr.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/hr.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,36 +22,16 @@
'Base Layer': "Osnovna karta",
- 'readNotImplemented': "Čitanje nije implementirano.",
-
- 'writeNotImplemented': "Pisanje nije implementirano.",
-
'noFID': "Ne mogu ažurirati značajku za koju ne postoji FID.",
- 'errorLoadingGML': "Greška u učitavanju GML datoteke ${url}",
-
'browserNotSupported': "Vaš preglednik ne podržava vektorsko renderiranje. Trenutno podržani rendereri su: ${renderers}",
- 'componentShouldBe': "addFeatures : komponenta bi trebala biti ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent je pozvao Layer bez renderera. Ovo obično znači da ste uništiili Layer, a ne neki Handler koji je povezan s njim.",
-
'commitSuccess': "WFS Transakcija: USPJEŠNA ${response}",
'commitFailed': "WFS Transakcija: NEUSPJEŠNA ${response}",
'Scale = 1 : ${scaleDenom}': "Mjerilo = 1 : ${scaleDenom}",
- 'layerAlreadyAdded': "Pokušali ste dodati layer: ${layerName} na kartu, ali je već dodan",
+ 'methodDeprecated': "Ova metoda nije odobrena i biti će maknuta u 3.0. Koristite ${newMethod}."
- 'methodDeprecated': "Ova metoda nije odobrena i biti će maknuta u 3.0. Koristite ${newMethod}.",
-
- 'boundsAddError': "Morate dati obje vrijednosti , x i y da bi dodali funkciju.",
-
- 'lonlatAddError': "Morate dati obje vrijednosti , (lon i lat) da bi dodali funkciju.",
-
- 'pixelAddError': "Morate dati obje vrijednosti , x i y da bi dodali funkciju.",
-
- 'unsupportedGeometryType': "Nepodržani tip geometrije: ${geomType}"
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/hsb.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/hsb.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/hsb.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Zakładna runina",
- 'readNotImplemented': "Čitanje njeimplementowane.",
-
- 'writeNotImplemented': "Pisanje njeimplementowane.",
-
'noFID': "Funkcija, za kotruž FID njeje, njeda so aktualizować.",
- 'errorLoadingGML': "Zmylk při začitowanju dataje ${url}",
-
'browserNotSupported': "Twój wobhladowak wektorowe rysowanje njepodpěruje. Tuchwilu podpěrowane rysowaki su:\n${renderers}",
- 'componentShouldBe': "addFeatures: komponenta měła ${geomType} być",
-
- 'getFeatureError': "getFeatureFromEvent bu na woršće bjez rysowak zawołany. To zwjetša woznamjenja, zo sy worštu zničił, ale nic wobdźěłak, kotryž je z njej zwjazany.",
-
'minZoomLevelError': "Kajkosć minZoomLevel je jenož za wužiwanje z worštami myslena, kotrež wot FixedZoomLevels pochadźeja. Zo tuta woršta wfs za minZoomLevel přepruwuje, je relikt zańdźenosće. Njemóžemy wšak ju wotstronić, bjeztoho zo aplikacije, kotrež na OpenLayers bazěruja a snano tutu kajkosć wužiwaja, hižo njefunguja. Tohodla smy ju jako zestarjenu woznamjenili -- přepruwowanje za minZoomLevel budu so we wersiji 3.0 wotstronjeć. Prošu wužij město toho nastajenje min/max, kaž je tu wopisane: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-Transakcija: WUSPĚŠNA ${response}",
@@ -56,20 +46,8 @@
'S': "J",
- 'layerAlreadyAdded': "Sy spytał runinu ${layerName} karće dodać, ale je so hižo dodała",
-
'reprojectDeprecated': "Wužiwaš opciju \"reproject\" wořšty ${layerName}. Tuta opcija je zestarjena: jeje wužiwanje bě myslene, zo by zwobraznjenje datow nad komercielnymi bazowymi kartami podpěrało, ale funkcionalnosć měła so nětko z pomocu Sperical Mercator docpěć. Dalše informacije steja na http://trac.openlayers.org/wiki/SphericalMercator k dispoziciji.",
- 'methodDeprecated': "Tuta metoda je so njeschwaliła a budźe so w 3.0 wotstronjeć. Prošu wužij ${newMethod} město toho.",
+ 'methodDeprecated': "Tuta metoda je so njeschwaliła a budźe so w 3.0 wotstronjeć. Prošu wužij ${newMethod} město toho."
- 'boundsAddError': "Dyrbiš hódnotu x kaž tež y funkciji \"add\" přepodać.",
-
- 'lonlatAddError': "Dyrbiš hódnotu lon kaž tež lat funkciji \"add\" přepodać.",
-
- 'pixelAddError': "Dyrbiš hódnotu x kaž tež y funkciji \"add\" přepodać.",
-
- 'unsupportedGeometryType': "Njepodpěrowany geometrijowy typ: ${geomType}",
-
- 'filterEvaluateNotImplemented': "wuhódnoćenje njeje za tutón filtrowy typ implementowany."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/hu.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/hu.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/hu.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -23,20 +23,10 @@
'Base Layer': "Alapréteg",
- 'readNotImplemented': "Olvasás nincs végrehajtva.",
-
- 'writeNotImplemented': "Írás nincs végrehajtva.",
-
'noFID': "Nem frissíthető olyan jellemző, amely nem rendelkezik FID-del.",
- 'errorLoadingGML': "Hiba GML-fájl betöltésekor ${url}",
-
'browserNotSupported': "A böngészője nem támogatja a vektoros renderelést. A jelenleg támogatott renderelők:\n${renderers}",
- 'componentShouldBe': "addFeatures : az összetevőnek ilyen típusúnak kell lennie: ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent réteget hívott meg renderelő nélkül. Ez rendszerint azt jelenti, hogy megsemmisített egy fóliát, de néhány ahhoz társított kezelőt nem.",
-
'minZoomLevelError': "A minZoomLevel tulajdonságot csak a következővel való használatra szánták: FixedZoomLevels-leszármazott fóliák. Ez azt jelenti, hogy a minZoomLevel wfs fólia jelölőnégyzetei már a múlté. Mi azonban nem távolíthatjuk el annak a veszélye nélkül, hogy az esetlegesen ettől függő OL alapú alkalmazásokat tönkretennénk. Ezért ezt érvénytelenítjük -- a minZoomLevel az alul levő jelölőnégyzet a 3.0-s verzióból el lesz távolítva. Kérjük, helyette használja a min/max felbontás beállítást, amelyről az alábbi helyen talál leírást: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS tranzakció: SIKERES ${response}",
@@ -57,20 +47,8 @@
'S': "D",
- 'layerAlreadyAdded': "Megpróbálta hozzáadni a(z) ${layerName} fóliát a térképhez, de az már hozzá van adva",
-
'reprojectDeprecated': "Ön a \'reproject\' beállítást használja a(z) ${layerName} fólián. Ez a beállítás érvénytelen: használata az üzleti alaptérképek fölötti adatok megjelenítésének támogatására szolgált, de ezt a funkció ezentúl a Gömbi Mercator használatával érhető el. További információ az alábbi helyen érhető el: http://trac.openlayers.org/wiki/SphericalMercator",
- 'methodDeprecated': "Ez a módszer érvénytelenítve lett és a 3.0-s verzióból el lesz távolítva. Használja a(z) ${newMethod} módszert helyette.",
+ 'methodDeprecated': "Ez a módszer érvénytelenítve lett és a 3.0-s verzióból el lesz távolítva. Használja a(z) ${newMethod} módszert helyette."
- 'boundsAddError': "Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",
-
- 'lonlatAddError': "A hossz. és szél. értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",
-
- 'pixelAddError': "Az x és y értékeknek egyaránt meg kell felelnie, hogy a funkciót hozzáadhassa.",
-
- 'unsupportedGeometryType': "Nem támogatott geometriatípus: ${geomType}",
-
- 'filterEvaluateNotImplemented': "ennél a szűrőtípusnál kiértékelés nem hajtódik végre."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/ia.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/ia.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/ia.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Strato de base",
- 'readNotImplemented': "Lectura non implementate.",
-
- 'writeNotImplemented': "Scriptura non implementate.",
-
'noFID': "Non pote actualisar un elemento sin FID.",
- 'errorLoadingGML': "Error al cargamento del file GML ${url}",
-
'browserNotSupported': "Tu navigator non supporta le rendition de vectores. Le renditores actualmente supportate es:\n${renderers}",
- 'componentShouldBe': "addFeatures: le componente debe esser del typo ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent ha essite appellate in un strato sin renditor. Isto significa generalmente que tu ha destruite un strato, ma lassava un gestor associate con illo.",
-
'minZoomLevelError': "Le proprietate minZoomLevel es solmente pro uso con le stratos descendente de FixedZoomLevels. Le facto que iste strato WFS verifica minZoomLevel es un reliquia del passato. Nonobstante, si nos lo remove immediatemente, nos pote rumper applicationes a base de OL que depende de illo. Ergo nos lo declara obsolete; le verification de minZoomLevel in basso essera removite in version 3.0. Per favor usa in su loco le configuration de resolutiones min/max como describite a: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Transaction WFS: SUCCESSO ${response}",
@@ -56,20 +46,8 @@
'S': "S",
- 'layerAlreadyAdded': "Tu tentava adder le strato: ${layerName} al carta, ma illo es ja presente",
-
'reprojectDeprecated': "Tu usa le option \'reproject\' in le strato ${layerName} layer. Iste option es obsolescente: illo esseva pro poter monstrar datos super cartas de base commercial, ma iste functionalitate pote ora esser attingite con le uso de Spherical Mercator. Ulterior information es disponibile a http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Iste methodo ha essite declarate obsolescente e essera removite in version 3.0. Per favor usa ${newMethod} in su loco.",
+ 'methodDeprecated': "Iste methodo ha essite declarate obsolescente e essera removite in version 3.0. Per favor usa ${newMethod} in su loco."
- 'boundsAddError': "Tu debe passar le duo valores x e y al function add.",
-
- 'lonlatAddError': "Tu debe passar le duo valores lon e lat al function add.",
-
- 'pixelAddError': "Tu debe passar le duo valores x e y al function add.",
-
- 'unsupportedGeometryType': "Typo de geometria non supportate: ${geomType}",
-
- 'filterEvaluateNotImplemented': "\"evaluate\" non es implementate pro iste typo de filtro."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/id.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/id.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/id.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -23,20 +23,10 @@
'Base Layer': "Lapisan Dasar",
- 'readNotImplemented': "Membaca tidak diterapkan.",
-
- 'writeNotImplemented': "Menyimpan tidak diterapkan.",
-
'noFID': "Tidak dapat memperbarui fitur yang tidak memiliki FID.",
- 'errorLoadingGML': "Kesalahan dalam memuat berkas GML ${url}",
-
'browserNotSupported': "Peramban Anda tidak mendukung penggambaran vektor. Penggambar yang didukung saat ini adalah:\n${renderers}",
- 'componentShouldBe': "addFeatures : komponen harus berupa ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent diterapkan pada lapisan tanpa penggambar. Ini biasanya berarti Anda menghapus sebuah lapisan, tetapi tidak menghapus penangan yang terkait dengannya.",
-
'minZoomLevelError': "Properti minZoomLevel hanya ditujukan bekerja dengan lapisan FixedZoomLevels-descendent. Pengecekan minZoomLevel oleh lapisan wfs adalah peninggalan masa lalu. Kami tidak dapat menghapusnya tanpa kemungkinan merusak aplikasi berbasis OL yang mungkin bergantung padanya. Karenanya, kami menganggapnya tidak berlaku -- Cek minZoomLevel di bawah ini akan dihapus pada 3.0. Silakan gunakan penyetelan resolusi min/maks seperti dijabarkan di sini: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS Transaksi: BERHASIL ${respon}",
@@ -57,20 +47,8 @@
'S': "S",
- 'layerAlreadyAdded': "Anda mencoba menambahkan lapisan: ${layerName} ke dalam peta, tapi lapisan itu telah ditambahkan",
-
'reprojectDeprecated': "Anda menggunakan opsi \'reproject\' pada lapisan ${layerName}. Opsi ini telah ditinggalkan: penggunaannya dirancang untuk mendukung tampilan data melalui peta dasar komersial, tapi fungsionalitas tersebut saat ini harus dilakukan dengan menggunakan dukungan Spherical Mercator. Informasi lebih lanjut tersedia di http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Metode ini telah usang dan akan dihapus di 3.0. Sebaliknya, harap gunakan ${newMethod}.",
+ 'methodDeprecated': "Metode ini telah usang dan akan dihapus di 3.0. Sebaliknya, harap gunakan ${newMethod}."
- 'boundsAddError': "Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",
-
- 'lonlatAddError': "Anda harus memberikan kedua nilai lon dan lat ke fungsi penambah.",
-
- 'pixelAddError': "Anda harus memberikan kedua nilai x dan y ke fungsi penambah.",
-
- 'unsupportedGeometryType': "Tipe geometri tak didukung: ${geomType}",
-
- 'filterEvaluateNotImplemented': "evaluasi tidak tersedia untuk tipe filter ini."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/is.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/is.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/is.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -20,16 +20,8 @@
'Base Layer': "Grunnlag",
- 'readNotImplemented': "Skrifun er óútfærð.",
-
- 'writeNotImplemented': "Lestur er óútfærður.",
-
- 'errorLoadingGML': "Villa kom upp við að hlaða inn GML skránni ${url}",
-
'Scale = 1 : ${scaleDenom}': "Skali = 1 : ${scaleDenom}",
- 'layerAlreadyAdded': "Þú reyndir að bæta laginu ${layerName} á kortið en það er þegar búið að bæta því við",
-
'methodDeprecated': "Þetta fall hefur verið úrelt og verður fjarlægt í 3.0. Notaðu ${newMethod} í staðin."
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/it.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/it.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/it.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,25 +18,12 @@
'Base Layer': "Livello base",
- 'readNotImplemented': "Lettura non implementata.",
-
- 'writeNotImplemented': "Scrittura non implementata.",
-
'noFID': "Impossibile aggiornare un elemento grafico che non abbia il FID.",
- 'errorLoadingGML': "Errore nel caricamento del file GML ${url}",
-
'browserNotSupported':
"Il tuo browser non supporta il rendering vettoriale. I renderizzatore attualemnte supportati sono:\n${renderers}",
- 'componentShouldBe': "addFeatures : il componente dovrebbe essere di tipo ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent chiamata su di un livello senza renderizzatore. Ciò significa che " +
- "il livello è stato cancellato, ma non i gestori associati ad esso.",
-
- // console message
'minZoomLevelError':
"La proprietà minZoomLevel è da utilizzare solamente " +
"con livelli che abbiano FixedZoomLevels. Il fatto che " +
@@ -76,10 +63,6 @@
'Scale = 1 : ${scaleDenom}': "Scala = 1 : ${scaleDenom}",
// console message
- 'layerAlreadyAdded':
- "Stai cercando di aggiungere il livello: ${layerName} alla mappa, ma tale livello è già stato aggiunto.",
-
- // console message
'reprojectDeprecated':
"Stai utilizzando l'opzione 'reproject' sul livello ${layerName}. " +
"Questa opzione è deprecata: il suo utilizzo è stato introdotto per" +
@@ -93,17 +76,5 @@
"Questo metodo è stato deprecato e sarà rimosso dalla versione 3.0. " +
"Si prega di utilizzare il metodo ${newMethod} in alternativa.",
- // console message
- 'boundsAddError': "Devi specificare i valori di x e y alla funzione add.",
-
- // console message
- 'lonlatAddError': "Devi specificare i valori di lon e lat alla funzione add.",
-
- // console message
- 'pixelAddError': "Devi specificare i valori di x e y alla funzione add.",
-
- // console message
- 'unsupportedGeometryType': "Tipo di geometria non supportata: ${geomType}",
-
'end': ''
};
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/ja.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/ja.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/ja.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -23,20 +23,10 @@
'Base Layer': "基底レイヤー",
- 'readNotImplemented': "読み込みは実装されていません。",
-
- 'writeNotImplemented': "書き込みは実装されていません。",
-
'noFID': "FID のない地物は更新できません。",
- 'errorLoadingGML': "GML ファイル ${url} の読み込みエラー",
-
'browserNotSupported': "あなたのブラウザはベクターグラフィックスの描写に対応していません。現時点で対応しているソフトウェアは以下のものです。\n${renderers}",
- 'componentShouldBe': "addFeatures: 要素は ${geomType} であるべきです",
-
- 'getFeatureError': "getFeatureFromEvent がレンダラーのないレイヤーから呼ばれました。通常、これはあなたがレイヤーを、それに関連づけられたいくつかのハンドラを除いて、破壊してしまったことを意味します。",
-
'minZoomLevelError': "minZoomLevel プロパティは FixedZoomLevels を継承するレイヤーでの使用のみを想定しています。この minZoomLevel に対する WFS レイヤーの検査は歴史的なものです。しかしながら、この検査を除去するとそれに依存する OpenLayers ベースのアプリケーションを破壊してしまう可能性があります。よって廃止が予定されており、この minZoomLevel 検査はバージョン3.0で除去されます。代わりに、http://trac.openlayers.org/wiki/SettingZoomLevels で解説されている、最小および最大解像度設定を使用してください。",
'commitSuccess': "WFS トランザクション: 成功 ${response}",
@@ -57,20 +47,8 @@
'S': "南",
- 'layerAlreadyAdded': "あなたは「${layerName}」を地図に追加しようと試みましたが、そのレイヤーは既に追加されています",
-
'reprojectDeprecated': "あなたは「${layerName}」レイヤーで reproject オプションを使っています。このオプションは商用の基底地図上に情報を表示する目的で設計されましたが、現在ではその機能は Spherical Mercator サポートを利用して実現されており、このオプションの使用は非推奨です。追加の情報は http://trac.openlayers.org/wiki/SphericalMercator で入手できます。",
- 'methodDeprecated': "このメソッドは廃止が予定されており、バージョン3.0で除去されます。代わりに ${newMethod} を使用してください。",
+ 'methodDeprecated': "このメソッドは廃止が予定されており、バージョン3.0で除去されます。代わりに ${newMethod} を使用してください。"
- 'boundsAddError': "x と y 両方の値を add 関数に渡さなければなりません。",
-
- 'lonlatAddError': "lon と lat 両方の値を add 関数に渡さなければなりません。",
-
- 'pixelAddError': "x と y の値両方を add 関数に渡さなければなりません。",
-
- 'unsupportedGeometryType': "未対応の形状型: ${geomType}",
-
- 'filterEvaluateNotImplemented': "このフィルター型について evaluate は実装されていません。"
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/km.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/km.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/km.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,8 +18,6 @@
'Base Layer': "ស្រទាប់បាត",
- 'errorLoadingGML': "កំហុសកំឡុងពេលផ្ទុកឯកសារ GML ${url}",
-
'Scale = 1 : ${scaleDenom}': "មាត្រដ្ឋាន = ១ ៖ ${scaleDenom}"
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/ksh.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/ksh.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/ksh.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Jrund-Nivoh",
- 'readNotImplemented': "„\x3ccode lang=\"en\"\x3eread\x3c/code\x3e“ is em Projramm nit fürjesinn.",
-
- 'writeNotImplemented': "„\x3ccode lang=\"en\"\x3ewrite\x3c/code\x3e“ is em Projramm nit fürjesinn.",
-
'noFID': "En Saach, woh kein \x3ci lang=\"en\"\x3eFID\x3c/i\x3e för doh es, löht sesch nit ändere.",
- 'errorLoadingGML': "Fähler beim \x3ci lang=\"en\"\x3eGML\x3c/i\x3e-Datei-Laade vun \x3ccode\x3e${url}\x3c/code\x3e",
-
'browserNotSupported': "Dinge Brauser kann kein Väktore ußjävve. De Zoote Ußjaabe, di em Momang jon, sen:\n${renderers}",
- 'componentShouldBe': "\x3ccode lang=\"en\"\x3eaddFeatures\x3c/code\x3e: dä Aandeil sullt vun dä Zoot „\x3ccode lang=\"en\"\x3e${geomType}\x3c/code\x3e“ sin.",
-
- 'getFeatureError': "\x3ccode lang=\"en\"\x3egetFeatureFromEvent\x3c/code\x3e es vun enem Nivoh opjeroofe woode, woh et kei Projramm zom Ußjävve jit. Dat bedügg för jewöhnlesch, dat De e Nivoh kapott jemaat häs, ävver nit e Projramm för domet ömzejonn, wat domet verbonge es.",
-
'minZoomLevelError': "De Eijeschaff „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“ es bloß doför jedaach, dat mer se met dä Nivvohß bruch, di vun \x3ccode lang=\"en\"\x3eFixedZoomLevels\x3c/code\x3e affhange don. Dat dat \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Nivvoh övverhoup de Eijeschaff „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“ pröhfe deiht, es noch övveresch vun fröhjer. Mer künne dat ävver jez nit fott lohße, oohne dat mer Jevaa loufe, dat Aanwendunge vun OpenLayers nit mieh loufe, di sesch doh velleijsch noch drop am verlohße sin. Dröm sare mer, dat mer et nit mieh han welle, un de „\x3ccode lang=\"en\"\x3eminZoomLevel\x3c/code\x3e“-Eijeschaff weed hee vun de Version 3.0 af nit mieh jeprööf wäde. Nemm doför de Enstellung för de hühßte un de kleinßte Oplöhsung, esu wi et en http://trac.openlayers.org/wiki/SettingZoomLevels opjeschrevve es.",
'commitSuccess': "Dä \x3ci lang=\"en\"\x3eWFS\x3c/i\x3e-Vörjang es joot jeloufe: ${response}",
@@ -56,20 +46,8 @@
'S': "S",
- 'layerAlreadyAdded': "Do häß versöhk, dat Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e en di Kaat eren ze bränge, et wohr ävver ald do dren.",
-
'reprojectDeprecated': "Do bruchs de Ußwahl \x3ccode\x3ereproject\x3c/code\x3e op däm Nivvoh \x3ccode\x3e${layerName}\x3c/code\x3e. Di Ußwahl es nit mieh jähn jesinn. Se wohr doför jedaach, öm Date op jeschääfsmäßesch eruß jejovve Kaate bovve drop ze moole, wat ävver enzwesche besser met dä Öngershtözung för de ßfääresche Mäkaator Beldscher jeiht. Doh kanns De mieh drövver fenge op dä Sigg: http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Hee di Metood es nim_mih aktoäll un et weed se en dä Version 3.0 nit mieh jävve. Nemm \x3ccode\x3e${newMethod}\x3c/code\x3e doföör.",
+ 'methodDeprecated': "Hee di Metood es nim_mih aktoäll un et weed se en dä Version 3.0 nit mieh jävve. Nemm \x3ccode\x3e${newMethod}\x3c/code\x3e doföör."
- 'boundsAddError': "Do moß beeds vun de \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e Wääte aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",
-
- 'lonlatAddError': "Do moß beeds \x3ccode\x3elon\x3c/code\x3e un \x3ccode\x3elat\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",
-
- 'pixelAddError': "Do moß beeds \x3ccode\x3ex\x3c/code\x3e un \x3ccode\x3ey\x3c/code\x3e aan de Fungkßjohn \x3ccode\x3eadd\x3c/code\x3e jävve.",
-
- 'unsupportedGeometryType': "De Zoot Jommetrii dom_mer nit ongershtöze: \x3ccode\x3e${geomType}\x3c/code\x3e",
-
- 'filterEvaluateNotImplemented': "„\x3ccode lang=\"en\"\x3eevaluate\x3c/code\x3e“ es för di Zoot Fellter nit enjereschdt."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/lt.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/lt.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/lt.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,23 +18,11 @@
'Base Layer': "Pagrindinis sluoksnis",
- 'readNotImplemented': "Skaitymas nėra įgyvendintas.",
-
- 'writeNotImplemented': "Rašymas nėra įgyvendintas.",
-
'noFID': "Negaliu atnaujinti objekto, kuris neturi FID.",
- 'errorLoadingGML': "Klaida užkraunant GML failą ${url}",
-
'browserNotSupported':
"Jūsų naršyklė nemoka parodyti vektorių. Šiuo metu galima naudotis tokiais rodymo varikliais:\n{renderers}",
- 'componentShouldBe': "addFeatures : komponentas turi būti ${geomType}",
-
- // console message
- 'getFeatureError':
- "getFeatureFromEvent buvo iškviestas sluoksniui, kuris neturi priskirto paišymo variklio. Tai paprastai nutinka, kai jūs pašalinate sluoksnį, bet paliekate su juo susijusį [handler]",
-
'commitSuccess': "WFS Tranzakcija: PAVYKO ${response}",
'commitFailed': "WFS Tranzakcija: ŽLUGO ${response}",
@@ -49,26 +37,10 @@
'Graticule': 'Tinklelis',
// console message
- 'layerAlreadyAdded':
- "Bandėte pridėti prie žemėlapio sluoksnį ${layerName}, tačiau jis jau yra pridėtas",
-
- // console message
'methodDeprecated':
"Šis metodas yra pasenęs ir 3.0 versijoje bus pašalintas. " +
"Prašome naudoti ${newMethod}.",
- // console message
- 'boundsAddError': "Add funkcijai reikia pateikti tiek x, tiek y reikšmes.",
-
- // console message
- 'lonlatAddError': "Add funkcijai reikia pateikti tiek lon, tiek lat reikšmes",
-
- // console message
- 'pixelAddError': "Add funkcijai būtina perduoti tiek x, tiek y reikšmes.",
-
- // console message
- 'unsupportedGeometryType': "Nepalaikomas geometrijos tipas: ${geomType}",
-
// **** end ****
'end': ''
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/nb.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/nb.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/nb.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,25 +18,12 @@
'Base Layer': "Bakgrunnskart",
- 'readNotImplemented': "Lesing er ikke implementert.",
-
- 'writeNotImplemented': "Skriving er ikke implementert.",
-
'noFID': "Kan ikke oppdatere et feature (et objekt) som ikke har FID.",
- 'errorLoadingGML': "Feil under lasting av GML-fil ${url}",
-
'browserNotSupported':
"Din nettleser støtter ikke vektortegning. Tegnemetodene som støttes er:\n${renderers}",
- 'componentShouldBe': "addFeatures : komponenten må være en ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent har blitt kjørt mot et lag uten noen tegnemetode. Dette betyr som regel at du " +
- "fjernet et lag uten å fjerne alle håndterere tilknyttet laget.",
-
- // console message
'minZoomLevelError':
"Egenskapen minZoomLevel er kun ment til bruk på lag " +
"basert på FixedZoomLevels. At dette wfs-laget sjekker " +
@@ -77,10 +64,6 @@
'Scale = 1 : ${scaleDenom}': "<strong>Skala</strong> 1 : ${scaleDenom}",
// console message
- 'layerAlreadyAdded':
- "Du forsøkte å legge til laget ${layerName} på kartet, men det er allerede lagt til",
-
- // console message
'reprojectDeprecated':
"Du bruker innstillingen 'reproject' på laget ${layerName}. " +
"Denne innstillingen er foreldet, den var ment for å støtte " +
@@ -93,18 +76,6 @@
"Denne metoden er markert som foreldet og vil bli fjernet i 3.0. " +
"Vennligst bruk ${newMethod} i stedet.",
- // console message
- 'boundsAddError': "Du må gi både x- og y-verdier til funksjonen add.",
-
- // console message
- 'lonlatAddError': "Du må gi både lon- og lat-verdier til funksjonen add.",
-
- // console message
- 'pixelAddError': "Du må gi både x- og y-verdier til funksjonen add.",
-
- // console message
- 'unsupportedGeometryType': "Geometritypen ${geomType} er ikke støttet",
-
'end': ''
};
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/nds.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/nds.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/nds.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,36 +22,16 @@
'Base Layer': "Achtergrundkoort",
- 'readNotImplemented': "Lesen is nich inricht.",
-
- 'writeNotImplemented': "Schrieven is nich inricht.",
-
'noFID': "En Feature, dat keen FID hett, kann nich aktuell maakt warrn.",
- 'errorLoadingGML': "Fehler bi’t Laden vun de GML-Datei ${url}",
-
'browserNotSupported': "Dien Browser ünnerstütt keen Vektorbiller. Ünnerstütt Renderers:\n${renderers}",
- 'componentShouldBe': "addFeatures : Kumponent schull man den Typ ${geomType} hebben",
-
- 'getFeatureError': "getFeatureFromEvent is von en Laag ahn Render opropen worrn. Dat bedüüdt normalerwies, dat en Laag wegmaakt worrn is, aver nich de Handler, de dor op verwiest.",
-
'commitSuccess': "WFS-Transakschoon: hett klappt ${response}",
'commitFailed': "WFS-Transakschoon: hett nich klappt ${response}",
'Scale = 1 : ${scaleDenom}': "Skaal = 1 : ${scaleDenom}",
- 'layerAlreadyAdded': "Du versöchst de Laag „${layerName}“ to de Koort totofögen, man de is al toföögt",
+ 'methodDeprecated': "Disse Methood is oold un schall dat in 3.0 nich mehr geven. Bruuk dor man beter ${newMethod} för."
- 'methodDeprecated': "Disse Methood is oold un schall dat in 3.0 nich mehr geven. Bruuk dor man beter ${newMethod} för.",
-
- 'boundsAddError': "De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",
-
- 'lonlatAddError': "De Weert lon un lat, de mööt all beid an de add-Funkschoon övergeven warrn.",
-
- 'pixelAddError': "De Weert x un y, de mööt all beid an de add-Funkschoon övergeven warrn.",
-
- 'unsupportedGeometryType': "Nich ünnerstütt Geometrie-Typ: ${geomType}"
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/nl.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/nl.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/nl.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Achtergrondkaart",
- 'readNotImplemented': "Lezen is niet geïmplementeerd.",
-
- 'writeNotImplemented': "Schrijven is niet geïmplementeerd.",
-
'noFID': "Een optie die geen FID heeft kan niet bijgewerkt worden.",
- 'errorLoadingGML': "Er is een fout opgetreden bij het laden van het GML bestand van ${url}",
-
'browserNotSupported': "Uw browser ondersteunt het weergeven van vectoren niet.\nMomenteel ondersteunde weergavemogelijkheden:\n${renderers}",
- 'componentShouldBe': "addFeatures : component moet van het type ${geomType} zijn",
-
- 'getFeatureError': "getFeatureFromEvent is aangeroepen op een laag zonder rederer.\nDit betekent meestal dat u een laag hebt verwijderd, maar niet een handler die ermee geassocieerd was.",
-
'minZoomLevelError': "De eigenschap minZoomLevel is alleen bedoeld voor gebruik lagen met die afstammen van FixedZoomLevels-lagen.\nDat deze WFS-laag minZoomLevel controleert, is een overblijfsel uit het verleden.\nWe kunnen deze controle echter niet verwijderen zonder op OL gebaseerde applicaties die hervan afhankelijk zijn stuk te maken.\nDaarom heeft deze functionaliteit de eigenschap \'deprecated\' gekregen - de minZoomLevel wordt verwijderd in versie 3.0.\nGebruik in plaats van deze functie de mogelijkheid om min/max voor resolutie in te stellen zoals op de volgende pagina wordt beschreven:\nhttp://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-transactie: succesvol ${response}",
@@ -56,20 +46,8 @@
'S': "Z",
- 'layerAlreadyAdded': "U hebt geprobeerd om de laag ${layerName} aan de kaart toe te voegen, maar deze is al toegevoegd",
-
'reprojectDeprecated': "U gebruikt de optie \'reproject\' op de laag ${layerName}.\nDeze optie is vervallen: deze optie was ontwikkeld om gegevens over commerciële basiskaarten weer te geven, maar deze functionaliteit wordt nu bereikt door ondersteuning van Spherical Mercator.\nMeer informatie is beschikbaar op http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Deze methode is verouderd en wordt verwijderd in versie 3.0.\nGebruik ${newMethod}.",
+ 'methodDeprecated': "Deze methode is verouderd en wordt verwijderd in versie 3.0.\nGebruik ${newMethod}."
- 'boundsAddError': "U moet zowel de x- als de y-waarde doorgeven aan de toevoegfunctie.",
-
- 'lonlatAddError': "U moet zowel de lengte- als de breedtewaarde doorgeven aan de toevoegfunctie.",
-
- 'pixelAddError': "U moet zowel de x- als de y-waarde doorgeven aan de toevoegfunctie.",
-
- 'unsupportedGeometryType': "Dit geometrietype wordt niet ondersteund: ${geomType}",
-
- 'filterEvaluateNotImplemented': "evalueren is niet geïmplementeerd voor dit filtertype."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/nn.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/nn.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/nn.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -14,14 +14,6 @@
*/
OpenLayers.Lang["nn"] = OpenLayers.Util.applyDefaults({
- 'Scale = 1 : ${scaleDenom}': "Skala = 1 : ${scaleDenom}",
+ 'Scale = 1 : ${scaleDenom}': "Skala = 1 : ${scaleDenom}"
- 'layerAlreadyAdded': "Du freista å leggja til laget «${layerName}» på kartet, men det har alt vorte lagt til.",
-
- 'boundsAddError': "Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen.",
-
- 'lonlatAddError': "Du er nøydd til å gje både lon- og lat-verdiar til «add»-funksjonen.",
-
- 'pixelAddError': "Du er nøydd til å gje både ein x- og ein y-verdi til «add»-funksjonen."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/oc.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/oc.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/oc.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Calc de basa",
- 'readNotImplemented': "Lectura pas implementada.",
-
- 'writeNotImplemented': "Escritura pas implementada.",
-
'noFID': "Impossible de metre a jorn un objècte sens identificant (fid).",
- 'errorLoadingGML': "Error al cargament del fichièr GML ${url}",
-
'browserNotSupported': "Vòstre navegidor supòrta pas lo rendut vectorial. Los renderers actualament suportats son : \n${renderers}",
- 'componentShouldBe': "addFeatures : lo compausant deuriá èsser de tipe ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent es estat apelat sus un calc sens renderer. Aquò significa generalament qu\'avètz destruch aqueste jaç, mas qu\'avètz conservat un handler que li èra associat.",
-
'minZoomLevelError': "La proprietat minZoomLevel deu èsser utilizada solament per de jaces FixedZoomLevels-descendent. Lo fach qu\'aqueste jaç WFS verifique la preséncia de minZoomLevel es una relica del passat. Çaquelà, la podèm suprimir sens copar d\'aplicacions que ne poirián dependre. Es per aquò que la depreciam -- la verificacion del minZoomLevel serà suprimida en version 3.0. A la plaça, mercés d\'utilizar los paramètres de resolucions min/max tal coma descrich sus : http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Transaccion WFS : SUCCES ${response}",
@@ -56,20 +46,8 @@
'S': "S",
- 'layerAlreadyAdded': "Avètz ensajat d\'apondre a la carta lo calc : ${layerName}, mas ja es present",
-
'reprojectDeprecated': "Utilizatz l\'opcion \'reproject\' sul jaç ${layerName}. Aquesta opcion es despreciada : Son usatge permetiá d\'afichar de donadas al dessús de jaces raster comercials. Aquesta foncionalitat ara es suportada en utilizant lo supòrt de la projeccion Mercator Esferica. Mai d\'informacion es disponibla sus http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Aqueste metòde es despreciada, e serà suprimida a la version 3.0. Mercés d\'utilizar ${newMethod} a la plaça.",
+ 'methodDeprecated': "Aqueste metòde es despreciada, e serà suprimida a la version 3.0. Mercés d\'utilizar ${newMethod} a la plaça."
- 'boundsAddError': "Vos cal passar las doas valors x e y a la foncion add.",
-
- 'lonlatAddError': "Vos cal passar las doas valors lon e lat a la foncion add.",
-
- 'pixelAddError': "Vos cal passar las doas valors x e y a la foncion add.",
-
- 'unsupportedGeometryType': "Tipe de geometria pas suportat : ${geomType}",
-
- 'filterEvaluateNotImplemented': "evaluar es pas encara estat implementat per aqueste tipe de filtre."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/pt-BR.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/pt-BR.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/pt-BR.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -23,20 +23,10 @@
'Base Layer': "Camada Base",
- 'readNotImplemented': "Leitura não implementada.",
-
- 'writeNotImplemented': "Escrita não implementada.",
-
'noFID': "Não é possível atualizar uma feição que não tenha um FID.",
- 'errorLoadingGML': "Erro ao carregar o arquivo GML ${url}",
-
'browserNotSupported': "Seu navegador não suporta renderização de vetores. Os renderizadores suportados atualmente são:\n${renderers}",
- 'componentShouldBe': "addFeatures: o componente deve ser do tipo ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent foi executado mas nenhum renderizador foi encontrado. Isso pode indicar que você destruiu uma camana, mas não o handler associado a ela.",
-
'minZoomLevelError': "A propriedade minZoomLevel é de uso restrito das camadas descendentes de FixedZoomLevels. A verificação dessa propriedade pelas camadas wfs é um resíduo do passado. Não podemos, entretanto não é possível removê-la sem possívelmente quebrar o funcionamento de aplicações OL que possuem depência com ela. Portanto estamos tornando seu uso obsoleto -- a verificação desse atributo será removida na versão 3.0. Ao invés, use as opções de resolução min/max como descrito em: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Transação WFS : SUCESSO ${response}",
@@ -57,20 +47,8 @@
'S': "S",
- 'layerAlreadyAdded': "Você tentou adicionar a camada: ${layerName} ao mapa, mas ela já foi adicionada",
-
'reprojectDeprecated': "Você está usando a opção \'reproject\' na camada ${layerName}. Essa opção está obsoleta: seu uso foi projetado para suportar a visualização de dados sobre bases de mapas comerciais, entretanto essa funcionalidade deve agora ser alcançada usando o suporte à projeção Mercator. Mais informação está disponível em: http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Esse método está obsoleto e será removido na versão 3.0. Ao invés, por favor use ${newMethod}.",
+ 'methodDeprecated': "Esse método está obsoleto e será removido na versão 3.0. Ao invés, por favor use ${newMethod}."
- 'boundsAddError': "Você deve informar ambos os valores x e y para a função add.",
-
- 'lonlatAddError': "Você deve informar ambos os valores lon e lat para a função add.",
-
- 'pixelAddError': "Você deve informar ambos os valores x e y para a função add.",
-
- 'unsupportedGeometryType': "Tipo geométrico não suportado: ${geomType}.",
-
- 'filterEvaluateNotImplemented': "evaluete não está implementado para este tipo de filtro."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/pt.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/pt.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/pt.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -24,20 +24,10 @@
'Base Layer': "Camada Base",
- 'readNotImplemented': "Leitura não implementada.",
-
- 'writeNotImplemented': "Escrita não implementada.",
-
'noFID': "Não é possível atualizar um elemento para a qual não há FID.",
- 'errorLoadingGML': "Erro ao carregar ficheiro GML ${url}",
-
'browserNotSupported': "O seu navegador não suporta renderização vetorial. Actualmente os renderizadores suportados são:\n${renderers}",
- 'componentShouldBe': "addFeatures: componente deve ser um(a) ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent foi chamado numa camada sem renderizador. Isto normalmente significa que destruiu uma camada, mas não um manipulador \'\'(handler)\'\' que lhe está associado.",
-
'minZoomLevelError': "A propriedade minZoomLevel só deve ser usada com as camadas descendentes da FixedZoomLevels. A verificação da propriedade por esta camada wfs é uma relíquia do passado. No entanto, não podemos removê-la sem correr o risco de afectar aplicações OL que dependam dela. Portanto, estamos a torná-la obsoleta -- a verificação minZoomLevel será removida na versão 3.0. Em vez dela, por favor, use as opções de resolução min/max descritas aqui: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Transacção WFS: SUCESSO ${response}",
@@ -58,20 +48,8 @@
'S': "S",
- 'layerAlreadyAdded': "Você tentou adicionar a camada: ${layerName} ao mapa, mas ela já tinha sido adicionada antes",
-
'reprojectDeprecated': "Está usando a opção \'reproject\' na camada ${layerName}. Esta opção é obsoleta: foi concebida para permitir a apresentação de dados sobre mapas-base comerciais, mas esta funcionalidade é agora suportada pelo Mercator Esférico. Mais informação está disponível em http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Este método foi declarado obsoleto e será removido na versão 3.0. Por favor, use ${newMethod} em vez disso.",
+ 'methodDeprecated': "Este método foi declarado obsoleto e será removido na versão 3.0. Por favor, use ${newMethod} em vez disso."
- 'boundsAddError': "Você deve passar tanto o valor x como o y à função de adição.",
-
- 'lonlatAddError': "Você deve passar tanto o valor lon como o lat à função de adição.",
-
- 'pixelAddError': "Você deve passar tanto o valor x como o y à função de adição.",
-
- 'unsupportedGeometryType': "Tipo de geometria não suportado: ${geomType}",
-
- 'filterEvaluateNotImplemented': "avaliar não está implementado para este tipo de filtro."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/ru.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/ru.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/ru.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -25,20 +25,10 @@
'Base Layer': "Основной слой",
- 'readNotImplemented': "Чтение не реализовано.",
-
- 'writeNotImplemented': "Запись не реализована.",
-
'noFID': "Невозможно обновить объект, для которого нет FID.",
- 'errorLoadingGML': "Ошибка при загрузке файла GML ${url}",
-
'browserNotSupported': "Ваш браузер не поддерживает векторную графику. На данный момент поддерживаются:\n${renderers}",
- 'componentShouldBe': "addFeatures: компонент должен быть ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent вызван для слоя без рендерера. Обычно это говорит о том, что вы уничтожили слой, но оставили связанный с ним обработчик.",
-
'minZoomLevelError': "Свойство minZoomLevel предназначено только для использования со слоями, являющимися потомками FixedZoomLevels. То, что этот WFS-слой проверяется на minZoomLevel — реликт прошлого. Однако мы не можем удалить эту функцию, так как, возможно, от неё зависят некоторые основанные на OpenLayers приложения. Функция объявлена устаревшей — проверка minZoomLevel будет удалена в 3.0. Пожалуйста, используйте вместо неё настройку мин/макс разрешения, описанную здесь: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Транзакция WFS: УСПЕШНО ${response}",
@@ -59,20 +49,8 @@
'S': "Ю",
- 'layerAlreadyAdded': "Вы попытались добавить слой «${layerName}» на карту, но он уже был добавлен",
-
'reprojectDeprecated': "Вы используете опцию \'reproject\' для слоя ${layerName}. Эта опция является устаревшей: ее использование предполагалось для поддержки показа данных поверх коммерческих базовых карт, но теперь этот функционал несёт встроенная поддержка сферической проекции Меркатора. Больше сведений доступно на http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Этот метод считается устаревшим и будет удалён в версии 3.0. Пожалуйста, пользуйтесь ${newMethod}.",
+ 'methodDeprecated': "Этот метод считается устаревшим и будет удалён в версии 3.0. Пожалуйста, пользуйтесь ${newMethod}."
- 'boundsAddError': "Функции add надо передавать оба значения, x и y.",
-
- 'lonlatAddError': "Функции add надо передавать оба значения, lon и lat.",
-
- 'pixelAddError': "Функции add надо передавать оба значения, x и y.",
-
- 'unsupportedGeometryType': "Неподдерживаемый тип геометрии: ${geomType}",
-
- 'filterEvaluateNotImplemented': "evaluate не реализовано для фильтра данного типа."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/sk.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/sk.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/sk.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Základná vrstva",
- 'readNotImplemented': "Čítanie nie je implementované.",
-
- 'writeNotImplemented': "Zápis nie je implementovaný.",
-
'noFID': "Nie je možné aktualizovať vlastnosť, pre ktorú neexistuje FID.",
- 'errorLoadingGML': "Chyba pri načítaní súboru GML ${url}",
-
'browserNotSupported': "Váš prehliadač nepodporuje vykresľovanie vektorov. Momentálne podporované vykresľovače sú:\n${renderers}",
- 'componentShouldBe': "addFeatures: komponent by mal byť ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent bola zavolaná na vrstve bez vykresľovača. To zvyčajne znamená, že ste odstránili vrstvu, ale nie niektorú z obslúh, ktorá je s ňou asociovaná.",
-
'minZoomLevelError': "Vlastnosť minZoomLevel je určený iba na použitie s vrstvami odvodenými od FixedZoomLevels. To, že táto wfs vrstva kontroluje minZoomLevel je pozostatok z minulosti. Nemôžeme ho však odstrániť, aby sme sa vyhli možnému porušeniu aplikácií založených na Open Layers, ktoré na tomto môže závisieť. Preto ho označujeme ako zavrhovaný - dolu uvedená kontrola minZoomLevel bude odstránená vo verzii 3.0. Použite prosím namiesto toho kontrolu min./max. rozlíšenia podľa tu uvedeného popisu: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Transakcia WFS: ÚSPEŠNÁ ${response}",
@@ -48,20 +38,7 @@
'Scale = 1 : ${scaleDenom}': "Mierka = 1 : ${scaleDenom}",
- 'layerAlreadyAdded': "Pokúsili ste sa do mapy pridať vrstvu ${layerName}, ale tá už bola pridaná",
-
'reprojectDeprecated': "Používate voľby „reproject“ vrstvy ${layerType}. Táto voľba je zzavrhovaná: jej použitie bolo navrhnuté na podporu zobrazovania údajov nad komerčnými základovými mapami, ale túto funkcionalitu je teraz možné dosiahnuť pomocou Spherical Mercator. Ďalšie informácie získate na stránke http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Táto metóda je zavrhovaná a bude odstránená vo verzii 3.0. Použite prosím namiesto nej metódu ${newMethod}.",
-
- 'boundsAddError': "Sčítacej funkcii musíte dať hodnoty x aj y.",
-
- 'lonlatAddError': "Sčítacej funkcii musíte dať hodnoty lon (zem. dĺžka) aj lat (zem. šírka).",
-
- 'pixelAddError': "Sčítacej funkcii musíte dať hodnoty x aj y.",
-
- 'unsupportedGeometryType': "Nepodporovaný typ geometrie: ${geomType}",
-
- 'filterEvaluateNotImplemented': "evaluate nie je implementovaný pre tento typ filtra"
-
+ 'methodDeprecated': "Táto metóda je zavrhovaná a bude odstránená vo verzii 3.0. Použite prosím namiesto nej metódu ${newMethod}."
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/sv-SE.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/sv-SE.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/sv-SE.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Bakgrundskarta",
- 'readNotImplemented': "Läsning ej implementerad.",
-
- 'writeNotImplemented': "Skrivning ej implementerad.",
-
'noFID': "Kan ej uppdatera feature (objekt) för vilket FID saknas.",
- 'errorLoadingGML': "Fel i laddning av GML-fil ${url}",
-
'browserNotSupported': "Din webbläsare stöder inte vektorvisning. För närvarande stöds följande visning:\n${renderers}",
- 'componentShouldBe': "addFeatures : komponenten skall vara en ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent anropad för lager utan utritning. Detta betyder oftast att man raderat ett lager, men inte en hanterare som är knuten till lagret.",
-
'minZoomLevelError': "Egenskapen minZoomLevel är endast avsedd att användas med lager med FixedZoomLevels. Att detta WFS-lager kontrollerar minZoomLevel är en relik från äldre versioner. Vi kan dock inte ta bort det utan att riskera att OL-baserade tillämpningar som använder detta slutar fungera. Därför är det satt som deprecated, minZoomLevel kommer att tas bort i version 3.0. Använd i stället inställning av min/max resolution som beskrivs här: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-transaktion: LYCKADES ${response}",
@@ -48,20 +38,8 @@
'Scale = 1 : ${scaleDenom}': "\x3cstrong\x3eSkala\x3c/strong\x3e 1 : ${scaleDenom}",
- 'layerAlreadyAdded': "Du försökte lägga till lagret: ${layerName} på kartan, men det har lagts till tidigare",
-
'reprojectDeprecated': "Du använder inställningen \'reproject\' på lagret ${layerName}. Denna inställning markerad som deprecated: den var avsedd att användas för att stödja visning av kartdata på kommersiella bakgrundskartor, men nu bör man i stället använda Spherical Mercator-stöd för den funktionaliteten. Mer information finns på http://trac.openlayers.org/wiki/SphericalMercator.",
- 'methodDeprecated': "Denna metod är markerad som deprecated och kommer att tas bort i 3.0. Använd ${newMethod} i stället.",
+ 'methodDeprecated': "Denna metod är markerad som deprecated och kommer att tas bort i 3.0. Använd ${newMethod} i stället."
- 'boundsAddError': "Du måste skicka både x- och y-värde till funktionen add.",
-
- 'lonlatAddError': "Du måste skicka både lon- och lat-värde till funktionen add.",
-
- 'pixelAddError': "Du måste skicka både x- och y-värde till funktionen add.",
-
- 'unsupportedGeometryType': "Stöd saknas för geometritypen: ${geomType}",
-
- 'filterEvaluateNotImplemented': "evaluering har ej implementerats för denna typ av filter."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/vi.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/vi.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/vi.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -22,20 +22,10 @@
'Base Layer': "Lớp nền",
- 'readNotImplemented': "Chưa hỗ trợ chức năng đọc.",
-
- 'writeNotImplemented': "Chưa hỗ trợ chức năng viết.",
-
'noFID': "Không thể cập nhật tính năng thiếu FID.",
- 'errorLoadingGML': "Lỗi tải tập tin GML tại ${url}",
-
'browserNotSupported': "Trình duyệt của bạn không hỗ trợ chức năng vẽ bằng vectơ. Hiện hỗ trợ các bộ kết xuất:\n${renderers}",
- 'componentShouldBe': "addFeatures: bộ phận cần phải là ${geomType}",
-
- 'getFeatureError': "getFeatureFromEvent được gọi từ lớp không có bộ kết xuất. Thường thì có lẽ lớp bị xóa nhưng một phần xử lý của nó vẫn còn.",
-
'minZoomLevelError': "Chỉ nên sử dụng thuộc tính minZoomLevel với các lớp FixedZoomLevels-descendent. Việc lớp wfs này tìm cho minZoomLevel là di tích còn lại từ xưa. Tuy nhiên, nếu chúng tôi dời nó thì sẽ vỡ các chương trình OpenLayers mà dựa trên nó. Bởi vậy chúng tôi phản đối sử dụng nó\x26nbsp;– bước tìm cho minZoomLevel sẽ được dời vào phiên bản 3.0. Xin sử dụng thiết lập độ phân tích tối thiểu / tối đa thay thế, theo hướng dẫn này: http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "Giao dịch WFS: THÀNH CÔNG ${response}",
@@ -56,20 +46,8 @@
'S': "N",
- 'layerAlreadyAdded': "Bạn muốn thêm lớp ${layerName} vào bản đồ, nhưng lớp này đã được thêm",
-
'reprojectDeprecated': "Bạn đang áp dụng chế độ “reproject” vào lớp ${layerName}. Chế độ này đã bị phản đối: nó có mục đích hỗ trợ lấp dữ liệu trên các nền bản đồ thương mại; nên thực hiện hiệu ứng đó dùng tính năng Mercator Hình cầu. Có sẵn thêm chi tiết tại http://trac.openlayers.org/wiki/SphericalMercator .",
- 'methodDeprecated': "Phương thức này đã bị phản đối và sẽ bị dời vào phiên bản 3.0. Xin hãy sử dụng ${newMethod} thay thế.",
+ 'methodDeprecated': "Phương thức này đã bị phản đối và sẽ bị dời vào phiên bản 3.0. Xin hãy sử dụng ${newMethod} thay thế."
- 'boundsAddError': "Cần phải cho cả giá trị x và y vào hàm add.",
-
- 'lonlatAddError': "Cần phải cho cả giá trị lon và lat vào hàm add.",
-
- 'pixelAddError': "Cần phải cho cả giá trị x và y vào hàm add.",
-
- 'unsupportedGeometryType': "Không hỗ trợ kiểu địa lý: ${geomType}",
-
- 'filterEvaluateNotImplemented': "chưa hỗ trợ evaluate cho loại bộ lọc này."
-
});
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/zh-CN.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/zh-CN.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/zh-CN.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -18,25 +18,12 @@
'Base Layer': "基础图层",
- 'readNotImplemented': "读取功能没有实现。",
-
- 'writeNotImplemented': "写入功能没有实现。",
-
'noFID': "无法更新feature,缺少FID。",
- 'errorLoadingGML': "加载GML文件 ${url} 出现错误。",
-
'browserNotSupported':
"你使用的浏览器不支持矢量渲染。当前支持的渲染方式包括:\n${renderers}",
- 'componentShouldBe': "addFeatures : 组件类型应该是 ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent方法在一个没有渲染器的图层上被调用。 这通常意味着您" +
- "销毁了一个图层,但并未销毁其关联的handler。",
-
- // console message
'minZoomLevelError':
"minZoomLevel属性仅适合用于" +
"使用了固定缩放级别的图层。这个 " +
@@ -76,10 +63,6 @@
'Scale = 1 : ${scaleDenom}': "比例尺 = 1 : ${scaleDenom}",
// console message
- 'layerAlreadyAdded':
- "你尝试添加图层: ${layerName} 到地图中,但是它之前就已经被添加。",
-
- // console message
'reprojectDeprecated':
"你正在使用 ${layerName} 图层上的'reproject'选项。" +
"这个选项已经不再使用:" +
@@ -93,17 +76,5 @@
"该方法已经不再被支持,并且将在3.0中被移除。" +
"请使用 ${newMethod} 方法来替代。",
- // console message
- 'boundsAddError': "您必须传递 x 和 y 两个参数值到 add 方法。",
-
- // console message
- 'lonlatAddError': "您必须传递 lon 和 lat 两个参数值到 add 方法。",
-
- // console message
- 'pixelAddError': "您必须传递 x and y 两个参数值到 add 方法。",
-
- // console message
- 'unsupportedGeometryType': "不支持的几何体类型: ${geomType}",
-
'end': ''
};
Modified: sandbox/august/trunk/lib/OpenLayers/Lang/zh-TW.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang/zh-TW.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang/zh-TW.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -19,25 +19,12 @@
'Base Layer': "基礎圖層",
- 'readNotImplemented': "沒有實作讀取的功能。",
-
- 'writeNotImplemented': "沒有實作寫入的功能。",
-
'noFID': "因為沒有 FID 所以無法更新 feature。",
- 'errorLoadingGML': "讀取GML檔案 ${url} 錯誤。",
-
'browserNotSupported':
"您的瀏覽器未支援向量渲染. 目前支援的渲染方式是:\n${renderers}",
- 'componentShouldBe': "addFeatures : 元件應該為 ${geomType}",
-
// console message
- 'getFeatureError':
- "getFeatureFromEvent 在一個沒有被渲染的圖層裡被呼叫。這通常意味著您 " +
- "摧毀了一個圖層,但並未摧毀相關的handler。",
-
- // console message
'minZoomLevelError':
"minZoomLevel 屬性僅適合用在 " +
"FixedZoomLevels-descendent 類型的圖層. 這個" +
@@ -77,10 +64,6 @@
'Scale = 1 : ${scaleDenom}': "Scale = 1 : ${scaleDenom}",
// console message
- 'layerAlreadyAdded':
- "你試著新增圖層: ${layerName} 到地圖上,但圖層之前就已經被新增了。",
-
- // console message
'reprojectDeprecated':
"你正使用 'reproject' 這個選項 " +
"在 ${layerName} 層。這個選項已經不再使用:" +
@@ -94,17 +77,5 @@
"這個方法已經不再使用且在3.0將會被移除," +
"請使用 ${newMethod} 來代替。",
- // console message
- 'boundsAddError': "您必須傳入 x 跟 y 兩者的值進 add 函數。",
-
- // console message
- 'lonlatAddError': "您必須傳入 lon 跟 lat 兩者的值進 add 函數。",
-
- // console message
- 'pixelAddError': "您必須傳入 x 跟 y 兩者的值進 add 函數。",
-
- // console message
- 'unsupportedGeometryType': "未支援的幾何型別: ${geomType}。",
-
'end': ''
};
Modified: sandbox/august/trunk/lib/OpenLayers/Lang.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Lang.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Lang.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -49,7 +49,7 @@
* Set the language code for string translation. This code is used by
* the <OpenLayers.Lang.translate> method.
*
- * Parameters-
+ * Parameters:
* code - {String} These codes follow the IETF recommendations at
* http://www.ietf.org/rfc/rfc3066.txt. If no value is set, the
* browser's language setting will be tested. If no <OpenLayers.Lang>
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/GML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/GML.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/GML.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -7,7 +7,6 @@
* @requires OpenLayers/Layer/Vector.js
* @requires OpenLayers/Request/XMLHttpRequest.js
* @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -167,7 +166,7 @@
* request - {String}
*/
requestFailure: function(request) {
- OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML", {'url':this.url}));
+ OpenLayers.Console.userError('Error in loading GML file ' + this.url);
this.events.triggerEvent("loadend");
},
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -99,12 +99,47 @@
tileLoadingDelay: 100,
/**
+ * Property: serverResolutions
+ * {Array(Number}} This property is documented in subclasses as
+ * an API property.
+ */
+ serverResolutions: null,
+
+ /**
* Property: timerId
* {Number} - The id of the tileLoadingDelay timer.
*/
timerId: null,
/**
+ * Property: backBuffer
+ * {DOMElement} The back buffer.
+ */
+ backBuffer: null,
+
+ /**
+ * Property: gridResolution
+ * {Number} The resolution of the current grid. Used for backbuffering.
+ * This property is updated each the grid is initialized.
+ */
+ gridResolution: null,
+
+ /**
+ * Property: backBufferResolution
+ * {Number} The resolution of the current back buffer. This property is
+ * updated each time a back buffer is created.
+ */
+ backBufferResolution: null,
+
+ /**
+ * Property: backBufferLonLat
+ * {Object} The top-left corner of the current back buffer. Includes lon
+ * and lat properties. This object is updated each time a back buffer
+ * is created.
+ */
+ backBufferLonLat: null,
+
+ /**
* Constructor: OpenLayers.Layer.Grid
* Create a new grid layer
*
@@ -126,7 +161,7 @@
this.events.addEventType("tileloaded");
this.grid = [];
-
+
this._moveGriddedTiles = OpenLayers.Function.bind(
this.moveGriddedTiles, this
);
@@ -152,6 +187,9 @@
*/
destroy: function() {
this.clearGrid();
+ // clearGrid should remove any back buffer from the layer,
+ // so no need to call removeBackBuffer here
+
this.grid = null;
this.tileSize = null;
OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments);
@@ -173,6 +211,7 @@
}
}
this.grid = [];
+ this.gridResolution = null;
}
},
@@ -205,6 +244,7 @@
// we do not want to copy reference to grid, so we make a new array
obj.grid = [];
+ obj.gridResolution = null;
return obj;
},
@@ -221,8 +261,9 @@
* dragging - {Boolean}
*/
moveTo:function(bounds, zoomChanged, dragging) {
+
OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments);
-
+
bounds = bounds || this.map.getExtent();
if (bounds != null) {
@@ -232,24 +273,69 @@
// total bounds of the tiles
var tilesBounds = this.getTilesBounds();
-
+
+ // the new map resolution
+ var resolution = this.map.getResolution();
+
+ // the server-supported resolution for the new map resolution
+ var serverResolution = this.getServerResolution(resolution);
+
if (this.singleTile) {
// We want to redraw whenever even the slightest part of the
// current bounds is not contained by our tile.
// (thus, we do not specify partial -- its default is false)
- if ( forceReTile ||
+
+ if ( forceReTile ||
(!dragging && !tilesBounds.containsBounds(bounds))) {
+
+ // In single tile mode with no transition effect, we insert
+ // a non-scaled backbuffer when the layer is moved. But if
+ // a zoom occurs right after a move, i.e. before the new
+ // image is received, we need to remove the backbuffer, or
+ // an ill-positioned image will be visible during the zoom
+ // transition.
+
+ if(zoomChanged && this.transitionEffect !== 'resize') {
+ this.removeBackBuffer();
+ }
+
+ if(!zoomChanged || this.transitionEffect === 'resize') {
+ this.applyBackBuffer(serverResolution);
+ }
+
this.initSingleTile(bounds);
}
} else {
-
+
// if the bounds have changed such that they are not even
// *partially* contained by our tiles (IE user has
// programmatically panned to the other side of the earth)
// then we want to reTile (thus, partial true).
- //
- if (forceReTile || !tilesBounds.containsBounds(bounds, true)) {
+
+ forceReTile = forceReTile ||
+ !tilesBounds.containsBounds(bounds, true);
+
+ if(resolution !== serverResolution) {
+ bounds = this.map.calculateBounds(null, serverResolution);
+ if(forceReTile) {
+ // stretch the layer div
+ var scale = serverResolution / resolution;
+ this.transformDiv(scale);
+ }
+ } else {
+ // reset the layer width, height, left, top, to deal with
+ // the case where the layer was previously transformed
+ this.div.style.width = '100%';
+ this.div.style.height = '100%';
+ this.div.style.left = '0%';
+ this.div.style.top = '0%';
+ }
+
+ if(forceReTile) {
+ if(zoomChanged && this.transitionEffect === 'resize') {
+ this.applyBackBuffer(serverResolution);
+ }
this.initGriddedTiles(bounds);
} else {
this.scheduleMoveGriddedTiles();
@@ -259,6 +345,177 @@
},
/**
+ * Method: getServerResolution
+ * Return the closest highest server-supported resolution. Throw an
+ * exception if none is found in the serverResolutions array.
+ *
+ * Parameters:
+ * resolution - {Number} The base resolution. If undefined the
+ * map resolution is used.
+ *
+ * Returns:
+ * {Number} The closest highest server resolution value.
+ */
+ getServerResolution: function(resolution) {
+ resolution = resolution || this.map.getResolution();
+ if(this.serverResolutions &&
+ OpenLayers.Util.indexOf(this.serverResolutions, resolution) === -1) {
+ var i, serverResolution;
+ for(i=this.serverResolutions.length-1; i>= 0; i--) {
+ serverResolution = this.serverResolutions[i];
+ if(serverResolution > resolution) {
+ resolution = serverResolution;
+ break;
+ }
+ }
+ if(i === -1) {
+ throw 'no appropriate resolution in serverResolutions';
+ }
+ }
+ return resolution;
+ },
+
+ /**
+ * Method: getServerZoom
+ * Return the zoom value corresponding to the best zoom supported by the server
+ * resolution.
+ *
+ * Returns:
+ * {Number} The closest server supported zoom.
+ */
+ getServerZoom: function() {
+ return this.map.getZoomForResolution(this.getServerResolution());
+ },
+
+ /**
+ * Method: transformDiv
+ * Transform the layer div.
+ *
+ * Parameters:
+ * scale - {Number} The value by which the layer div is to
+ * be scaled.
+ */
+ transformDiv: function(scale) {
+
+ // scale the layer div
+
+ this.div.style.width = 100 * scale + '%';
+ this.div.style.height = 100 * scale + '%';
+
+ // and translate the layer div as necessary
+
+ var size = this.map.getSize();
+ var lcX = parseInt(this.map.layerContainerDiv.style.left, 10);
+ var lcY = parseInt(this.map.layerContainerDiv.style.top, 10);
+ var x = (lcX - (size.w / 2.0)) * (scale - 1);
+ var y = (lcY - (size.h / 2.0)) * (scale - 1);
+
+ this.div.style.left = x + '%';
+ this.div.style.top = y + '%';
+ },
+
+ /**
+ * Method: getResolutionScale
+ * Return the value by which the layer is currently scaled.
+ *
+ * Returns:
+ * {Number} The resolution scale.
+ */
+ getResolutionScale: function() {
+ return parseInt(this.div.style.width, 10) / 100;
+ },
+
+ /**
+ * Method: applyBackBuffer
+ * Create, insert, scale and position a back buffer for the layer.
+ *
+ * Parameters:
+ * resolution - {Number} The resolution to transition to.
+ */
+ applyBackBuffer: function(resolution) {
+ var backBuffer = this.backBuffer;
+ if(!backBuffer) {
+ backBuffer = this.createBackBuffer();
+ if(!backBuffer) {
+ return;
+ }
+ this.div.insertBefore(backBuffer, this.div.firstChild);
+ this.backBuffer = backBuffer;
+
+ // set some information in the instance for subsequent
+ // calls to applyBackBuffer where the same back buffer
+ // is reused
+ var topLeftTileBounds = this.grid[0][0].bounds;
+ this.backBufferLonLat = {
+ lon: topLeftTileBounds.left,
+ lat: topLeftTileBounds.top
+ };
+ this.backBufferResolution = this.gridResolution;
+ }
+
+ var style = backBuffer.style;
+
+ // scale the back buffer
+ var ratio = this.backBufferResolution / resolution;
+ style.width = 100 * ratio + '%';
+ style.height = 100 * ratio + '%';
+
+ // and position it (based on the grid's top-left corner)
+ var position = this.getViewPortPxFromLonLat(
+ this.backBufferLonLat, resolution);
+ var leftOffset = parseInt(this.map.layerContainerDiv.style.left, 10);
+ var topOffset = parseInt(this.map.layerContainerDiv.style.top, 10);
+ backBuffer.style.left = (position.x - leftOffset) + '%';
+ backBuffer.style.top = (position.y - topOffset) + '%';
+ },
+
+ /**
+ * Method: createBackBuffer
+ * Create a back buffer.
+ *
+ * Returns:
+ * {DOMElement} The DOM element for the back buffer, undefined if the
+ * grid isn't initialized yet.
+ */
+ createBackBuffer: function() {
+ var backBuffer;
+ if(this.grid.length > 0) {
+ backBuffer = document.createElement('div');
+ backBuffer.id = this.div.id + '_bb';
+ backBuffer.className = 'olBackBuffer';
+ backBuffer.style.position = 'absolute';
+ backBuffer.style.width = '100%';
+ backBuffer.style.height = '100%';
+ for(var i=0, lenI=this.grid.length; i<lenI; i++) {
+ for(var j=0, lenJ=this.grid[i].length; j<lenJ; j++) {
+ var tile = this.grid[i][j].createBackBuffer();
+ if(!tile) {
+ continue;
+ }
+ // to be able to correctly position the back buffer we
+ // place the tiles grid at (0, 0) in the back buffer
+ tile.style.top = (i * this.tileSize.h) + '%';
+ tile.style.left = (j * this.tileSize.w) + '%';
+ backBuffer.appendChild(tile);
+ }
+ }
+ }
+ return backBuffer;
+ },
+
+ /**
+ * Method: removeBackBuffer
+ * Remove back buffer from DOM.
+ */
+ removeBackBuffer: function() {
+ if(this.backBuffer && this.backBuffer.parentNode) {
+ this.div.removeChild(this.backBuffer);
+ this.backBuffer = null;
+ this.backBufferResolution = null;
+ }
+ },
+
+ /**
* Method: moveByPx
* Move the layer based on pixel vector.
*
@@ -387,6 +644,9 @@
//remove all but our single tile
this.removeExcessTiles(1,1);
+
+ // store the resolution of the grid
+ this.gridResolution = this.getServerResolution();
},
/**
@@ -403,6 +663,12 @@
* tileoffsetlat, tileoffsetx, tileoffsety
*/
calculateGridLayout: function(bounds, origin, resolution) {
+ bounds = bounds.clone();
+ var map = this.map;
+ if (map.wrapDateLine) {
+ bounds = bounds.wrapDateLine(map.getMaxExtent());
+ }
+
var tilelon = resolution * this.tileSize.w;
var tilelat = resolution * this.tileSize.h;
@@ -459,7 +725,7 @@
* bounds - {<OpenLayers.Bounds>}
*/
initGriddedTiles:function(bounds) {
-
+
// work out mininum number of rows and columns; this is the number of
// tiles required to cover the viewport plus at least one for panning
@@ -470,7 +736,7 @@
Math.max(1, 2 * this.buffer);
var origin = this.getTileOrigin();
- var resolution = this.map.getResolution();
+ var resolution = this.getServerResolution();
var tileLayout = this.calculateGridLayout(bounds, origin, resolution);
@@ -492,7 +758,7 @@
var layerContainerDivLeft = parseInt(this.map.layerContainerDiv.style.left);
var layerContainerDivTop = parseInt(this.map.layerContainerDiv.style.top);
-
+
do {
var row = this.grid[rowidx++];
@@ -541,6 +807,9 @@
//shave off exceess rows and colums
this.removeExcessTiles(rowidx, colidx);
+ // store the resolution of the grid
+ this.gridResolution = this.getServerResolution();
+
//now actually draw the tiles
this.spiralTileLoad();
},
@@ -671,6 +940,7 @@
//if that was the last tile, then trigger a 'loadend' on the layer
if (this.numLoadingTiles == 0) {
this.events.triggerEvent("loadend");
+ this.removeBackBuffer();
}
};
tile.events.register("loadend", this, tile.onLoadEnd);
@@ -701,17 +971,25 @@
moveGriddedTiles: function() {
var shifted = true;
var buffer = this.buffer || 1;
- var tlLayer = this.grid[0][0].position;
+ var scale = this.getResolutionScale();
+ var tlLayer = this.grid[0][0].position.clone();
+ tlLayer.x *= scale;
+ tlLayer.y *= scale;
+ tlLayer = tlLayer.add(parseInt(this.div.style.left, 10),
+ parseInt(this.div.style.top, 10));
var offsetX = parseInt(this.map.layerContainerDiv.style.left);
var offsetY = parseInt(this.map.layerContainerDiv.style.top);
var tlViewPort = tlLayer.add(offsetX, offsetY);
- if (tlViewPort.x > -this.tileSize.w * (buffer - 1)) {
+ var tileSize = this.tileSize.clone();
+ tileSize.w *= scale;
+ tileSize.h *= scale;
+ if (tlViewPort.x > -tileSize.w * (buffer - 1)) {
this.shiftColumn(true);
- } else if (tlViewPort.x < -this.tileSize.w * buffer) {
+ } else if (tlViewPort.x < -tileSize.w * buffer) {
this.shiftColumn(false);
- } else if (tlViewPort.y > -this.tileSize.h * (buffer - 1)) {
+ } else if (tlViewPort.y > -tileSize.h * (buffer - 1)) {
this.shiftRow(true);
- } else if (tlViewPort.y < -this.tileSize.h * buffer) {
+ } else if (tlViewPort.y < -tileSize.h * buffer) {
this.shiftRow(false);
} else {
shifted = false;
@@ -737,7 +1015,7 @@
var grid = this.grid;
var modelRow = grid[modelRowIndex];
- var resolution = this.map.getResolution();
+ var resolution = this.getServerResolution();
var deltaY = (prepend) ? -this.tileSize.h : this.tileSize.h;
var deltaLat = resolution * -deltaY;
@@ -770,7 +1048,7 @@
*/
shiftColumn: function(prepend) {
var deltaX = (prepend) ? -this.tileSize.w : this.tileSize.w;
- var resolution = this.map.getResolution();
+ var resolution = this.getServerResolution();
var deltaLon = resolution * deltaX;
for (var i=0, len=this.grid.length; i<len; i++) {
@@ -793,7 +1071,7 @@
}
}
},
-
+
/**
* Method: removeExcessTiles
* When the size of the map or the buffer changes, we may need to
@@ -866,6 +1144,6 @@
tileLeft + tileMapWidth,
tileBottom + tileMapHeight);
},
-
+
CLASS_NAME: "OpenLayers.Layer.Grid"
});
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/PointTrack.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/PointTrack.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/PointTrack.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,7 +5,6 @@
/**
* @requires OpenLayers/Layer/Vector.js
- * @requires OpenLayers/Console.js
*/
/**
@@ -19,8 +18,8 @@
OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, {
/**
- * APIProperty:
- * dataFrom - {<OpenLayers.Layer.PointTrack.TARGET_NODE>} or
+ * APIProperty: dataFrom
+ * {<OpenLayers.Layer.PointTrack.TARGET_NODE>} or
* {<OpenLayers.Layer.PointTrack.SOURCE_NODE>} optional. If the lines
* should get the data/attributes from one of the two points it is
* composed of, which one should it be?
@@ -28,8 +27,8 @@
dataFrom: null,
/**
- * APIProperty:
- * styleFrom - {<OpenLayers.Layer.PointTrack.TARGET_NODE>} or
+ * APIProperty: styleFrom
+ * {<OpenLayers.Layer.PointTrack.TARGET_NODE>} or
* {<OpenLayers.Layer.PointTrack.SOURCE_NODE>} optional. If the lines
* should get the style from one of the two points it is composed of,
* which one should it be?
@@ -64,10 +63,8 @@
*/
addNodes: function(pointFeatures, options) {
if (pointFeatures.length < 2) {
- OpenLayers.Console.error(
- "At least two point features have to be added to create" +
- "a line from");
- return;
+ throw new Error("At least two point features have to be added to " +
+ "create a line from");
}
var lines = new Array(pointFeatures.length-1);
@@ -81,9 +78,7 @@
var lonlat = pointFeature.lonlat;
endPoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
} else if(endPoint.CLASS_NAME != "OpenLayers.Geometry.Point") {
- OpenLayers.Console.error(
- "Only features with point geometries are supported.");
- return;
+ throw new TypeError("Only features with point geometries are supported.");
}
if(i > 0) {
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -87,8 +87,17 @@
/**
* APIProperty: serverResolutions
- * {Array} A list of all resolutions available on the server. Only set this
- * property if the map resolutions differs from the server.
+ * {Array} A list of all resolutions available on the server. Only set this
+ * property if the map resolutions differ from the server. This
+ * property serves two purposes. (a) <serverResolutions> can include
+ * resolutions that the server supports and that you don't want to
+ * provide with this layer; you can also look at <zoomOffset>, which is
+ * an alternative to <serverResolutions> for that specific purpose.
+ * (b) The map can work with resolutions that aren't supported by
+ * the server, i.e. that aren't in <serverResolutions>. When the
+ * map is displayed in such a resolution data for the closest
+ * server-supported resolution is loaded and the layer div is
+ * stretched as necessary.
*/
serverResolutions: null,
@@ -162,12 +171,12 @@
*/
getURL: function (bounds) {
bounds = this.adjustBounds(bounds);
- var res = this.map.getResolution();
+ var res = this.getServerResolution();
var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h));
var z = this.serverResolutions != null ?
OpenLayers.Util.indexOf(this.serverResolutions, res) :
- this.map.getZoom() + this.zoomOffset;
+ this.getServerZoom() + this.zoomOffset;
var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type;
var url = this.url;
if (OpenLayers.Util.isArray(url)) {
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -37,8 +37,15 @@
/**
* APIProperty: serverResolutions
- * {Array} A list of all resolutions available on the server. Only set this
- * property if the map resolutions differs from the server.
+ * {Array} A list of all resolutions available on the server. Only set this
+ * property if the map resolutions differ from the server. This
+ * property serves two purposes. (a) <serverResolutions> can include
+ * resolutions that the server supports and that you don't want to
+ * provide with this layer. (b) The map can work with resolutions
+ * that aren't supported by the server, i.e. that aren't in
+ * <serverResolutions>. When the map is displayed in such a resolution
+ * data for the closest server-supported resolution is loaded and the
+ * layer div is stretched as necessary.
*/
serverResolutions: null,
@@ -102,7 +109,7 @@
* passed-in bounds and appropriate tile size specified as parameters.
*/
getURL: function(bounds) {
- var res = this.map.getResolution();
+ var res = this.getServerResolution();
var bbox = this.maxExtent;
var size = this.tileSize;
var tileX = Math.round((bounds.left - bbox.left) / (res * size.w));
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -565,9 +565,8 @@
if (this.geometryType &&
!(feature.geometry instanceof this.geometryType)) {
- var throwStr = OpenLayers.i18n('componentShouldBe',
- {'geomType':this.geometryType.prototype.CLASS_NAME});
- throw throwStr;
+ throw new TypeError('addFeatures: component should be an ' +
+ this.geometryType.prototype.CLASS_NAME);
}
//give feature reference to its layer
@@ -827,8 +826,10 @@
*/
getFeatureFromEvent: function(evt) {
if (!this.renderer) {
- OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));
- return null;
+ throw new Error('getFeatureFromEvent called on layer with no ' +
+ 'renderer. This usually means you destroyed a ' +
+ 'layer, but not some handler which is associated ' +
+ 'with it.');
}
var feature = null;
var featureId = this.renderer.getFeatureIdFromEvent(evt);
@@ -948,7 +949,7 @@
* Does nothing by default. Override this if you
* need to do something on feature updates.
*
- * Paarameters:
+ * Parameters:
* feature - {<OpenLayers.Feature.Vector>}
*/
onFeatureInsert: function(feature) {
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -13,6 +13,8 @@
/**
* Class: OpenLayers.Layer.VirtualEarth
+ * *Deprecated*. Use <OpenLayers.Layer.Bing> instead.
+ *
* Instances of OpenLayers.Layer.VirtualEarth are used to display the data from
* the Bing Maps AJAX Control (see e.g.
* http://msdn.microsoft.com/library/bb429619.aspx). Create a VirtualEarth
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -150,8 +150,24 @@
* the <matrixIds> property. Defaults to 0 (no zoom offset).
*/
zoomOffset: 0,
-
+
/**
+ * APIProperty: serverResolutions
+ * {Array} A list of all resolutions available on the server. Only set this
+ * property if the map resolutions differ from the server. This
+ * property serves two purposes. (a) <serverResolutions> can include
+ * resolutions that the server supports and that you don't want to
+ * provide with this layer; you can also look at <zoomOffset>, which is
+ * an alternative to <serverResolutions> for that specific purpose.
+ * (b) The map can work with resolutions that aren't supported by
+ * the server, i.e. that aren't in <serverResolutions>. When the
+ * map is displayed in such a resolution data for the closest
+ * server-supported resolution is loaded and the layer div is
+ * stretched as necessary.
+ */
+ serverResolutions: null,
+
+ /**
* Property: formatSuffixMap
* {Object} a map between WMTS 'format' request parameter and tile image file suffix
*/
@@ -308,6 +324,17 @@
// copy/set any non-init, non-simple values here
return obj;
},
+
+ /**
+ * Method: getIdentifier
+ * Get the current index in the matrixIds array.
+ */
+ getIdentifier: function() {
+ return this.serverResolutions != null ?
+ OpenLayers.Util.indexOf(this.serverResolutions,
+ this.getServerResolution()) :
+ this.getServerZoom() + this.zoomOffset;
+ },
/**
* Method: getMatrix
@@ -316,7 +343,7 @@
getMatrix: function() {
var matrix;
if (!this.matrixIds || this.matrixIds.length === 0) {
- matrix = {identifier: this.map.getZoom() + this.zoomOffset};
+ matrix = {identifier: this.getIdentifier()};
} else {
// get appropriate matrix given the map scale if possible
if ("scaleDenominator" in this.matrixIds[0]) {
@@ -324,7 +351,7 @@
var denom =
OpenLayers.METERS_PER_INCH *
OpenLayers.INCHES_PER_UNIT[this.units] *
- this.map.getResolution() / 0.28E-3;
+ this.getServerResolution() / 0.28E-3;
var diff = Number.POSITIVE_INFINITY;
var delta;
for (var i=0, ii=this.matrixIds.length; i<ii; ++i) {
@@ -336,7 +363,7 @@
}
} else {
// fall back on zoom as index
- matrix = this.matrixIds[this.map.getZoom() + this.zoomOffset];
+ matrix = this.matrixIds[this.getIdentifier()];
}
}
return matrix;
@@ -356,7 +383,7 @@
* (respectively) of the given location within the target tile.
*/
getTileInfo: function(loc) {
- var res = this.map.getResolution();
+ var res = this.getServerResolution();
var fx = (loc.lon - this.tileOrigin.lon) / (res * this.tileSize.w);
var fy = (this.tileOrigin.lat - loc.lat) / (res * this.tileSize.h);
Modified: sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -49,7 +49,16 @@
/**
* APIProperty: serverResolutions
* {Array} A list of all resolutions available on the server. Only set this
- * property if the map resolutions differs from the server.
+ * property if the map resolutions differ from the server. This
+ * property serves two purposes. (a) <serverResolutions> can include
+ * resolutions that the server supports and that you don't want to
+ * provide with this layer; you can also look at <zoomOffset>, which is
+ * an alternative to <serverResolutions> for that specific purpose.
+ * (b) The map can work with resolutions that aren't supported by
+ * the server, i.e. that aren't in <serverResolutions>. When the
+ * map is displayed in such a resolution data for the closest
+ * server-supported resolution is loaded and the layer div is
+ * stretched as necessary.
*/
serverResolutions: null,
@@ -139,7 +148,7 @@
* {Object} - an object with x, y and z properties.
*/
getXYZ: function(bounds) {
- var res = this.map.getResolution();
+ var res = this.getServerResolution();
var x = Math.round((bounds.left - this.maxExtent.left) /
(res * this.tileSize.w));
var y = Math.round((this.maxExtent.top - bounds.top) /
@@ -147,7 +156,7 @@
var resolutions = this.serverResolutions || this.resolutions;
var z = this.zoomOffset == 0 ?
OpenLayers.Util.indexOf(resolutions, res) :
- this.map.getZoom() + this.zoomOffset;
+ this.getServerZoom() + this.zoomOffset;
var limit = Math.pow(2, z);
if (this.wrapDateLine)
Modified: sandbox/august/trunk/lib/OpenLayers/Layer.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Layer.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -293,7 +293,10 @@
/**
* APIProperty: wrapDateLine
- * {Boolean} #487 for more info.
+ * {Boolean} Wraps the world at the international dateline, so the map can
+ * be panned infinitely in longitudinal direction. Only use this on the
+ * base layer, and only if the layer's maxExtent equals the world bounds.
+ * #487 for more info.
*/
wrapDateLine: false,
@@ -312,13 +315,6 @@
transitionEffect: null,
/**
- * Property: SUPPORTED_TRANSITIONS
- * {Array} An immutable (that means don't change it!) list of supported
- * transitionEffect values.
- */
- SUPPORTED_TRANSITIONS: ['resize'],
-
- /**
* Property: metadata
* {Object} This object can be used to store additional information on a
* layer object.
@@ -1242,11 +1238,11 @@
* {<OpenLayers.Pixel>} An <OpenLayers.Pixel> which is the passed-in
* <OpenLayers.LonLat>,translated into view port pixels.
*/
- getViewPortPxFromLonLat: function (lonlat) {
+ getViewPortPxFromLonLat: function (lonlat, resolution) {
var px = null;
if (lonlat != null) {
- var resolution = this.map.getResolution();
- var extent = this.map.getExtent();
+ resolution = resolution || this.map.getResolution();
+ var extent = this.map.calculateBounds(null, resolution);
px = new OpenLayers.Pixel(
(1/resolution * (lonlat.lon - extent.left)),
(1/resolution * (extent.top - lonlat.lat))
Modified: sandbox/august/trunk/lib/OpenLayers/Map.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Map.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Map.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -8,8 +8,6 @@
* @requires OpenLayers/Util.js
* @requires OpenLayers/Events.js
* @requires OpenLayers/Tween.js
- * @requires OpenLayers/Console.js
- * @requires OpenLayers/Lang.js
*/
/**
@@ -238,20 +236,6 @@
*/
panRatio: 1.5,
- /**
- * Property: viewRequestID
- * {String} Used to store a unique identifier that changes when the map
- * view changes. viewRequestID should be used when adding data
- * asynchronously to the map: viewRequestID is incremented when
- * you initiate your request (right now during changing of
- * baselayers and changing of zooms). It is stored here in the
- * map and also in the data that will be coming back
- * asynchronously. Before displaying this data on request
- * completion, we check that the viewRequestID of the data is
- * still the same as that of the map. Fix for #480
- */
- viewRequestID: 0,
-
// Options
/**
@@ -315,11 +299,11 @@
/**
* APIProperty: maxExtent
* {<OpenLayers.Bounds>} 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 <restrictedExtent> instead. The value
+ * for <maxExtent> will change calculations for tile URLs.
*/
maxExtent: null,
@@ -536,6 +520,8 @@
// the layerContainerDiv is the one that holds all the layers
id = this.id + "_OpenLayers_Container";
this.layerContainerDiv = OpenLayers.Util.createDiv(id);
+ this.layerContainerDiv.style.width = '100px';
+ this.layerContainerDiv.style.height = '100px';
this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;
this.eventsDiv.appendChild(this.layerContainerDiv);
@@ -946,12 +932,10 @@
* layer - {<OpenLayers.Layer>}
*/
addLayer: function (layer) {
- for(var i=0, len=this.layers.length; i <len; i++) {
+ for(var i = 0, len = this.layers.length; i < len; i++) {
if (this.layers[i] == layer) {
- var msg = OpenLayers.i18n('layerAlreadyAdded',
- {'layerName':layer.name});
- OpenLayers.Console.warn(msg);
- return false;
+ throw new Error("You tried to add the layer: " + layer.name +
+ " to the map, but it has already been added");
}
}
if (this.events.triggerEvent("preaddlayer", {layer: layer}) === false) {
@@ -960,7 +944,6 @@
if(this.allOverlays) {
layer.isBaseLayer = false;
}
-
layer.div.className = "olLayerDiv";
layer.div.style.overflow = "";
@@ -1174,10 +1157,6 @@
// set new baselayer
this.baseLayer = newBaseLayer;
- // Increment viewRequestID since the baseLayer is
- // changing. This is used by tiles to check if they should
- // draw themselves.
- this.viewRequestID++;
if(!this.allOverlays || this.baseLayer.visibility) {
this.baseLayer.setVisibility(true);
}
@@ -1695,14 +1674,6 @@
parseInt(this.layerContainerDiv.style.left) - dx + "px";
this.minPx.x -= dx;
this.maxPx.x -= dx;
- if (wrapDateLine) {
- if (this.maxPx.x > maxX) {
- this.maxPx.x -= (maxX - minX);
- }
- if (this.minPx.x < minX) {
- this.minPx.x += (maxX - minX);
- }
- }
}
if (dy) {
this.layerContainerDiv.style.top =
@@ -1827,8 +1798,6 @@
if (zoomChanged) {
this.zoom = zoom;
this.resolution = res;
- // zoom level has changed, increment viewRequestID.
- this.viewRequestID++;
}
var bounds = this.getExtent();
@@ -1940,7 +1909,8 @@
var valid = false;
if (lonlat != null) {
var maxExtent = this.getMaxExtent();
- valid = maxExtent.containsLonLat(lonlat);
+ var worldBounds = this.baseLayer.wrapDateLine && maxExtent;
+ valid = maxExtent.containsLonLat(lonlat, {worldBounds: worldBounds});
}
return valid;
},
@@ -2254,10 +2224,7 @@
}
//if the bounds was straddling (see above), then the center point
// we got from it was wrong. So we take our new bounds and ask it
- // for the center. Because our new bounds is at least partially
- // outside the bounds of maxExtent, the new calculated center
- // might also be. We don't want to pass a bad center value to
- // setCenter, so we have it wrap itself across the date line.
+ // for the center.
//
center = bounds.getCenterLonLat().wrapDateLine(maxExtent);
}
Modified: sandbox/august/trunk/lib/OpenLayers/Renderer/Canvas.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/Canvas.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/Canvas.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -70,6 +70,25 @@
}
},
+ /**
+ * Method: setExtent
+ * Set the visible part of the layer.
+ *
+ * Parameters:
+ * extent - {<OpenLayers.Bounds>}
+ * resolutionChanged - {Boolean}
+ *
+ * Returns:
+ * {Boolean} true to notify the layer that the new extent does not exceed
+ * the coordinate range, and the features will not need to be redrawn.
+ * False otherwise.
+ */
+ setExtent: function() {
+ OpenLayers.Renderer.prototype.setExtent.apply(this, arguments);
+ // always redraw features
+ return false;
+ },
+
/**
* Method: eraseGeometry
* Erase a geometry from the renderer. Because the Canvas renderer has
@@ -141,8 +160,15 @@
style = this.applyDefaultSymbolizer(style || feature.style);
// don't render if display none or feature outside extent
var bounds = feature.geometry.getBounds();
- rendered = (style.display !== "none") && !!bounds &&
- bounds.intersectsBounds(this.extent);
+
+ var worldBounds;
+ if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {
+ worldBounds = this.map.getMaxExtent();
+ }
+
+ var intersects = bounds && bounds.intersectsBounds(this.extent, {worldBounds: worldBounds});
+
+ rendered = (style.display !== "none") && !!bounds && intersects;
if (rendered) {
// keep track of what we have rendered for redraw
this.features[feature.id] = [feature, style];
@@ -573,7 +599,7 @@
getLocalXY: function(point) {
var resolution = this.getResolution();
var extent = this.extent;
- var x = (point.x / resolution + (-extent.left / resolution));
+ var x = ((point.x - this.featureDx) / resolution + (-extent.left / resolution));
var y = ((extent.top / resolution) - point.y / resolution);
return [x, y];
},
@@ -659,12 +685,15 @@
this.hitContext.clearRect(0, 0, width, height);
}
var labelMap = [];
- var feature, style;
+ var feature, geometry, style;
+ var worldBounds = (this.map.baseLayer && this.map.baseLayer.wrapDateLine) && this.map.getMaxExtent();
for (var id in this.features) {
if (!this.features.hasOwnProperty(id)) { continue; }
feature = this.features[id][0];
+ geometry = feature.geometry;
+ this.calculateFeatureDx(geometry.getBounds(), worldBounds);
style = this.features[id][1];
- this.drawGeometry(feature.geometry, style, feature.id);
+ this.drawGeometry(geometry, style, feature.id);
if(style.label) {
labelMap.push([feature, style]);
}
Modified: sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -374,6 +374,28 @@
xmlns: null,
/**
+ * Property: xOffset
+ * {Number} Offset to apply to the renderer viewport translation in x
+ * direction. If the renderer extent's center is on the right of the
+ * dateline (i.e. exceeds the world bounds), we shift the viewport to the
+ * left by one world width. This avoids that features disappear from the
+ * map viewport. Because our dateline handling logic in other places
+ * ensures that extents crossing the dateline always have a center
+ * exceeding the world bounds on the left, we need this offset to make sure
+ * that the same is true for the renderer extent in pixel space as well.
+ */
+ xOffset: 0,
+
+ /**
+ * Property: rightOfDateLine
+ * {Boolean} Keeps track of the location of the map extent relative to the
+ * date line. The <setExtent> method compares this value (which is the one
+ * from the previous <setExtent> call) with the current position of the map
+ * extent relative to the date line and updates the xOffset when the extent
+ * has moved from one side of the date line to the other.
+ */
+
+ /**
* Property: Indexer
* {<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer
* created upon initialization if the zIndexing or yOrdering options
@@ -458,6 +480,41 @@
this.indexer.clear();
}
},
+
+ /**
+ * Method: setExtent
+ * Set the visible part of the layer.
+ *
+ * Parameters:
+ * extent - {<OpenLayers.Bounds>}
+ * resolutionChanged - {Boolean}
+ *
+ * Returns:
+ * {Boolean} true to notify the layer that the new extent does not exceed
+ * the coordinate range, and the features will not need to be redrawn.
+ * False otherwise.
+ */
+ setExtent: function(extent, resolutionChanged) {
+ var coordSysUnchanged = OpenLayers.Renderer.prototype.setExtent.apply(this, arguments);
+ var resolution = this.getResolution();
+ if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {
+ coordSysUnchanged = this.featureDx === 0;
+ var rightOfDateLine,
+ world = this.map.getMaxExtent();
+ if (world.right > extent.left && world.right < extent.right) {
+ rightOfDateLine = true;
+ } else if (world.left > extent.left && world.left < extent.right) {
+ rightOfDateLine = false;
+ }
+ if (rightOfDateLine !== this.rightOfDateLine || resolutionChanged) {
+ coordSysUnchanged = false;
+ this.xOffset = rightOfDateLine === true ?
+ world.getWidth() / resolution : 0;
+ }
+ this.rightOfDateLine = rightOfDateLine;
+ }
+ return coordSysUnchanged;
+ },
/**
* Method: getNodeType
Modified: sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -114,12 +114,11 @@
* False otherwise.
*/
setExtent: function(extent, resolutionChanged) {
- OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,
- arguments);
+ var coordSysUnchanged = OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, arguments);
- var resolution = this.getResolution();
- var left = -extent.left / resolution;
- var top = extent.top / resolution;
+ var resolution = this.getResolution(),
+ left = -extent.left / resolution,
+ top = extent.top / resolution;
// If the resolution has changed, start over changing the corner, because
// the features will redraw.
@@ -130,15 +129,15 @@
var extentString = "0 0 " + this.size.w + " " + this.size.h;
this.rendererRoot.setAttributeNS(null, "viewBox", extentString);
- this.translate(0, 0);
+ this.translate(this.xOffset, 0);
return true;
} else {
- var inRange = this.translate(left - this.left, 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);
}
- return inRange;
+ return coordSysUnchanged && inRange;
}
},
@@ -505,7 +504,7 @@
*/
drawCircle: function(node, geometry, radius) {
var resolution = this.getResolution();
- var x = (geometry.x / resolution + this.left);
+ var x = ((geometry.x - this.featureDx) / resolution + this.left);
var y = (this.top - geometry.y / resolution);
if (this.inValidRange(x, y)) {
@@ -615,7 +614,7 @@
*/
drawRectangle: function(node, geometry) {
var resolution = this.getResolution();
- var x = (geometry.x / resolution + this.left);
+ var x = ((geometry.x - this.featureDx) / resolution + this.left);
var y = (this.top - geometry.y / resolution);
if (this.inValidRange(x, y)) {
@@ -681,7 +680,7 @@
drawText: function(featureId, style, location) {
var resolution = this.getResolution();
- var x = (location.x / resolution + this.left);
+ var x = ((location.x - this.featureDx) / resolution + this.left);
var y = (location.y / resolution - this.top);
var label = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX, "text");
@@ -833,9 +832,9 @@
var resolution = this.getResolution();
var maxX = this.MAX_PIXEL - this.translationParameters.x;
var maxY = this.MAX_PIXEL - this.translationParameters.y;
- var x1 = goodComponent.x / resolution + this.left;
+ var x1 = (goodComponent.x - this.featureDx) / resolution + this.left;
var y1 = this.top - goodComponent.y / resolution;
- var x2 = badComponent.x / resolution + this.left;
+ var x2 = (badComponent.x - this.featureDx) / resolution + this.left;
var y2 = this.top - badComponent.y / resolution;
var k;
if (x2 < -maxX || x2 > maxX) {
@@ -862,7 +861,7 @@
*/
getShortString: function(point) {
var resolution = this.getResolution();
- var x = (point.x / resolution + this.left);
+ var x = ((point.x - this.featureDx) / resolution + this.left);
var y = (this.top - point.y / resolution);
if (this.inValidRange(x, y)) {
@@ -908,7 +907,7 @@
var id = this.container.id + "-" + graphicName;
// check if symbol already exists in the defs
- var existing = document.getElementById(id)
+ var existing = document.getElementById(id);
if (existing != null) {
return existing;
}
Modified: sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -90,8 +90,7 @@
* the coordinate range, and the features will not need to be redrawn.
*/
setExtent: function(extent, resolutionChanged) {
- OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,
- arguments);
+ var coordSysUnchanged = OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, arguments);
var resolution = this.getResolution();
var left = (extent.left/resolution) | 0;
@@ -106,7 +105,7 @@
}
- var org = left + " " + top;
+ var org = (left - this.xOffset) + " " + top;
this.root.coordorigin = org;
var roots = [this.root, this.vectorRoot, this.textRoot];
var root;
@@ -121,7 +120,7 @@
// matches the display Y axis of the map
this.root.style.flip = "y";
- return true;
+ return coordSysUnchanged;
},
@@ -226,7 +225,7 @@
var yOffset = (style.graphicYOffset != undefined) ?
style.graphicYOffset : -(0.5 * height);
- node.style.left = (((geometry.x/resolution - this.offset.x)+xOffset) | 0) + "px";
+ node.style.left = ((((geometry.x - this.featureDx)/resolution - this.offset.x)+xOffset) | 0) + "px";
node.style.top = (((geometry.y/resolution - this.offset.y)-(yOffset+height)) | 0) + "px";
node.style.width = width + "px";
node.style.height = height + "px";
@@ -483,9 +482,9 @@
var resolution = this.getResolution();
var scaledBox =
- new OpenLayers.Bounds((bbox.left/resolution - this.offset.x) | 0,
+ new OpenLayers.Bounds(((bbox.left - this.featureDx)/resolution - this.offset.x) | 0,
(bbox.bottom/resolution - this.offset.y) | 0,
- (bbox.right/resolution - this.offset.x) | 0,
+ ((bbox.right - this.featureDx)/resolution - this.offset.x) | 0,
(bbox.top/resolution - this.offset.y) | 0);
// Set the internal coordinate system to draw the path
@@ -652,7 +651,7 @@
if(!isNaN(geometry.x)&& !isNaN(geometry.y)) {
var resolution = this.getResolution();
- node.style.left = (((geometry.x /resolution - this.offset.x) | 0) - radius) + "px";
+ node.style.left = ((((geometry.x - this.featureDx) /resolution - this.offset.x) | 0) - radius) + "px";
node.style.top = (((geometry.y /resolution - this.offset.y) | 0) - radius) + "px";
var diameter = radius * 2;
@@ -718,7 +717,7 @@
var comp, x, y;
for (var i = 0; i < numComponents; i++) {
comp = geometry.components[i];
- x = (comp.x/resolution - this.offset.x) | 0;
+ x = ((comp.x - this.featureDx)/resolution - this.offset.x) | 0;
y = (comp.y/resolution - this.offset.y) | 0;
parts[i] = " " + x + "," + y + " l ";
}
@@ -754,7 +753,7 @@
second = null;
for (i=0, ii=points.length; i<ii; i++) {
comp = points[i];
- x = (comp.x / resolution - this.offset.x) | 0;
+ x = ((comp.x - this.featureDx) / resolution - this.offset.x) | 0;
y = (comp.y / resolution - this.offset.y) | 0;
pathComp = " " + x + "," + y;
path.push(pathComp);
@@ -801,7 +800,7 @@
drawRectangle: function(node, geometry) {
var resolution = this.getResolution();
- node.style.left = ((geometry.x/resolution - this.offset.x) | 0) + "px";
+ node.style.left = (((geometry.x - this.featureDx)/resolution - this.offset.x) | 0) + "px";
node.style.top = ((geometry.y/resolution - this.offset.y) | 0) + "px";
node.style.width = ((geometry.width/resolution) | 0) + "px";
node.style.height = ((geometry.height/resolution) | 0) + "px";
@@ -823,7 +822,7 @@
var textbox = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + "_textbox", "olv:textbox");
var resolution = this.getResolution();
- label.style.left = ((location.x/resolution - this.offset.x) | 0) + "px";
+ label.style.left = (((location.x - this.featureDx)/resolution - this.offset.x) | 0) + "px";
label.style.top = ((location.y/resolution - this.offset.y) | 0) + "px";
label.style.flip = "y";
@@ -900,7 +899,7 @@
var comp, x, y;
for (var i=0, len=geometry.components.length; i<len; i++) {
comp = geometry.components[i];
- x = (comp.x / resolution - this.offset.x) | 0;
+ x = ((comp.x - this.featureDx) / resolution - this.offset.x) | 0;
y = (comp.y / resolution - this.offset.y) | 0;
if ((i%3)==0 && (i/3)==0) {
path.push("m");
Modified: sandbox/august/trunk/lib/OpenLayers/Renderer.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -74,6 +74,14 @@
map: null,
/**
+ * Property: featureDx
+ * {Number} Feature offset in x direction. Will be calculated for and
+ * applied to the current feature while rendering (see
+ * <calculateFeatureDx>).
+ */
+ featureDx: 0,
+
+ /**
* Constructor: OpenLayers.Renderer
*
* Parameters:
@@ -122,12 +130,21 @@
* Parameters:
* extent - {<OpenLayers.Bounds>}
* resolutionChanged - {Boolean}
+ *
+ * Returns:
+ * {Boolean} true to notify the layer that the new extent does not exceed
+ * the coordinate range, and the features will not need to be redrawn.
+ * False otherwise.
*/
setExtent: function(extent, resolutionChanged) {
this.extent = extent.clone();
+ if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {
+ this.extent = extent.wrapDateLine(this.map.getMaxExtent());
+ }
if (resolutionChanged) {
this.resolution = null;
}
+ return true;
},
/**
@@ -179,11 +196,18 @@
if (feature.geometry) {
var bounds = feature.geometry.getBounds();
if(bounds) {
- if (!bounds.intersectsBounds(this.extent)) {
+ var worldBounds;
+ if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {
+ worldBounds = this.map.getMaxExtent();
+ }
+ if (!bounds.intersectsBounds(this.extent, {worldBounds: worldBounds})) {
style = {display: "none"};
+ } else {
+ this.calculateFeatureDx(bounds, worldBounds);
}
var rendered = this.drawGeometry(feature.geometry, style, feature.id);
if(style.display != "none" && style.label && rendered !== false) {
+
var location = feature.geometry.getCentroid();
if(style.labelXOffset || style.labelYOffset) {
var xOffset = isNaN(style.labelXOffset) ? 0 : style.labelXOffset;
@@ -200,6 +224,29 @@
}
},
+ /**
+ * Method: calculateFeatureDx
+ * {Number} Calculates the feature offset in x direction. Looking at the
+ * center of the feature bounds and the renderer extent, we calculate how
+ * many world widths the two are away from each other. This distance is
+ * used to shift the feature as close as possible to the center of the
+ * current enderer extent, which ensures that the feature is visible in the
+ * current viewport.
+ *
+ * Parameters:
+ * bounds - {<OpenLayers.Bounds>} Bounds of the feature
+ * worldBounds - {<OpenLayers.Bounds>} Bounds of the world
+ */
+ calculateFeatureDx: function(bounds, worldBounds) {
+ this.featureDx = 0;
+ if (worldBounds) {
+ var worldWidth = worldBounds.getWidth(),
+ rendererCenterX = (this.extent.left + this.extent.right) / 2,
+ featureCenterX = (bounds.left + bounds.right) / 2,
+ worldsAway = Math.round((featureCenterX - rendererCenterX) / worldWidth);
+ this.featureDx = worldsAway * worldWidth;
+ }
+ },
/**
* Method: drawGeometry
Modified: sandbox/august/trunk/lib/OpenLayers/Request.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Request.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Request.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -122,6 +122,26 @@
{proxy: OpenLayers.ProxyHost}
);
config = OpenLayers.Util.applyDefaults(config, defaultConfig);
+
+ // Always set the "X-Requested-With" header to signal that this request
+ // was issued through the XHR-object. Since header keys are case
+ // insensitive and we want to allow overriding of the "X-Requested-With"
+ // header through the user we cannot use applyDefaults, but have to
+ // check manually whether we were called with a "X-Requested-With"
+ // header.
+ var customRequestedWithHeader = false,
+ headerKey;
+ for(headerKey in config.headers) {
+ if (config.headers.hasOwnProperty( headerKey )) {
+ if (headerKey.toLowerCase() === 'x-requested-with') {
+ customRequestedWithHeader = true;
+ }
+ }
+ }
+ if (customRequestedWithHeader === false) {
+ // we did not have a custom "X-Requested-With" header
+ config.headers['X-Requested-With'] = 'XMLHttpRequest';
+ }
// create request, open, and set headers
var request = new OpenLayers.Request.XMLHttpRequest();
Modified: sandbox/august/trunk/lib/OpenLayers/Style.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Style.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Style.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -191,7 +191,7 @@
style.display = "none";
}
- if (style.label && typeof style.label !== "string") {
+ if (style.label != null && typeof style.label !== "string") {
style.label = String(style.label);
}
Modified: sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -15,9 +15,6 @@
*
* This mixin will be applied to <OpenLayers.Tile.Image> instances
* configured with <OpenLayers.Tile.Image.maxGetUrlLength> set.
- *
- * Inherits from:
- * - <OpenLayers.Tile.Image>
*/
OpenLayers.Tile.Image.IFrame = {
@@ -29,40 +26,52 @@
useIFrame: null,
/**
- * Method: updateBackBuffer
- * Update the <backBufferData>, and return a new or reposition the
- * backBuffer. When a backbuffer is returned, the tile's markup is not
- * available any more.
- *
- * Returns:
- * {HTMLDivElement} the tile's markup in a cloned element, or undefined if
- * no backbuffer is currently available or needed
+ * Method: draw
+ * Set useIFrame in the instance, and operate the image/iframe switch.
+ * Then call Tile.Image.draw.
+ *
+ * Returns:
+ * {Boolean}
*/
- updateBackBuffer: function() {
- this.url = this.layer.getURL(this.bounds);
- var usedIFrame = this.useIFrame;
- this.useIFrame = this.maxGetUrlLength !== null && !this.layer.async &&
- this.url.length > this.maxGetUrlLength;
- var fromIFrame = usedIFrame && !this.useIFrame;
- var toIFrame = !usedIFrame && this.useIFrame;
- if (fromIFrame || toIFrame) {
- // switch between get (image) and post (iframe)
- this.clear();
- if (this.imgDiv && this.imgDiv.parentNode === this.frame) {
- this.frame.removeChild(this.imgDiv);
+ draw: function() {
+ var draw = OpenLayers.Tile.Image.prototype.shouldDraw.call(this);
+ if(draw) {
+
+ // this.url isn't set to the currect value yet, so we call getURL
+ // on the layer and store the result in a local variable
+ var url = this.layer.getURL(this.bounds);
+
+ var usedIFrame = this.useIFrame;
+ this.useIFrame = this.maxGetUrlLength !== null &&
+ !this.layer.async &&
+ url.length > this.maxGetUrlLength;
+
+ var fromIFrame = usedIFrame && !this.useIFrame;
+ var toIFrame = !usedIFrame && this.useIFrame;
+
+ if(fromIFrame || toIFrame) {
+
+ // Switching between GET (image) and POST (iframe).
+
+ // We remove the imgDiv (really either an image or an iframe)
+ // from the frame and set it to null to make sure initImage
+ // will call createImage.
+
+ if(this.imgDiv && this.imgDiv.parentNode === this.frame) {
+ this.frame.removeChild(this.imgDiv);
+ }
+ this.imgDiv = null;
+
+ // And if we had an iframe we also remove the event pane.
+
+ if(fromIFrame) {
+ this.frame.removeChild(this.frame.firstChild);
+ }
}
- this.imgDiv = null;
- if (fromIFrame) {
- // remove eventPane
- this.frame.removeChild(this.frame.firstChild);
- this.resetBackBuffer();
- }
}
- if (!this.useIFrame) {
- OpenLayers.Tile.Image.prototype.updateBackBuffer.apply(this, arguments);
- }
+ return OpenLayers.Tile.Image.prototype.draw.apply(this, arguments);
},
-
+
/**
* Method: createImage
* Creates the content for the frame on the tile.
@@ -183,6 +192,22 @@
} else {
OpenLayers.Tile.Image.prototype.setImgSrc.apply(this, arguments);
}
+ },
+
+ /**
+ * Method: createBackBuffer
+ * Override createBackBuffer to do nothing when we use an iframe. Moving an
+ * iframe from one element to another makes it necessary to reload the iframe
+ * because its content is lost. So we just give up.
+ *
+ * Returns:
+ * {DOMElement}
+ */
+ createBackBuffer: function() {
+ var backBuffer;
+ if(!this.useIFrame) {
+ backBuffer = OpenLayers.Tile.Image.prototype.createBackBuffer.call(this);
+ }
+ return backBuffer;
}
-
};
Modified: sandbox/august/trunk/lib/OpenLayers/Tile/Image.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Tile/Image.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Tile/Image.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,7 +5,7 @@
/**
- * @requires OpenLayers/Tile/BackBufferable.js
+ * @requires OpenLayers/Tile.js
*/
/**
@@ -15,9 +15,9 @@
* <OpenLayers.Tile.Image> constructor.
*
* Inherits from:
- * - <OpenLayers.Tile.BackBufferable>
+ * - <OpenLayers.Tile>
*/
-OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile.BackBufferable, {
+OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
/**
* Property: url
@@ -96,7 +96,7 @@
* options - {Object}
*/
initialize: function(layer, position, bounds, url, size, options) {
- OpenLayers.Tile.BackBufferable.prototype.initialize.apply(this, arguments);
+ OpenLayers.Tile.prototype.initialize.apply(this, arguments);
this.url = url; //deprecated remove me
@@ -123,7 +123,7 @@
}
// don't handle async requests any more
this.asyncRequestId = null;
- OpenLayers.Tile.BackBufferable.prototype.destroy.apply(this, arguments);
+ OpenLayers.Tile.prototype.destroy.apply(this, arguments);
},
/**
@@ -134,7 +134,7 @@
* {Boolean} Was a tile drawn?
*/
draw: function() {
- var drawn = OpenLayers.Tile.BackBufferable.prototype.draw.apply(this, arguments);
+ var drawn = OpenLayers.Tile.prototype.draw.apply(this, arguments);
if (drawn) {
if (this.layer != this.layer.map.baseLayer && this.layer.reproject) {
this.bounds = this.getBoundsFromBaseLayer(this.position);
@@ -187,10 +187,10 @@
*/
positionTile: function() {
var style = this.frame.style;
- style.left = this.position.x + "px";
- style.top = this.position.y + "px";
- style.width = this.size.w + "px";
- style.height = this.size.h + "px";
+ style.left = this.position.x + "%";
+ style.top = this.position.y + "%";
+ style.width = this.size.w + "%";
+ style.height = this.size.h + "%";
},
/**
@@ -321,16 +321,22 @@
/**
* Method: createBackBuffer
- * Create a copy of this tile's markup for the <layer>'s backBufferDiv
+ * Create a backbuffer for this tile. A backbuffer isn't exactly a clone
+ * of the tile's markup, because we want to avoid the reloading of the
+ * image. So we clone the frame, and steal the image from the tile.
*
* Returns:
- * {DOMElement} a clone of the tile content
+ * {DOMElement} The markup, or undefined if the tile has no image
+ * or if it's currently loading.
*/
createBackBuffer: function() {
- var frame = this.frame.cloneNode(false);
- frame.appendChild(this.imgDiv);
+ if(!this.imgDiv || this.isLoading) {
+ return;
+ }
+ var backBuffer = this.frame.cloneNode(false);
+ backBuffer.appendChild(this.imgDiv);
this.imgDiv = null;
- return frame;
+ return backBuffer;
},
/**
@@ -344,6 +350,20 @@
this.isLoading = false;
this.events.triggerEvent("loadend");
+ // IE<7 needs a reflow when the tiles are loaded because of the
+ // percentage based positioning. Otherwise nothing is shown
+ // until the user interacts with the map in some way.
+ if (parseFloat(navigator.appVersion.split("MSIE")[1]) < 7 &&
+ this.layer && this.layer.div) {
+ var span = document.createElement("span");
+ span.style.display = "none";
+ var layerDiv = this.layer.div;
+ layerDiv.appendChild(span);
+ window.setTimeout(function() {
+ span.parentNode === layerDiv && span.parentNode.removeChild(span);
+ }, 0);
+ }
+
if (this.layerAlphaHack === true) {
img.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
Modified: sandbox/august/trunk/lib/OpenLayers/Tile.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Tile.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Tile.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -103,7 +103,7 @@
initialize: function(layer, position, bounds, url, size, options) {
this.layer = layer;
this.position = position.clone();
- this.bounds = bounds.clone();
+ this.setBounds(bounds);
this.url = url;
if (size) {
this.size = size.clone();
@@ -171,14 +171,40 @@
* Returns:
* {Boolean} Whether or not the tile should actually be drawn.
*/
- shouldDraw: function() {
- var maxExtent = this.layer.maxExtent;
- var withinMaxExtent = (maxExtent &&
- this.bounds.intersectsBounds(maxExtent, false));
+ shouldDraw: function() {
+ var withinMaxExtent = false,
+ maxExtent = this.layer.maxExtent;
+ if (maxExtent) {
+ var map = this.layer.map;
+ var worldBounds = map.baseLayer.wrapDateLine && map.getMaxExtent();
+ if (this.bounds.intersectsBounds(maxExtent, {inclusive: false, worldBounds: worldBounds})) {
+ withinMaxExtent = true;
+ }
+ }
return withinMaxExtent || this.layer.displayOutsideMaxExtent;
},
+ /**
+ * Method: setBounds
+ * Sets the bounds on this instance
+ *
+ * Parameters:
+ * bounds {<OpenLayers.Bounds>}
+ */
+ setBounds: function(bounds) {
+ bounds = bounds.clone();
+ if (this.layer.map.baseLayer.wrapDateLine) {
+ var worldExtent = this.layer.map.getMaxExtent(),
+ tolerance = this.layer.map.getResolution();
+ bounds = bounds.wrapDateLine(worldExtent, {
+ leftTolerance: tolerance,
+ rightTolerance: tolerance
+ });
+ }
+ this.bounds = bounds;
+ },
+
/**
* Method: moveTo
* Reposition the tile.
@@ -194,7 +220,7 @@
redraw = true;
}
- this.bounds = bounds.clone();
+ this.setBounds(bounds);
this.position = position.clone();
if (redraw) {
this.draw();
Modified: sandbox/august/trunk/lib/OpenLayers/Tween.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Tween.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Tween.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,7 +5,6 @@
/**
* @requires OpenLayers/BaseTypes/Class.js
- * @requires OpenLayers/Console.js
*/
/**
@@ -137,9 +136,9 @@
var b = this.begin[i];
var f = this.finish[i];
if (b == null || f == null || isNaN(b) || isNaN(f)) {
- OpenLayers.Console.error('invalid value for Tween');
+ throw new TypeError('invalid value for Tween');
}
-
+
var c = f - b;
value[i] = this.easing.apply(this, [this.time, b, c, this.duration]);
}
Modified: sandbox/august/trunk/lib/OpenLayers/Util.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Util.js 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/lib/OpenLayers/Util.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -279,13 +279,14 @@
OpenLayers.Util.modifyDOMElement(image, id, px, sz, position,
border, null, opacity);
- if(delayDisplay) {
+ if (delayDisplay) {
image.style.display = "none";
- OpenLayers.Event.observe(image, "load",
- OpenLayers.Function.bind(OpenLayers.Util.onImageLoad, image));
- OpenLayers.Event.observe(image, "error",
- OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError, image));
-
+ function display() {
+ image.style.display = "";
+ OpenLayers.Event.stopObservingElement(image);
+ }
+ OpenLayers.Event.observe(image, "load", display);
+ OpenLayers.Event.observe(image, "error", display);
}
//set special properties
@@ -294,8 +295,6 @@
if (imgURL) {
image.src = imgURL;
}
-
-
return image;
};
@@ -322,33 +321,6 @@
};
/**
- * Function: onImageLoad
- * Bound to image load events. For all images created with <createImage> or
- * <createAlphaImageDiv>, this function will be bound to the load event.
- */
-OpenLayers.Util.onImageLoad = function() {
- // The complex check here is to solve issues described in #480.
- // Every time a map view changes, it increments the 'viewRequestID'
- // property. As the requests for the images for the new map view are sent
- // out, they are tagged with this unique viewRequestID.
- //
- // If an image has no viewRequestID property set, we display it regardless,
- // but if it does have a viewRequestID property, we check that it matches
- // the viewRequestID set on the map.
- //
- // If the viewRequestID on the map has changed, that means that the user
- // has changed the map view since this specific request was sent out, and
- // therefore this tile does not need to be displayed (so we do not execute
- // this code that turns its display on).
- //
- if (!this.viewRequestID ||
- (this.map && this.viewRequestID == this.map.viewRequestID)) {
- this.style.display = "";
- }
- OpenLayers.Element.removeClass(this, "olImageLoadError");
-};
-
-/**
* Property: IMAGE_RELOAD_ATTEMPTS
* {Integer} How many times should we try to reload an image before giving up?
* Default is 0
@@ -356,38 +328,6 @@
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 0;
/**
- * Function: onImageLoadError
- */
-OpenLayers.Util.onImageLoadError = function() {
- this._attempts = (this._attempts) ? (this._attempts + 1) : 1;
- if (this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) {
- var urls = this.urls;
- if (urls && OpenLayers.Util.isArray(urls) && urls.length > 1){
- var src = this.src.toString();
- var current_url, k;
- for (k = 0; current_url = urls[k]; k++){
- if(src.indexOf(current_url) != -1){
- break;
- }
- }
- var guess = Math.floor(urls.length * Math.random());
- var new_url = urls[guess];
- k = 0;
- while(new_url == current_url && k++ < 4){
- guess = Math.floor(urls.length * Math.random());
- new_url = urls[guess];
- }
- this.src = src.replace(current_url, new_url);
- } else {
- this.src = this.src;
- }
- } else {
- OpenLayers.Element.addClass(this, "olImageLoadError");
- }
- this.style.display = "";
-};
-
-/**
* Property: alphaHackNeeded
* {Boolean} true if the png alpha hack is necessary and possible, false otherwise.
*/
@@ -497,17 +437,9 @@
var div = OpenLayers.Util.createDiv();
var img = OpenLayers.Util.createImage(null, null, null, null, null, null,
- null, false);
+ null, delayDisplay);
div.appendChild(img);
- if (delayDisplay) {
- img.style.display = "none";
- OpenLayers.Event.observe(img, "load",
- OpenLayers.Function.bind(OpenLayers.Util.onImageLoad, div));
- OpenLayers.Event.observe(img, "error",
- OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError, div));
- }
-
OpenLayers.Util.modifyAlphaImageDiv(div, id, px, sz, imgURL, position,
border, sizing, opacity);
Modified: sandbox/august/trunk/playground/index.html
===================================================================
--- sandbox/august/trunk/playground/index.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/playground/index.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -6,6 +6,8 @@
</head>
<body>
<table border="0" cellspacing="0" style="margin-top:0px;margin-left:0px;">
+ <tr><td><a href="../examples/all-overlays.html"><b>examples/all-overlays.html</b></a></td></tr>
+ <tr><td><a href="../examples/all-overlays-google.html"><b>examples/all-overlays-google.html</b></a></td></tr>
<tr><td><a href="../examples/wmts.html"><b>examples/wmts.html</b></a></td></tr>
<tr><td><a href="ags/agsfeatureaccess.html"><b>ags/agsfeatureaccess.html</b></a></td></tr>
<tr><td><a href="ags/ags-tiled-customized-tilingschema.html"><b>ags/ags-tiled-customized-tilingschema.html</b></a></td></tr>
@@ -42,12 +44,14 @@
<tr><td><a href="wmts/wmts-ags-customized-tilingschema-ft-unequal-scales-load-capa.html"><b>wmts/wmts-ags-customized-tilingschema-ft-unequal-scales-load-capa.html</b></a></td></tr>
<tr><td><a href="wmts/wmts-ags-customized-tilingschema-nowkid.html"><b>wmts/wmts-ags-customized-tilingschema-nowkid.html</b></a></td></tr>
<tr><td><a href="wmts/wmts-ags-customized-tilingschema-nowkid-load-capa.html"><b>wmts/wmts-ags-customized-tilingschema-nowkid-load-capa.html</b></a></td></tr>
+ <tr><td><a href="wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.html"><b>wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.html</b></a></td></tr>
<tr><td><a href="wmts/wmts-geowebcache-epsg3857.html"><b>wmts/wmts-geowebcache-epsg3857.html</b></a></td></tr>
<tr><td><a href="wmts/wmts-geowebcache-wgs84.html"><b>wmts/wmts-geowebcache-wgs84.html</b></a></td></tr>
<tr><td><a href="wmts/wmts-geowebcache-customized-tilingschema.html"><b>wmts/wmts-geowebcache-customized-tilingschema.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-2.5-wmts-ags-epsg3857.html"><b>wmts/jsapi-2.5-wmts-ags-epsg3857.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-2.5-wmts-ags-wgs84.html"><b>wmts/jsapi-2.5-wmts-ags-wgs84.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-2.5-wmts-ags-customized-tilingschema.html"><b>wmts/jsapi-2.5-wmts-ags-customized-tilingschema.html</b></a></td></tr>
+ <tr><td><a href="wmts/jsapi-2.5-wmts-ags-customized-tilingschema-nowkid-mixed-compact.html"><b>wmts/jsapi-2.5-wmts-ags-customized-tilingschema-nowkid-mixed-compact.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-wmts-wgs84.html"><b>wmts/jsapi-wmts-wgs84.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-wmts-ags-wgs84.html"><b>wmts/jsapi-wmts-ags-wgs84.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-wmts-epsg3857.html"><b>wmts/jsapi-wmts-epsg3857.html</b></a></td></tr>
@@ -56,7 +60,8 @@
<tr><td><a href="wmts/jsapi-wmts-customized-tilingschema.html"><b>wmts/jsapi-wmts-customized-tilingschema.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-wmts-ags-customized-tilingschema.html"><b>wmts/jsapi-wmts-ags-customized-tilingschema.html</b></a></td></tr>
<tr><td><a href="wmts/jsapi-wmts-customized-tilingschema-swiss.html"><b>wmts/jsapi-wmts-customized-tilingschema-swiss.html</b></a></td></tr>
- <tr><td><a href="wmts/wmts2tileinfo.html"><b>wmts/wmts2tileinfo.html</b></a></td></tr>
+ <tr><td><a href="wmts/wmts2tileinfo.html"><b>wmts/wmts2tileinfo.html</b></a></td></tr>
+ <tr><td><a href="wms/wms-capabilities.html"><b>wms/wms-capabilities</b></a></td></tr>
<tr><td><a href="wps/wps.html"><b>wps/wps.html</b></a></td></tr>
<tr><td><a href="wps/wpscommon.html"><b>wps/wpscommon.html</b></a></td></tr>
<tr><td><a href="wps/wps-zooapi.html"><b>wps/wps-zooapi.html</b></a></td></tr>
Added: sandbox/august/trunk/playground/wms/wms-capabilities.html
===================================================================
--- sandbox/august/trunk/playground/wms/wms-capabilities.html (rev 0)
+++ sandbox/august/trunk/playground/wms/wms-capabilities.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>OpenLayers ArcGIS Server WMS Example</title>
+ <script type="text/javascript" src="../../lib/Firebug/firebug.js"></script>
+ <!--
+ <script type="text/javascript" src="../../OpenLayers.js"></script>
+ -->
+ <script type="text/javascript" src="../../lib/OpenLayers.js"></script>
+
+ <script type="text/javascript" src="wms-capabilities.js"></script>
+ </head>
+ <body onload="init();">
+ <div id="map" style="width:1024px;height:512px;margin-top:5px;margin-left:5px;background-color:#ffffff;border:1px solid #ccc;"></div>
+ </body>
+</html>
Added: sandbox/august/trunk/playground/wms/wms-capabilities.js
===================================================================
--- sandbox/august/trunk/playground/wms/wms-capabilities.js (rev 0)
+++ sandbox/august/trunk/playground/wms/wms-capabilities.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,72 @@
+var map, format;
+
+function init() {
+
+ OpenLayers.ProxyHost= function(url) {
+ return "/openlayers-trunk/ApacheProxyServlet?url=" + url;
+ };
+
+ map = new OpenLayers.Map({
+ div: "map",
+ projection: new OpenLayers.Projection("EPSG:900913"),
+ units: "m",
+ maxResolution: 156543.0339,
+ maxExtent: new OpenLayers.Bounds(
+ -20037508, -20037508, 20037508, 20037508.34
+ )
+ });
+
+ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ name: "MapQuestOSM",
+ //attribution: "Data CC-By-SA by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",
+ sphericalMercator: true,
+ url: ' http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
+ clone: function(obj) {
+ if (obj == null) {
+ obj = new OpenLayers.Layer.OSM(
+ this.name, this.url, this.getOptions());
+ }
+ obj = OpenLayers.Layer.XYZ.prototype.clone.apply(this, [obj]);
+ return obj;
+ },
+ CLASS_NAME: "OpenLayers.Layer.MapQuestOSM"
+ });
+
+
+ var mapquestosm = new OpenLayers.Layer.MapQuestOSM();
+
+ map.addLayers([mapquestosm]);
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
+ map.setCenter(
+ new OpenLayers.LonLat(10.2, 48.9).transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ map.getProjectionObject()
+ ),
+ 5
+ );
+
+ format = new OpenLayers.Format.WMSCapabilities({});
+
+ OpenLayers.Request.GET({
+ url: "http://sazabiii/arcgis/services/M_StreetMap_M5_FGDB_Local_P_HIGH/MapServer/WMSServer",
+ params: {
+ SERVICE: "WMS",
+ VERSION: "1.1.1",
+ REQUEST: "GetCapabilities"
+ },
+ success: function(request) {
+ var doc = request.responseXML;
+ if (!doc || !doc.documentElement) {
+ doc = request.responseText;
+ }
+ var capabilities = format.read(doc);
+ numOfLayers = capabilities.capability.layers.length;
+ for(var i=0; i<numOfLayers; i++) {
+ OpenLayers.Console.info(capabilities.capability.layers[i].name);
+ }
+ },
+ failure: function() {
+ OpenLayers.Console.error.apply(OpenLayers.Console, arguments);
+ }
+ });
+}
Added: sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema-nowkid-mixed-compact.html
===================================================================
--- sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema-nowkid-mixed-compact.html (rev 0)
+++ sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema-nowkid-mixed-compact.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>jsapi-2.5-wmts-ags-customized-tilingschema-nowkid-mixed-compact.html</title>
+ <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.5/js/dojo/dijit/themes/claro/claro.css">
+ <!--
+ <script type="text/javascript" src="http://jhuang7/localjsapi/js/dojo/dojo/dojo.js" djConfig="parseOnLoad:true"></script>
+ -->
+ <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.5"></script>
+
+ <script type="text/javascript">
+ dojo.require("esri.map");
+ dojo.require("esri.layers.wmts");
+
+ function init() {
+ esri.config.defaults.io.proxyUrl = "../../util/ags-proxy.jsp";
+ var map = new esri.Map("map");
+ var wmtsLayer = new esri.layers.WMTSLayer(
+ "http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer/WMTS"
+ //"http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_img_wmts/ImageServer/WMTS"
+ );
+ map.addLayer(wmtsLayer);
+ }
+ dojo.addOnLoad(init);
+ </script>
+ </head>
+ <body class="claro">
+ <div id="map" style="width:1024px;height:512px;">
+ </div>
+ </body>
+</html>
Modified: sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema.html
===================================================================
--- sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/playground/wmts/jsapi-2.5-wmts-ags-customized-tilingschema.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -17,7 +17,7 @@
esri.config.defaults.io.proxyUrl = "../../util/ags-proxy.jsp";
var map = new esri.Map("map");
var wmtsLayer = new esri.layers.WMTSLayer(
- "http://sazabiii:6080/arcgis/rest/services/wmts.regression/portland_wmts/MapServer/WMTS"
+ "http://gouf:6080/arcgis/rest/services/wmts.regression/portland_wmts/MapServer/WMTS"
);
map.addLayer(wmtsLayer);
}
Added: sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.html
===================================================================
--- sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.html (rev 0)
+++ sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>OpenLayers ArcGIS Server WMTS Example</title>
+ <script type="text/javascript" src="../../lib/Firebug/firebug.js"></script>
+ <script type="text/javascript" src="../../OpenLayers.js"></script>
+ <!--
+ <script type="text/javascript" src="../../lib/OpenLayers.js"></script>
+ -->
+ <script type="text/javascript" src="wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.js"></script>
+ </head>
+ <body onload="init();">
+ <div id="map" style="width:1024px;height:512px;margin-top:5px;margin-left:5px;background-color:#ffffff;border:1px solid #ccc;"></div>
+ </body>
+</html>
Added: sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.js
===================================================================
--- sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.js (rev 0)
+++ sandbox/august/trunk/playground/wmts/wmts-ags-customized-tilingschema-nowkid-mixed-compact-load-capa.js 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,142 @@
+var map = null;
+
+function init() {
+
+ OpenLayers.ProxyHost= function(url) {
+ return "/openlayers-trunk/ApacheProxyServlet?url=" + url;
+ };
+
+ var lon = 523359.26731;
+ var lat = 176017.59974;
+ var zoom = 0;
+
+ var options = {
+ //panMethod: null, // set 'panMethod' to null to disable animated panning
+ controls: [
+ new OpenLayers.Control.LayerSwitcher(),
+ new OpenLayers.Control.PanZoomBar(),
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.MousePosition()
+ ],
+ // see http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer
+ // PROJCS["NAD_1983_StatePlane_Tennessee_FIPS_4100_Customized",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",600000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-86.0],PARAMETER["Standard_Parallel_1",35.25],PARAMETER["Standard_Parallel_2",36.41666666666666],PARAMETER["Latitude_Of_Origin",34.33333333333334],UNIT["Meter",1.0]]
+ projection: "EPSG:900913", // the WMTS is in customized projection EPSG:0
+ units: "m",
+ maxResolution: 16000*0.3048/(96*12),
+ numZoomLevels: 4,
+ maxExtent: new OpenLayers.Bounds(522342.75322799373, 175341.82447305467, 524633.0016453649, 177648.60898008203)
+ };
+ map = new OpenLayers.Map('map', options);
+
+ // map service WMTS
+ //var wmtsCapaUrl = "http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer/WMTS/1.0.0/WMTSCapabilities.xml";
+ var wmtsCapaUrl = "http://config20017vm0:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer/WMTS/1.0.0/WMTSCapabilities.xml";
+
+ // image service WMTS
+ //var wmtsCapaUrl = "http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_img_wmts/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml";
+ //var wmtsCapaUrl = "http://config20017vm0:6080/arcgis/rest/services/wmts.regression/franklinrgb_img_wmts/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml";
+
+ // url end point for REST
+ // map service WMTS
+ //var wmtsTileResUrl = "http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer/WMTS/tile/";
+ //var wmtsTileResUrl = "http://config20017vm0:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer/WMTS/tile/";
+
+ // image service WMTS
+ //var wmtsTileResUrl = "http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_img_wmts/ImageServer/WMTS/tile/";
+ var wmtsTileResUrl = "http://config20017vm0:6080/arcgis/rest/services/wmts.regression/franklinrgb_img_wmts/ImageServer/WMTS/tile/";
+
+ // url end point for KVP, a little different than REST
+ //var wmtsTileResUrl = "http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer/WMTS";
+ //var wmtsTileResUrl = "http://config20017vm0:6080/arcgis/rest/services/wmts.regression/franklinrgb_wmts/MapServer/WMTS";
+
+ // image service WMTS
+ //var wmtsTileResUrl = "http://gouf:6080/arcgis/rest/services/wmts.regression/franklinrgb_img_wmts/ImageServer/WMTS";
+ //var wmtsTileResUrl = "http://config20017vm0:6080/arcgis/rest/services/wmts.regression/franklinrgb_img_wmts/ImageServer/WMTS";
+
+ OpenLayers.loadURL(
+ wmtsCapaUrl,
+ null, // RESTful WMTS, no kvp request parameters
+ this,
+ function(request) { // parse WMTS capabilities XML and create WMTS layer
+ var format = new OpenLayers.Format.WMTSCapabilities();
+ var capabilities = format.read(request.responseXML || request.responseText);
+ /*try {
+ var wmtsTileResUrl = capabilities.operationsMetadata.GetTile.dcp.http.get;
+ if(!wmtsTileResUrl || wmtsTileResUrl=="") {
+ throw "";
+ }
+ } catch(e) {
+ OpenLayers.Console.error("...invalid WMTS tile resources endpoint url in capabilities...");
+ }*/
+ var layers = capabilities.contents.layers;
+ var tileMatrixSets = capabilities.contents.tileMatrixSets;
+
+ var agsWmtsLayer = new OpenLayers.Layer.WMTS({
+ // general Grid layer options
+ //name: "wmts.regression_franklinrgb_wmts",
+ name: "wmts.regression_franklinrgb_img_wmts",
+ url: wmtsTileResUrl,
+ isBaseLayer: true,
+ singleTile: false,
+ // WMTS layer options
+ // you can choose different layers
+ //layer: "sazabiii.bluemarble",
+ layer: layers[0].identifier,
+ style: layers[0].styles[0].identifier,
+ matrixSet: layers[0].tileMatrixSetLinks[0].tileMatrixSet,
+ format: "image/jpgpng", // mixed tile format, is there a standard mime type?
+ //format: layers[0].formats[0],
+ requestEncoding: "REST",
+ //requestEncoding: "KVP",
+ matrixIds: tileMatrixSets[layers[0].tileMatrixSetLinks[0].tileMatrixSet].matrixIds,
+ // optional
+ tileFullExtent: new OpenLayers.Bounds(522342.75322799373, 175341.82447305467, 524633.0016453649, 177648.60898008203),
+ // optional
+ tileOrigin: new OpenLayers.LonLat(-3.70398E7, 4.66484E7)
+ });
+ agsWmtsLayer.setOpacity(1);
+ //agsWmtsLayer.setVisibility(false);
+ map.addLayer(agsWmtsLayer);
+ map.setCenter(
+ new OpenLayers.LonLat(lon, lat),
+ zoom
+ );
+ }
+ );
+
+
+ // add a WMTS by manually configure the tileMatrixSet and matrixIds
+ // in this case you don't need to load and parse capabilities file
+ /*
+ var _tileMatrixSet = "default028mm";
+ var _matrixIds = [];
+ for (var j=0; j<20; ++j) {
+ _matrixIds[j] = "" + j + "";
+ }
+
+ var agsWmtsLayer = new OpenLayers.Layer.WMTS({
+ // general Grid layer options
+ name: "",
+ url: wmtsTileResUrl,
+ isBaseLayer: true,
+ singleTile: false,
+ // WMTS layer options
+ layer: "",
+ style: "default",
+ matrixSet: _tileMatrixSet,
+ format: "image/png",
+ requestEncoding: "REST",
+ matrixIds: _matrixIds,
+ tileSize: new OpenLayers.Size(256, 256),
+ tileFullExtent: new OpenLayers.Bounds(-434069.08184709644, 4409037.227927545, 1524060.9791107727, 4967959.789016491),
+ tileOrigin: new OpenLayers.LonLat(-5121200.0, 9998400.0)
+ });
+
+ map.addLayer(agsWmtsLayer);
+ map.setCenter(
+ new OpenLayers.LonLat(lon, lat),
+ zoom
+ );
+ */
+}
+
Modified: sandbox/august/trunk/tests/BaseTypes/Bounds.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Bounds.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/BaseTypes/Bounds.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -124,7 +124,44 @@
t.eq( bounds.containsLonLat(ll), bounds.contains(ll.lon, ll.lat), "containsLonLat works");
}
+
+ function test_containsLonLat_wraped(t) {
+
+ var worldBounds = new OpenLayers.Bounds(-180, -90, 180, 90);
+ var cases = [{
+ ll: [0, 0], bbox: [-10, -10, 10, 10], contained: true
+ }, {
+ ll: [20, 0], bbox: [-10, -10, 10, 10], contained: false
+ }, {
+ ll: [360, 0], bbox: [-10, -10, 10, 10], contained: true
+ }, {
+ ll: [380, 0], bbox: [-10, -10, 10, 10], contained: false
+ }, {
+ ll: [725, 5], bbox: [-10, -10, 10, 10], contained: true
+ }, {
+ ll: [-355, -5], bbox: [-10, -10, 10, 10], contained: true
+ }, {
+ ll: [-715, 5], bbox: [-10, -10, 10, 10], contained: true
+ }, {
+ ll: [-735, 5], bbox: [-10, -10, 10, 10], contained: false
+ }, {
+ ll: [-180 * 50, 5], bbox: [-10, -10, 10, 10], contained: true
+ }];
+
+ var len = cases.length;
+ t.plan(len);
+
+ var c, bounds, loc;
+ for (var i=0; i<len; ++i) {
+ c = cases[i];
+ loc = new OpenLayers.LonLat(c.ll[0], c.ll[1]);
+ bounds = new OpenLayers.Bounds.fromArray(c.bbox);
+ t.eq(bounds.containsLonLat(loc, {worldBounds: worldBounds}), c.contained, "case " + i);
+ }
+
+ }
+
function test_Bounds_fromString(t) {
t.plan( 12 );
bounds = OpenLayers.Bounds.fromString("1,2,3,4");
@@ -555,7 +592,8 @@
//straddling right
testBounds = simpleBounds.add(10,0);
wrappedBounds = testBounds.wrapDateLine(maxExtent);
- t.ok(wrappedBounds.equals(testBounds), "wrapping a bounds that straddles the right of maxextent does nothing");
+ desiredBounds = testBounds.add(-maxExtent.getWidth(), 0)
+ t.ok(wrappedBounds.equals(desiredBounds), "wrapping a bounds that straddles the right of maxextent moves extent to left side of the world");
//right leftTolerance
testBounds = simpleBounds.add(14,0);
@@ -594,7 +632,7 @@
}
function test_Bounds_add(t) {
- t.plan( 8 );
+ t.plan( 6 );
origBounds = new OpenLayers.Bounds(1,2,3,4);
testBounds = origBounds.clone();
@@ -606,19 +644,19 @@
t.ok( bounds.equals(b), "bounds is set correctly");
//null values
- OpenLayers.Lang.setCode('en');
- var desiredMsg = "You must pass both x and y values to the add function.";
- OpenLayers.Console.error = function(msg) {
- t.eq(msg, desiredMsg, "error correctly reported");
+ try {
+ bounds = testBounds.add(null, 50);
+ } catch(e) {
+ t.ok("exception thrown when passing null value to add()");
}
-
- bounds = testBounds.add(null, 50);
t.ok( testBounds.equals(origBounds), "testBounds is not modified by erroneous add operation (null x)");
- t.ok(bounds == null, "returns null on erroneous add operation (null x)");
- bounds = testBounds.add(5, null);
+ try {
+ bounds = testBounds.add(5, null);
+ } catch(e) {
+ t.ok("exception thrown when passing null value to add()");
+ }
t.ok( testBounds.equals(origBounds), "testBounds is not modified by erroneous add operation (null y)");
- t.ok(bounds == null, "returns null on erroneous add operation (null y)");
}
function test_Bounds_scale(t) {
Modified: sandbox/august/trunk/tests/BaseTypes/Date.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Date.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/BaseTypes/Date.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -35,7 +35,7 @@
function test_Date_parse(t) {
- t.plan(93);
+ t.plan(114);
var cases = {
"2000": {
@@ -127,6 +127,18 @@
minutes: 51,
seconds: 25,
milliseconds: 123
+ },
+ "2000Z": { // lenient (Chrome accepts this)
+ year: 2000
+ },
+ "2000-02Z": { // lenient (Chrome accepts this)
+ year: 2000,
+ month: 1
+ },
+ "2000-04-15Z": { // lenient (Chrome accepts this)
+ year: 2000,
+ month: 3,
+ date: 15
}
};
Modified: sandbox/august/trunk/tests/BaseTypes/LonLat.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/LonLat.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/BaseTypes/LonLat.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -52,7 +52,7 @@
}
function test_LonLat_add(t) {
- t.plan(10);
+ t.plan(8);
origLL = new OpenLayers.LonLat(10,100);
lonlatA = origLL.clone();
@@ -64,19 +64,19 @@
t.ok( addpx.equals(ll), "addpx is set correctly");
//null values
- OpenLayers.Lang.setCode('en');
- var desiredMsg = "You must pass both lon and lat values to the add function.";
- OpenLayers.Console.error = function(msg) {
- t.eq(msg, desiredMsg, "error correctly reported");
+ try {
+ addpx = lonlatA.add(null, 50);
+ } catch(e) {
+ t.ok("exception thrown when passing null value to add()");
}
-
- addpx = lonlatA.add(null, 50);
t.ok( lonlatA.equals(origLL), "lonlatA is not modified by erroneous add operation (null lon)");
- t.ok(addpx == null, "returns null on erroneous add operation (null lon)");
- addpx = lonlatA.add(5, null);
+ try {
+ addpx = lonlatA.add(5, null);
+ } catch(e) {
+ t.ok("exception thrown when passing null value to add()");
+ }
t.ok( lonlatA.equals(origLL), "lonlatA is not modified by erroneous add operation (null lat)");
- t.ok(addpx == null, "returns null on erroneous add operation (null lat)");
// string values
addpx = origLL.clone().add("5", "50");
Modified: sandbox/august/trunk/tests/BaseTypes/Pixel.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Pixel.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/BaseTypes/Pixel.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -72,7 +72,7 @@
}
function test_Pixel_add(t) {
- t.plan( 8 );
+ t.plan( 6 );
var origPX = new OpenLayers.Pixel(5,6);
var oldPixel = origPX.clone();
@@ -85,19 +85,19 @@
t.ok( pixel.equals(px), "returned pixel is correct");
//null values
- OpenLayers.Lang.setCode('en');
- var desiredMsg = "You must pass both x and y values to the add function.";
- OpenLayers.Console.error = function(msg) {
- t.eq(msg, desiredMsg, "error correctly reported");
+ try {
+ pixel = oldPixel.add(null, 50);
+ } catch(e) {
+ t.ok("exception thrown when passing null value to add()");
}
-
- pixel = oldPixel.add(null, 50);
t.ok( oldPixel.equals(origPX), "oldPixel is not modified by erroneous add operation (null x)");
- t.ok(pixel == null, "returns null on erroneous add operation (null x)");
- addpx = oldPixel.add(5, null);
+ try {
+ addpx = oldPixel.add(5, null);
+ } catch(e) {
+ t.ok("exception thrown when passing null value to add()");
+ }
t.ok( oldPixel.equals(origPX), "oldPixel is not modified by erroneous add operation (null y)");
- t.ok(pixel == null, "returns null on erroneous add operation (null y)");
}
function test_Pixel_offset(t) {
Modified: sandbox/august/trunk/tests/Control/DrawFeature.html
===================================================================
--- sandbox/august/trunk/tests/Control/DrawFeature.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Control/DrawFeature.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -37,6 +37,33 @@
t.ok(!control.handler.multi, "handlerOptions.multi respected");
}
+
+ function test_rendererOptions(t) {
+ t.plan(2);
+
+ var map = new OpenLayers.Map("map");
+ var renderers = ["Canvas", "VML"];
+
+ var layer = new OpenLayers.Layer.Vector(null, {
+ renderers: renderers,
+ rendererOptions: {zIndexing: true},
+ isBaseLayer: true
+ });
+ map.addLayer(layer);
+
+ var control = new OpenLayers.Control.DrawFeature(
+ layer, OpenLayers.Handler.Polygon, {autoActivate: true}
+ );
+ map.addControl(control);
+
+ var sketchLayer = control.handler.layer;
+
+ t.eq(sketchLayer.renderers, renderers, "Preferred renderers");
+ t.eq(sketchLayer.rendererOptions.zIndexing, true, "renderer options");
+
+ map.destroy();
+
+ }
function test_drawFeature(t) {
t.plan(3);
Modified: sandbox/august/trunk/tests/Control/WMSGetFeatureInfo.html
===================================================================
--- sandbox/august/trunk/tests/Control/WMSGetFeatureInfo.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Control/WMSGetFeatureInfo.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -348,7 +348,7 @@
);
t.eq(
log.options && log.options.params.STYLES.join(","),
- "a,b,c,d,a,b,c,d,,,,,,,,",
+ ",,,,,,,,a,b,c,d,a,b,c,d",
"Styles merged correctly"
);
@@ -424,7 +424,7 @@
control.layerUrls = ["http://a.mirror/wms", "http://b.mirror/wms"];
control.getInfoForClick({xy: {x: 50, y: 50}});
t.eq(log.options && log.options.url, "http://host/wms", "some match, request issued");
- t.eq(log.options && log.options.params["QUERY_LAYERS"].join(","), "a,b", "selected layers queried");
+ t.eq(log.options && log.options.params["QUERY_LAYERS"].join(","), "b,a", "selected layers queried");
// show that a layer can be matched if it has a urls array itself (first needs to be matched)
log = {};
@@ -508,13 +508,13 @@
var _request = OpenLayers.Request.GET;
OpenLayers.Request.GET = function(options) {
count++;
- if (count == 1) {
+ if (count == 2) {
t.eq(options.params["INFO_FORMAT"], "application/vnd.ogc.gml", "Default info format of the control is used");
- t.eq(options.params["QUERY_LAYERS"].join(","), "a,c", "Layers should be grouped by service url");
- t.eq(options.url, "http://localhost/wms", "Correct url used for first request");
- } else if (count == 2) {
+ t.eq(options.params["QUERY_LAYERS"].join(","), "c,a", "Layers should be grouped by service url");
+ t.eq(options.url, "http://localhost/wms", "Correct url used for second request");
+ } else if (count == 1) {
t.eq(options.params["INFO_FORMAT"], "text/xml", "Overridden info format is used instead of the control's infoFormat");
- t.eq(options.url, "http://myhost/wms", "Correct url used for second request");
+ t.eq(options.url, "http://myhost/wms", "Correct url used for first request");
}
};
click.activate();
Modified: sandbox/august/trunk/tests/Format/WFST/v1.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFST/v1.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Format/WFST/v1.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -133,6 +133,28 @@
t.xml_eq(got, expected, snippet + " request without geometry created correctly");
}
}
+
+ function test_setFilterProperty(t) {
+ t.plan(2);
+ var format = new OpenLayers.Format.WFST({
+ geometryName: "foo"
+ });
+ var filter = new OpenLayers.Filter.Logical({
+ type: OpenLayers.Filter.Logical.AND,
+ filters: [new OpenLayers.Filter.Spatial({
+ type: OpenLayers.Filter.Spatial.BBOX,
+ value: new OpenLayers.Bounds(1,2,3,4)
+ }), new OpenLayers.Filter.Spatial({
+ type: OpenLayers.Filter.Spatial.DWITHIN,
+ property: "bar",
+ value: new OpenLayers.Geometry.Point(1,2),
+ distance: 10
+ })]
+ });
+ format.setFilterProperty(filter);
+ t.eq(filter.filters[0].property, "foo", "property set if not set on filter");
+ t.eq(filter.filters[1].property, "bar", "property not set if set on filter");
+ }
function test_update_null_geometry(t) {
var format = new OpenLayers.Format.WFST({
Modified: sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -14,7 +14,7 @@
function test_read(t) {
- t.plan(23);
+ t.plan(24);
var xml = document.getElementById("gssample").firstChild.nodeValue;
var doc = new OpenLayers.Format.XML().read(xml);
@@ -80,6 +80,7 @@
t.eq(capability.layers.length, 22, "correct number of layers parsed");
var layer = capability.layers[2];
+ t.eq(layer.infoFormats, ["text/plain", "text/html", "application/vnd.ogc.gml"], "infoFormats set on layer");
t.eq(layer.name, "tiger:tiger_roads", "[2] correct layer name");
t.eq(layer.prefix, "tiger", "[2] correct layer prefix");
t.eq(layer.title, "Manhattan (NY) roads", "[2] correct layer title");
Modified: sandbox/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -14,7 +14,7 @@
function test_layers(t) {
- t.plan(24);
+ t.plan(25);
var xml = document.getElementById("ogcsample").firstChild.nodeValue;
var doc = new OpenLayers.Format.XML().read(xml);
@@ -40,7 +40,7 @@
t.eq(layers["Temperature"].srs,
{"CRS:84": true},
"Inheritance of SRS handled correctly when redeclaring an inherited SRS");
-
+ t.eq(layers["Temperature"].infoFormats, ["text/xml", "text/plain", "text/html"], "infoFormats set correctly on layer");
var bbox = layers["ROADS_RIVERS"].bbox["EPSG:26986"];
t.eq(bbox.bbox,
[189000, 834000, 285000, 962000],
Modified: sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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 @@
<Value>2007-05</Value>
<Value>2007-06</Value>
<Value>2007-07</Value>
+ <Default>default</Default>
</Dimension>
<TileMatrixSetLink>
<TileMatrixSet>BigWorld</TileMatrixSet>
Modified: sandbox/august/trunk/tests/Format/WPSExecute.html
===================================================================
--- sandbox/august/trunk/tests/Format/WPSExecute.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Format/WPSExecute.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -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 = '<?xml version="1.0" encoding="UTF-8"?>' +
+ '<wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" version="1.0.0" service="WPS" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' +
+ ' <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">gs:Bounds</ows:Identifier>' +
+ ' <wps:DataInputs>' +
+ ' <wps:Input>' +
+ ' <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">features</ows:Identifier>' +
+ ' <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" xmlns:xlink="http://www.w3.org/1999/xlink" method="POST">' +
+ ' <wps:Body>' +
+ ' <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0">' +
+ ' <wfs:Query typeName="foo:bar">' +
+ ' <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">' +
+ ' <ogc:FeatureId fid="123"/>' +
+ ' </ogc:Filter>' +
+ ' </wfs:Query>' +
+ ' </wfs:GetFeature>' +
+ ' </wps:Body>' +
+ ' </wps:Reference>' +
+ ' </wps:Input>' +
+ ' </wps:DataInputs>' +
+ ' <wps:ResponseForm>' +
+ ' <wps:RawDataOutput>' +
+ ' <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">bounds</ows:Identifier>' +
+ ' </wps:RawDataOutput>' +
+ ' </wps:ResponseForm>' +
+ '</wps:Execute>';
+
+ 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');
+ }
+
</script>
</head>
<body>
Modified: sandbox/august/trunk/tests/Layer/ArcGIS93Rest.html
===================================================================
--- sandbox/august/trunk/tests/Layer/ArcGIS93Rest.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Layer/ArcGIS93Rest.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -75,8 +75,8 @@
t.eq( tile.url,
url + "?" + OpenLayers.Util.getParameterString(tParams),
"image src is created correctly via addtile" );
- t.eq( tile.frame.style.top, "6px", "image top is set correctly via addtile" );
- t.eq( tile.frame.style.left, "5px", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.top, "6%", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.left, "5%", "image top is set correctly via addtile" );
var firstChild = layer.div.firstChild.firstChild;
t.eq( firstChild.nodeName.toLowerCase(), "img", "div first child is an image object" );
Modified: sandbox/august/trunk/tests/Layer/Grid.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Grid.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Layer/Grid.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -49,7 +49,7 @@
}
function test_Layer_Grid_clearTiles (t) {
- t.plan(3);
+ t.plan(4);
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS(name, url, params);
@@ -85,6 +85,7 @@
t.ok( layer.grid != null, "layer.grid does not get nullified" );
t.eq(tilesDeleted, numTiles, "all tiles destroy()ed properly");
t.ok(allTilesUnhooked, "all tiles unhooked before being destroyed");
+ t.eq(layer.gridResolution, null, "gridResolution set to null");
OpenLayers.Tile.Image.prototype.destroy =
OpenLayers.Tile.Image.prototype._destroy;
@@ -167,6 +168,7 @@
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS(name, url, params);
layer.destroy = function() {}; //we're going to do funky things with the grid
+ layer.applyBackBuffer = function() {}; // backbuffering isn't under test here
map.addLayer(layer);
//make sure null bounds doesnt cause script error.
@@ -390,6 +392,8 @@
getLayerPxFromLonLat: function(ul) {
t.ok(ul.equals(desiredUL), "correct ul passed to translation");
return translatedPX;
+ },
+ getResolution: function() {
}
}
@@ -482,6 +486,7 @@
g_events = [];
+ layer.grid = [[{}]]; // to prevent error in updateBackBuffer
tile.onLoadEnd.apply(layer);
t.eq(g_events[0], "tileloaded", "tileloaded triggered when numLoadingTiles is 0");
t.eq(g_events[1], "loadend", "loadend event triggered when numLoadingTiles is 0");
@@ -586,7 +591,7 @@
function test_Layer_Grid_destroy (t) {
- t.plan( 8 );
+ t.plan( 9 );
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.Grid(name, url, params);
@@ -603,16 +608,20 @@
map.setCenter(new OpenLayers.LonLat(0,0), 10);
map.setCenter(new OpenLayers.LonLat(1,1));
-
//grab a reference to one of the tiles
var tile = layer.grid[1][1];
t.eq( tile.imgDiv.className, "olTileImage", "Tile has an image" );
+ var removeBackBufferCalled = false;
+ layer.removeBackBuffer = function() {
+ removeBackBufferCalled = true;
+ };
+
layer.destroy();
t.eq( tile.imgDiv, null, "Tile destroyed" );
t.eq( layer.timerId, null, "Tile loading timeout cleared");
-
t.ok( layer.grid == null, "tiles appropriately destroyed")
+ t.ok( removeBackBufferCalled, "destroy calls removeBackBuffer");
// destroy after remove from map
layer = new OpenLayers.Layer.WMS(name, url, params);
@@ -624,12 +633,555 @@
t.eq( layer.tileSize, null, "layer.tileSize is null after destroy" );
}
+ function test_getServerResolution(t) {
+ t.plan(4);
+
+ var layer = new OpenLayers.Layer.Grid('', '', {}, {});
+ var res;
+
+ res = layer.getServerResolution(1);
+ t.eq(res, 1, '[1] getServerResolution return value is correct');
+
+ layer.serverResolutions = [2, 1];
+ res = layer.getServerResolution(1);
+ t.eq(res, 1, '[2] getServerResolution return value is correct');
+
+ layer.serverResolutions = [2];
+ res = layer.getServerResolution(1);
+ t.eq(res, 2, '[3] getServerResolution return value is correct');
+
+ var exc;
+ layer.serverResolutions = [0.5];
+ try {
+ res = layer.getServerResolution(1);
+ } catch(e) {
+ exc = e;
+ }
+ t.ok(exc != undefined, '[4] getServerResolution generates exception');
+ }
+
+ function test_getServerZoom(t) {
+
+ t.plan(5);
+
+ var resolution, zoom;
+ var map = new OpenLayers.Map('map', {
+ resolutions: [8, 4, 2, 1, 0.5],
+ getResolution: function() {
+ return resolution;
+ }
+ });
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {isBaseLayer: true});
+ map.addLayer(layer);
+
+ resolution = 8;
+ zoom = layer.getServerZoom();
+ t.eq(zoom, 0, '[1] getServerZoom return value is correct');
+
+ resolution = 4;
+ zoom = layer.getServerZoom();
+ t.eq(zoom, 1, '[2] getServerZoom return value is correct');
+
+ layer.serverResolutions = [2, 1];
+ resolution = 1;
+ zoom = layer.getServerZoom();
+ t.eq(zoom, 3, '[3] getServerZoom return value is correct');
+
+ layer.serverResolutions = [2];
+ resolution = 0.5;
+ zoom = layer.getServerZoom();
+ t.eq(zoom, 2, '[4] getServerZoom return value is correct');
+
+ var exc;
+ layer.serverResolutions = [0.5];
+ resolution = 1;
+ try {
+ zoom = layer.getServerZoom();
+ } catch(e) {
+ exc = e;
+ }
+ t.ok(exc != undefined, '[4] getServerZoom generates exception');
+
+ map.destroy();
+ }
+
+ function test_moveTo_scale(t) {
+
+ t.plan(11);
+
+ var map = new OpenLayers.Map('map', {
+ resolutions: [32, 16, 8, 4, 2, 1]
+ });
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true,
+ serverResolutions: [32, 16, 8]
+ });
+ map.addLayer(layer);
+
+ // initial resolution is 8
+ map.setCenter(new OpenLayers.LonLat(0, 0), 2);
+
+ // test initial conditions
+ t.eq(layer.div.style.width, '100%', 'layer div scale is 1');
+
+ // change from resolution 8 to 4
+ map.zoomTo(3);
+ t.eq(layer.div.style.width, '200%', '[8->4] layer div scale is 2');
+
+ // change from resolution 8 to 2
+ map.zoomTo(2); map.zoomTo(4);
+ t.eq(layer.div.style.width, '400%', '[8->2] layer div scale is 4');
+
+ // change from resolution 8 to 1
+ map.zoomTo(2); map.zoomTo(5);
+ t.eq(layer.div.style.width, '800%', '[8->1] layer div scale is 8');
+
+ // change from resolution 4 to 2
+ map.zoomTo(3); map.zoomTo(4);
+ t.eq(layer.div.style.width, '400%', '[4->2] layer div scale is 4');
+
+ // change from resolution 4 to 1
+ map.zoomTo(3); map.zoomTo(5);
+ t.eq(layer.div.style.width, '800%', '[4->1] layer div scale is 8');
+
+ // change from resolution 2 to 1
+ map.zoomTo(4); map.zoomTo(5);
+ t.eq(layer.div.style.width, '800%', '[2->1] layer div scale is 8');
+
+ // change from resolution 1 to 2
+ map.zoomTo(5); map.zoomTo(4);
+ t.eq(layer.div.style.width, '400%', '[1->2] layer div scale is 4');
+
+ // change from resolution 1 to 4
+ map.zoomTo(5); map.zoomTo(3);
+ t.eq(layer.div.style.width, '200%', '[1->4] layer div scale is 2');
+
+ // change from resolution 1 to 8
+ map.zoomTo(5); map.zoomTo(2);
+ t.eq(layer.div.style.width, '100%', '[1->8] layer div scale is 1');
+
+ // change from resolution 1 to 16
+ map.zoomTo(5); map.zoomTo(1);
+ t.eq(layer.div.style.width, '100%', '[1->16] layer div scale is 1');
+
+ map.destroy();
+ }
+
+ function test_moveTo_backbuffer_singletile(t) {
+ t.plan(4);
+
+ var map = new OpenLayers.Map('map', {
+ resolutions: [1, 0.5, 0.025]
+ });
+ var resolution;
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ singleTile: true,
+ isBaseLayer: true,
+ transitionEffect: 'resize',
+ applyBackBuffer: function(res) {
+ resolution = res;
+ }
+ });
+ map.addLayer(layer);
+
+ // initial resolution is 0.025
+ resolution = undefined;
+ map.setCenter(new OpenLayers.LonLat(0, 0), 2);
+ t.eq(resolution, 0.025,
+ 'applyBackBuffer not called on first moveTo');
+
+ // move to (-90, 45)
+ resolution = undefined;
+ map.setCenter(new OpenLayers.LonLat(-90, 45));
+ t.eq(resolution, 0.025,
+ 'applyBackBuffer called when map is moved');
+
+ // change to resolution 1
+ resolution = undefined;
+ map.zoomTo(0);
+ t.eq(resolution, 1,
+ 'applyBackBuffer called when map is zoomed out');
+
+ // change to resolution 0.5
+ resolution = undefined;
+ map.zoomTo(1);
+ t.eq(resolution, 0.5,
+ 'applyBackBuffer called when map is zoomed out');
+
+ map.destroy();
+ }
+
+ function test_moveTo_backbuffer(t) {
+ t.plan(4);
+
+ var map = new OpenLayers.Map('map', {
+ resolutions: [1, 0.5, 0.025]
+ });
+ var resolution;
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true,
+ transitionEffect: 'resize',
+ applyBackBuffer: function(res) {
+ resolution = res;
+ }
+ });
+ map.addLayer(layer);
+
+ // initial resolution is 0.025
+ resolution = undefined;
+ map.setCenter(new OpenLayers.LonLat(0, 0), 2);
+ t.eq(resolution, 0.025,
+ 'applyBackBuffer not called on first moveTo');
+
+ // move to (-90, 45)
+ resolution = undefined;
+ map.setCenter(new OpenLayers.LonLat(-90, 45));
+ t.eq(resolution, undefined,
+ 'applyBackBuffer not called when map is moved');
+
+ // change to resolution 1
+ resolution = undefined;
+ map.zoomTo(0);
+ t.eq(resolution, 1,
+ 'applyBackBuffer called when map is zoomed out');
+
+ // change to resolution 0.5
+ map.zoomTo(1);
+ t.eq(resolution, 0.5,
+ 'applyBackBuffer called when map is zoomed out');
+
+ map.destroy();
+ }
+
+ function test_transformDiv(t) {
+
+ t.plan(8);
+
+ var map = new OpenLayers.Map('map4');
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer);
+ map.zoomToMaxExtent();
+
+ // the layer container's dimensions are 100px width 100px height
+ // the position of the viewport center is 384, 256
+
+ layer.transformDiv(2);
+
+ t.eq(layer.div.style.width, '200%', '[1] layer div has correct width');
+ t.eq(layer.div.style.height, '200%', '[1] layer div has correct height');
+
+ t.eq(layer.div.style.left, '-384%', '[1] layer div has correct left');
+ t.eq(layer.div.style.top, '-256%', '[1] layer div has correct top');
+
+ // now move the layer container and test again
+
+ map.layerContainerDiv.style.left = '-1024px';
+ map.layerContainerDiv.style.top = '768px';
+
+ layer.transformDiv(2);
+
+ t.eq(layer.div.style.width, '200%', '[2] layer div has correct width');
+ t.eq(layer.div.style.height, '200%', '[2] layer div has correct height');
+
+ t.eq(layer.div.style.left, '-1408%', '[2] layer div has correct left');
+ t.eq(layer.div.style.top, '512%', '[2] layer div has correct top');
+
+ map.destroy();
+ }
+
+ function test_getResolutionScale(t) {
+ t.plan(1);
+
+ var map = new OpenLayers.Map('map');
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer);
+ map.zoomToMaxExtent();
+
+ layer.transformDiv(2);
+ var scale = layer.getResolutionScale();
+ t.eq(scale, 2, 'getResolutionScale returns correct value');
+
+ map.destroy();
+ }
+
+ function test_applyBackBuffer(t) {
+ t.plan(13);
+
+ var map = new OpenLayers.Map('map2');
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer);
+ map.zoomToMaxExtent();
+
+ var backBuffer;
+
+ // test #1
+ layer.createBackBuffer = function() {
+ return;
+ };
+ layer.applyBackBuffer(2);
+ t.eq(layer.backBuffer, undefined,
+ 'back buffer not created if createBackBuffer returns undefined');
+
+ // test #2
+ layer.createBackBuffer = function() {
+ backBuffer = document.createElement('div');
+ return backBuffer;
+ };
+ layer.gridResolution = 32;
+ layer.grid[0][0].bounds = new OpenLayers.Bounds(0, 1, 1, 0);
+ layer.applyBackBuffer(2);
+ t.ok(layer.backBuffer === backBuffer,
+ 'back buffer set in layer');
+ t.ok(layer.div.firstChild === backBuffer,
+ 'back buffer inserted as first child');
+ t.eq(layer.backBuffer.style.width, '1600%',
+ 'back buffer has correct width');
+ t.eq(layer.backBuffer.style.height, '1600%',
+ 'back buffer has correct height');
+ t.eq(layer.backBuffer.style.left, '250%',
+ 'back buffer has correct left');
+ t.eq(layer.backBuffer.style.top, '275%',
+ 'back buffer has correct top');
+
+ // test #3
+ layer.createBackBuffer = function() {
+ backBuffer = document.createElement('div');
+ return backBuffer;
+ };
+ layer.gridResolution = 32;
+ layer.grid[0][0].bounds = new OpenLayers.Bounds(0, 1, 1, 0);
+ map.layerContainerDiv.style.left = '20px';
+ map.layerContainerDiv.style.top = '-20px';
+ layer.applyBackBuffer(2);
+ t.ok(layer.backBuffer === backBuffer,
+ 'back buffer set in layer');
+ t.ok(layer.div.firstChild === backBuffer,
+ 'back buffer inserted as first child');
+ t.eq(layer.backBuffer.style.width, '1600%',
+ 'back buffer has correct width');
+ t.eq(layer.backBuffer.style.height, '1600%',
+ 'back buffer has correct height');
+ t.eq(layer.backBuffer.style.left, '230%',
+ 'back buffer has correct left');
+ t.eq(layer.backBuffer.style.top, '295%',
+ 'back buffer has correct top');
+
+ map.destroy();
+ }
+
+ function test_createBackBuffer(t) {
+ t.plan(7);
+
+ var map = new OpenLayers.Map('map');
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer);
+ map.zoomToMaxExtent();
+
+ var createBackBuffer = OpenLayers.Tile.Image.prototype.createBackBuffer;
+
+ var backBuffer;
+
+ OpenLayers.Tile.Image.prototype.createBackBuffer = function() {
+ return;
+ };
+ backBuffer = layer.createBackBuffer();
+ t.ok(backBuffer != undefined,
+ 'createBackBuffer returns a back buffer');
+ t.eq(backBuffer.childNodes.length, 0,
+ 'returned back buffer has no child nodes');
+
+ OpenLayers.Tile.Image.prototype.createBackBuffer = function() {
+ return document.createElement('div');
+ };
+ backBuffer = layer.createBackBuffer();
+ t.ok(backBuffer != undefined,
+ 'createBackBuffer returns a back buffer');
+ t.eq(backBuffer.childNodes[0].style.left, '0%',
+ 'first tile has correct left');
+ t.eq(backBuffer.childNodes[0].style.top, '0%',
+ 'first tile has correct top');
+ t.eq(backBuffer.childNodes[1].style.left, '256%',
+ 'second tile has correct left');
+ t.eq(backBuffer.childNodes[1].style.top, '0%',
+ 'second tile has correct top');
+
+ map.destroy();
+ OpenLayers.Tile.Image.prototype.createBackBuffer = createBackBuffer;
+ }
+
+ function test_removeBackBuffer(t) {
+ t.plan(3);
+
+ var map = new OpenLayers.Map('map');
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {isBaseLayer: true});
+ map.addLayer(layer);
+
+ // add a fake back buffer
+ var backBuffer = document.createElement('div');
+ layer.backBuffer = backBuffer;
+ layer.div.appendChild(backBuffer);
+ layer.backBufferResolution = 32;
+
+ layer.removeBackBuffer();
+ t.eq(layer.backBuffer, null, 'backBuffer set to null in layer');
+ t.eq(layer.backBufferResolution, null,
+ 'backBufferResolution set to null in layer');
+ t.ok(backBuffer.parentNode !== layer.div,
+ 'back buffer removed from layer');
+
+ map.destroy();
+ }
+
+ function test_singleTile_move_and_zoom(t) {
+
+ //
+ // In single tile mode with no transition effect, we insert a non-scaled
+ // backbuffer when the layer is moved. But if a zoom occurs right after
+ // a move, i.e. before the new image is received, we need to remove the
+ // backbuffer, or an ill-positioned image will be visible during the
+ // zoom transition.
+ //
+
+ t.plan(2);
+
+ var map = new OpenLayers.Map('map');
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true,
+ singleTile: true,
+ ratio: 1
+ });
+ map.addLayer(layer);
+ map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+ // move
+ map.setCenter(new OpenLayers.LonLat(10, 10));
+ t.ok(layer.backBuffer && layer.backBuffer.parentNode === layer.div,
+ 'backbuffer inserted after map move');
+
+ // zoom
+ map.zoomTo(1);
+ t.eq(layer.backBuffer, null,
+ 'back buffer removed when zooming');
+
+ map.destroy();
+ }
+
+ function test_backbuffer_scaled_layer(t) {
+ t.plan(12);
+
+ //
+ // set up
+ //
+
+ var map = new OpenLayers.Map('map', {
+ resolutions: [32, 16, 8, 4, 2, 1]
+ });
+ var layer = new OpenLayers.Layer.WMS(
+ "WMS",
+ window.location.href + "#",
+ null,
+ {transitionEffect: "resize"}
+ );
+
+ layer.serverResolutions = [32, 16, 8];
+
+ map.addLayer(layer);
+ map.setCenter(new OpenLayers.LonLat(0, 0), 2);
+
+ layer.createBackBuffer = function() {
+ return document.createElement('div');
+ };
+
+ // we want to control when the back buffer is removed
+ var removeBackBuffer = OpenLayers.Function.bind(
+ layer.removeBackBuffer, layer);
+ layer.removeBackBuffer = function() {};
+
+ //
+ // test
+ //
+
+ // change resolution from 8 to 4
+ map.zoomTo(3);
+ t.eq(layer.backBuffer.style.width, '100%',
+ '[8->4] back buffer not scaled');
+ removeBackBuffer();
+
+ // change resolution from 8 to 2
+ map.zoomTo(2); removeBackBuffer(); map.zoomTo(4);
+ t.eq(layer.backBuffer.style.width, '100%',
+ '[8->2] back buffer not scaled');
+ removeBackBuffer();
+
+ // change resolution from 16 to 4
+ map.zoomTo(1); removeBackBuffer(); map.zoomTo(3);
+ t.eq(layer.backBuffer.style.width, '200%',
+ '[16->4] back buffer width is as expected');
+ t.eq(layer.backBuffer.style.width, '200%',
+ '[16->4] back buffer height is as expected');
+ removeBackBuffer();
+
+ // change resolution from 32 to 1
+ map.zoomTo(0); removeBackBuffer(); map.zoomTo(5);
+ t.eq(layer.backBuffer.style.width, '400%',
+ '[32->1] back buffer width is as expected');
+ t.eq(layer.backBuffer.style.width, '400%',
+ '[32->1] back buffer height is as expected');
+ removeBackBuffer();
+
+ // change resolution from 4 to 2
+ map.zoomTo(3); removeBackBuffer(); map.zoomTo(4);
+ t.eq(layer.backBuffer.style.width, '100%',
+ '[4->2] back buffer not scaled');
+ removeBackBuffer();
+
+ // change resolution from 4 to 1
+ map.zoomTo(3); removeBackBuffer(); map.zoomTo(5);
+ t.eq(layer.backBuffer.style.width, '100%',
+ '[4->1] back buffer not scaled');
+ removeBackBuffer();
+
+ // change resolution from 1 to 4
+ map.zoomTo(5); removeBackBuffer(); map.zoomTo(3);
+ t.eq(layer.backBuffer.style.width, '100%',
+ '[1->4] back buffer not scaled');
+ removeBackBuffer();
+
+ // change resolution from 4 to 8
+ map.zoomTo(3); removeBackBuffer(); map.zoomTo(2);
+ t.eq(layer.backBuffer.style.width, '100%',
+ '[4->8] back buffer not scaled');
+ removeBackBuffer();
+
+ // change resolution from 4 to 16
+ map.zoomTo(3); removeBackBuffer(); map.zoomTo(1);
+ t.eq(layer.backBuffer.style.width, '50%',
+ '[4->16] back buffer width is as expected');
+ t.eq(layer.backBuffer.style.width, '50%',
+ '[4->16] back buffer height is as expected');
+ removeBackBuffer();
+
+ //
+ // tear down
+ //
+
+ map.destroy();
+ }
</script>
</head>
<body>
<div id="map" style="width:499px;height:549px;display:none"></div>
<div id="map2" style="width:500px;height:550px;display:none"></div>
<div id="map3" style="width:594px;height:464px;display:none"></div>
+<div id="map4" style="width:768px;height:512px;display:none"></div>
</body>
</html>
Modified: sandbox/august/trunk/tests/Layer/MapServer.html
===================================================================
--- sandbox/august/trunk/tests/Layer/MapServer.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Layer/MapServer.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -56,8 +56,8 @@
t.eq( tile.url,
url + "?" + OpenLayers.Util.getParameterString(tParams).replace(/,/g, "+"),
"image src is created correctly via addtile" );
- t.eq( tile.frame.style.top, "6px", "image top is set correctly via addtile" );
- t.eq( tile.frame.style.left, "5px", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.top, "6%", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.left, "5%", "image top is set correctly via addtile" );
var firstChild = layer.div.firstChild.firstChild;
t.eq( firstChild.nodeName.toLowerCase(), "img", "div first child is an image object" );
Modified: sandbox/august/trunk/tests/Layer/PointTrack.html
===================================================================
--- sandbox/august/trunk/tests/Layer/PointTrack.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Layer/PointTrack.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -66,7 +66,7 @@
t.eq(layer.map.layers.length, 1, "layer added to the map successfully");
layer.destroy();
t.eq(layer.map, null, "layer.map is null after destroy");
- t.eq(layer.getFeatureFromEvent({'target':'map'}), null, "getFeatureIdFromEvent doesn't cause an error when called on layer which has been destroyed.");
+ t.ok(!layer.renderer, "layer.renderer is falsey after destroy");
}
Modified: sandbox/august/trunk/tests/Layer/Vector.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Vector.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Layer/Vector.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -575,7 +575,7 @@
}
function test_Layer_Vector_destroy (t) {
- t.plan(5);
+ t.plan(6);
var options = {protocol: new OpenLayers.Protocol(),
strategies: [new OpenLayers.Strategy(), new OpenLayers.Strategy()]}
@@ -584,8 +584,14 @@
map.addLayer(layer);
layer.destroy();
t.eq(layer.map, null, "layer.map is null after destroy");
- t.eq(layer.getFeatureFromEvent({'target':'map'}), null,
- "getFeatureIdFromEvent doesn't cause an error when called on layer which has been destroyed.");
+ t.ok(!layer.renderer, "layer.renderer is falsey");
+ var err;
+ try {
+ layer.getFeatureFromEvent({target: "map"});
+ } catch (ex) {
+ err = ex;
+ }
+ t.ok(err, "Error thrown when calling getFeatureFromEvent on destroyed layer");
t.eq(layer.protocol, null, "layer.protocol is null after destroy");
t.eq(layer.strategies, null, "layer.strategies is null after destroy");
Modified: sandbox/august/trunk/tests/Layer/WMS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/WMS.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Layer/WMS.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -86,8 +86,8 @@
t.eq( tile.url,
layer.getFullRequestString(tParams),
"image src is created correctly via addtile" );
- t.eq( tile.frame.style.top, "6px", "image top is set correctly via addtile" );
- t.eq( tile.frame.style.left, "5px", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.top, "6%", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.left, "5%", "image top is set correctly via addtile" );
var firstChild = layer.div.firstChild.firstChild;
t.eq( firstChild.nodeName.toLowerCase(), "img", "div first child is an image object" );
@@ -117,8 +117,8 @@
t.eq( tile.url,
layer.getFullRequestString(tParams),
"image src is created correctly via addtile" );
- t.eq( tile.frame.style.top, "6px", "image top is set correctly via addtile" );
- t.eq( tile.frame.style.left, "5px", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.top, "6%", "image top is set correctly via addtile" );
+ t.eq( tile.frame.style.left, "5%", "image top is set correctly via addtile" );
var firstChild = layer.div.firstChild.firstChild;
t.eq( firstChild.nodeName.toLowerCase(), "img", "div first child is an image object" );
Modified: sandbox/august/trunk/tests/Layer/WMTS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/WMTS.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Layer/WMTS.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -258,6 +258,37 @@
t.ok( layer2.grid == null, "tiles appropriately destroyed");
map.destroy();
}
+
+ function test_getIdentifier(t) {
+ t.plan(2);
+
+ var map = new OpenLayers.Map('map');
+ var layer, identifier;
+
+ layer = new OpenLayers.Layer.WMTS({
+ name: "Blue Marble WMTS",
+ url: "http://example.com/wmts/",
+ layer: "world",
+ style: "blue_marble",
+ matrixSet: "arcgis_online",
+ tileSize: new OpenLayers.Size(512, 512),
+ requestEncoding: "REST"
+ });
+ map.addLayer(layer);
+ map.setCenter(new OpenLayers.LonLat(0,0), 5);
+
+ layer.zoomOffset = 2;
+ identifier = layer.getIdentifier();
+ t.eq(identifier, 7, '[zoomOffset] getIdentifier return value is correct');
+
+ layer.serverResolutions = ['offset', 1.40625, 0.703125, 0.3515625, 0.17578125,
+ 0.087890625, 0.0439453125];
+ identifier = layer.getIdentifier();
+ t.eq(identifier, 6, '[serverResolutions] getIdentifier return value is correct');
+
+ map.destroy();
+ }
+
</script>
</head>
<body>
Modified: sandbox/august/trunk/tests/Map.html
===================================================================
--- sandbox/august/trunk/tests/Map.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Map.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -692,9 +692,12 @@
{map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'}
);
- map.addLayers([layer,layer]);
-
- t.eq( map.layers.length, 1, "Map does not allow double adding of layers." );
+ map.addLayers([layer]);
+ try {
+ map.addLayers([layer]);
+ } catch(e) {
+ t.ok(true, "Map does not allow double adding of layers." );
+ }
map.destroy();
}
@@ -1383,54 +1386,86 @@
}
function test_Map_zoomToExtent(t) {
- t.plan(8);
-
+ t.plan(9);
- var m = {
- 'baseLayer': {
- 'wrapDateLine': false
- },
- 'setCenter': function(center, zoomLevel) {
- g_Center = center;
- g_ZoomLevel = zoomLevel;
- },
- 'getZoomForExtent': function(bounds, closest) {
- t.ok(bounds.equals(g_ToCenterBounds), "bounds correctly passed into getZoomForExtent()");
- t.ok(closest == g_Closest, "closest correctly passed along to getZoomForExtent()");
- return g_ZoomLevelReturn;
- }
- };
-
- //no wrapDateLine
- g_ZoomLevelReturn = {};
- g_Bounds = new OpenLayers.Bounds(-20,-15,0,5);
- g_ExpectedCenter = new OpenLayers.LonLat(-10,-5);
- g_Closest = {};
- g_ToCenterBounds = g_Bounds;
- var args = [g_Bounds, g_Closest];
- OpenLayers.Map.prototype.zoomToExtent.apply(m, args);
+ var map = new OpenLayers.Map("map");
+ var layer = new OpenLayers.Layer(null, {isBaseLayer: true});
+ map.addLayer(layer);
- t.ok(g_Center.equals(g_ExpectedCenter), "setCenter called on correct center");
- t.ok(g_ZoomLevel == g_ZoomLevelReturn, "correctly passes along zoom level as returned from getZoomForExtent()");
+ var bounds = new OpenLayers.Bounds(-160, 15, -50, 69);
+ var center;
+
+ // default for closest
+ map.zoomToExtent(bounds);
+ center = map.getCenter();
+ t.eq(center.lon, -105, "a) correct x");
+ t.eq(center.lat, 42, "a) correct y");
+ t.eq(map.getZoom(), 2, "a) correct zoom");
+ // false for closest
+ map.zoomToExtent(bounds, false);
+ center = map.getCenter();
+ t.eq(center.lon, -105, "b) correct x");
+ t.eq(center.lat, 42, "b) correct y");
+ t.eq(map.getZoom(), 2, "b) correct zoom");
- //wrapDateLine
- m.baseLayer.wrapDateLine = true;
- m.getMaxExtent = function() { return new OpenLayers.Bounds(-200,-200,200,200); };
+ // true for closest
+ map.zoomToExtent(bounds, true);
+ center = map.getCenter();
+ t.eq(center.lon, -105, "c) correct x");
+ t.eq(center.lat, 42, "c) correct y");
+ t.eq(map.getZoom(), 3, "c) correct zoom");
+
+ map.destroy();
+ }
- g_ZoomLevelReturn = {};
- g_BoundsCenter = {};
- g_Bounds = new OpenLayers.Bounds(160,-60,-60,60);
- g_ExpectedCenter = new OpenLayers.LonLat(-150,0);
- g_Closest = {};
- g_ToCenterBounds = new OpenLayers.Bounds(160,-60,340,60);
- var args = [g_Bounds, g_Closest];
- OpenLayers.Map.prototype.zoomToExtent.apply(m, args);
- t.ok(g_Center.equals(g_ExpectedCenter), "setCenter called on correct center");
- t.ok(g_ZoomLevel == g_ZoomLevelReturn, "correctly passes along zoom level as returned from getZoomForExtent()");
-
+ function test_Map_zoomToExtent_wrapped(t) {
+ t.plan(9);
+ var map = new OpenLayers.Map("map");
+ var layer = new OpenLayers.Layer(null, {isBaseLayer: true, wrapDateLine: true});
+ map.addLayer(layer);
+
+ var bounds, center;
+
+ var cases = [{
+ // real world
+ bbox: [120, -20, 140, 0],
+ center: [130, -10]
+ }, {
+ // one world to the right
+ bbox: [220, -45, 240, 45],
+ center: [-130, 0]
+ }, {
+ // two worlds to the right
+ bbox: [550, -15, 560, 5],
+ center: [-165, -5]
+ }, {
+ // one world to the left
+ bbox: [-240, -15, -220, 5],
+ center: [130, -5]
+ }, {
+ // two worlds to the left
+ bbox: [-600, -15, -580, 5],
+ center: [130, -5]
+ }];
+
+ var num = cases.length;
+ t.plan(num * 2);
+
+ var c, bounds, center;
+ for (var i=0; i<num; ++i) {
+ c = cases[i];
+ bounds = OpenLayers.Bounds.fromArray(c.bbox);
+ map.zoomToExtent(bounds);
+ center = map.getCenter();
+ t.eq(center.lon, c.center[0], "y: " + bounds);
+ t.eq(center.lat, c.center[1], "x: " + bounds);
+ }
+
+ map.destroy();
}
+
function test_allOverlays(t) {
Modified: sandbox/august/trunk/tests/Marker.html
===================================================================
--- sandbox/august/trunk/tests/Marker.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Marker.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -94,8 +94,8 @@
var marker = new OpenLayers.Marker(ll);
mlayer.addMarker(marker);
- t.ok(marker.icon.imageDiv.firstChild.src.contains("img/marker.png"), "Marker.png is default URL");
-
+ t.ok(OpenLayers.String.contains(marker.icon.imageDiv.firstChild.src, "img/marker.png"), "Marker.png is default URL");
+
marker.setUrl("http://example.com/broken.png");
t.eq(marker.icon.imageDiv.firstChild.src, "http://example.com/broken.png", "image source changes correctly.");
Modified: sandbox/august/trunk/tests/Renderer/Canvas.html
===================================================================
--- sandbox/august/trunk/tests/Renderer/Canvas.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Renderer/Canvas.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -3,6 +3,24 @@
<script src="../OLLoader.js"></script>
<script type="text/javascript">
var supported = OpenLayers.Renderer.Canvas.prototype.supported();
+
+ var map, layer;
+ function setUp() {
+ map = new OpenLayers.Map("map");
+ layer = new OpenLayers.Layer.Vector(null, {
+ isBaseLayer: true,
+ renderers: ["Canvas"]
+ });
+ map.addLayer(layer);
+ map.setCenter(new OpenLayers.LonLat(0, 0));
+ }
+
+ function tearDown() {
+ map.destroy();
+ map = null;
+ layer = null;
+ }
+
function test_Renderer_Canvas_constructor(t) {
if (!supported) { t.plan(0); return; }
t.plan(2);
@@ -18,16 +36,17 @@
function test_Renderer_Canvas_setextent(t) {
if (!supported) { t.plan(0); return; }
t.plan(2);
- var el = document.body;
- el.id = "foo";
- var r = new OpenLayers.Renderer.Canvas(el.id);
+ setUp();
+
+ var r = layer.renderer;
var extent = new OpenLayers.Bounds(1,2,3,4);
r.resolution = 1;
r.setExtent(extent, true);
t.ok(r.extent.equals(extent), "extent is correctly set");
t.eq(r.resolution, null, "resolution nullified");
- r.destroy();
+
+ tearDown();
}
function test_Renderer_Canvas_setsize(t) {
@@ -124,18 +143,8 @@
}
t.plan(10);
- var layer = new OpenLayers.Layer.Vector(null, {
- isBaseLayer: true,
- renderers: ["Canvas"]
- });
- var map = new OpenLayers.Map({
- div: "map",
- controls: [],
- layers: [layer],
- center: new OpenLayers.LonLat(0, 0),
- zoom: 0
- });
+ setUp();
var renderer = layer.renderer;
var count = 0;
@@ -192,7 +201,7 @@
t.eq(count, 1, "d) redraw is called when drawing a feature without bounds");
renderer.clear();
- map.destroy();
+ tearDown();
}
Modified: sandbox/august/trunk/tests/Renderer/Elements.html
===================================================================
--- sandbox/august/trunk/tests/Renderer/Elements.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Renderer/Elements.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -616,8 +616,41 @@
tearDown();
}
+ function test_setExtent(t) {
+ t.plan(10);
+ setUp();
+ var resolution = 1;
+ var r = create_renderer();
+ r.map = {
+ getMaxExtent: function() {
+ return new OpenLayers.Bounds(-180,-90,180,90);
+ },
+ getResolution: function() {
+ return resolution;
+ },
+ baseLayer: {wrapDateLine: true}
+ }
+
+ r.setExtent(new OpenLayers.Bounds(179, -1, 182, 1), true);
+ t.eq(r.rightOfDateLine, true, "on the right side of the dateline");
+ t.eq(r.xOffset, r.map.getMaxExtent().getWidth(), "correct xOffset");
+ r.setExtent(new OpenLayers.Bounds(179.5, -1, 182.5, 1), false);
+ t.eq(r.rightOfDateLine, true, "still on the right side of the dateline");
+ t.eq(r.xOffset, r.map.getMaxExtent().getWidth(), "still correct xOffset");
+ resolution = 2;
+ r.setExtent(new OpenLayers.Bounds(178, -2, 184, 2), true);
+ t.eq(r.rightOfDateLine, true, "still on the right side of the dateline");
+ t.eq(r.xOffset, r.map.getMaxExtent().getWidth() / resolution, "xOffset adjusted for new resolution");
+ r.setExtent(new OpenLayers.Bounds(-184, -2, 178, 2), false);
+ t.eq(r.rightOfDateLine, false, "on the left side of the dateline");
+ t.eq(r.xOffset, 0, "no xOffset");
+ r.setExtent(new OpenLayers.Bounds(178, -2, 184, 2), true);
+ t.eq(r.rightOfDateLine, true, "back on the right side of the dateline");
+ t.eq(r.xOffset, r.map.getMaxExtent().getWidth() / resolution, "correct xOffset");
+
+ tearDown();
+ }
-
</script>
</head>
<body>
Modified: sandbox/august/trunk/tests/Renderer.html
===================================================================
--- sandbox/august/trunk/tests/Renderer.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Renderer.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -24,6 +24,7 @@
t.plan(2);
var r = new OpenLayers.Renderer();
+ r.map = {};
var extent = new OpenLayers.Bounds(1,2,3,4);
r.resolution = 1;
r.setExtent(extent, true);
@@ -52,6 +53,21 @@
t.eq(resolution, map.getResolution(), "resolution matches the map resolution");
t.eq(r.resolution, resolution, "resolution is correctly set");
}
+
+ function test_calculateFeatureDx(t) {
+ t.plan(4);
+ var r = new OpenLayers.Renderer();
+ r.extent = new OpenLayers.Bounds(177, -2, 183, 2);
+ var worldBounds = new OpenLayers.Bounds(-180,-90,180,90);
+ r.calculateFeatureDx(new OpenLayers.Bounds(179,-1,181,1), worldBounds);
+ t.eq(r.featureDx, 0, "no offset for feature inside extent");
+ r.calculateFeatureDx(new OpenLayers.Bounds(-181,-1,-179,1), worldBounds);
+ t.eq(r.featureDx, -360, "negative offset for feature on other end of world");
+ r.calculateFeatureDx(new OpenLayers.Bounds(359,-1,361,1), worldBounds);
+ t.eq(r.featureDx, 360, "positive offset for feature that is one world away");
+ r.calculateFeatureDx(new OpenLayers.Bounds(719,-1,721,1), worldBounds);
+ t.eq(r.featureDx, 720, "correct offset for feature that is two worlds away");
+ }
function test_Renderer_destroy(t) {
t.plan(5);
Modified: sandbox/august/trunk/tests/Request.html
===================================================================
--- sandbox/august/trunk/tests/Request.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Request.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -20,7 +20,7 @@
function test_issue(t) {
setup();
- t.plan(22);
+ t.plan(25);
var request, config;
var proto = OpenLayers.Request.XMLHttpRequest.prototype;
var issue = OpenLayers.Function.bind(OpenLayers.Request.issue,
@@ -96,19 +96,35 @@
// reset open method
proto.open = _open;
- // test that headers are correctly set - 4 tests
+ // test that headers are correctly set - 6 tests
var _setRequestHeader = proto.setRequestHeader;
config = {
headers: {
foo: "bar",
- chicken: "soup"
+ chicken: "soup",
+ // This checks whether the autoadded 'X-Requested-With'-header
+ // can be overridden, even though the given key here is spelled
+ // in lowercase.
+ 'x-requested-with': 'humpty'
}
};
+ // we also track how often setRequestHeader is being called, it should
+ // be called once for every header, even with the above defined
+ // custom 'x-requested-with' header which we usually autoadd.
+ // If the numbers match, we make sure to not send duplicate headers like
+ // x-requested-with: humpty AND
+ // X-Requested-With: XMLHttpRequest
+ var actualSetHeaderCnt = 0;
+ var expectedSetHeaderCnt = 3; // and not four!
proto.setRequestHeader = function(key, value) {
+ actualSetHeaderCnt++;
t.ok(key in config.headers, "setRequestHeader called with key: " + key);
t.eq(value, config.headers[key], "setRequestHeader called with correct value: " + value);
- }
+ };
request = issue(config);
+
+ t.eq(actualSetHeaderCnt, expectedSetHeaderCnt, 'A custom "x-requested-with" header overrides the default "X-Requested-With" header.');
+
proto.setRequestHeader = _setRequestHeader;
// test that callback is called (no scope) - 1 test
@@ -444,6 +460,35 @@
var req = OpenLayers.Request.GET();
req.abort();
}
+
+ function test_XRequestedWithHeaderAutoadded(t) {
+ t.plan( 2 );
+
+ var headerSet = false;
+ var headerGot = '';
+ var headerExpected = 'XMLHttpRequest';
+
+ // save to be able to restore later
+ var _setRequestHeader = OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader;
+
+ OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader = function(field, value) {
+ if (field === 'X-Requested-With') {
+ headerSet = true;
+ headerGot = value;
+ }
+ };
+
+ var req = OpenLayers.Request.issue({
+ url: location.href,
+ async: false
+ });
+
+ t.ok( headerSet, 'We call the method "setRequestHeader" to set a "X-Requested-With"-header' );
+ t.eq( headerGot, headerExpected, 'The "X-Requested-With"-header is set to "' + headerExpected + '" as expected.' );
+
+ // restore old setRequestHeader
+ OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader = _setRequestHeader;
+ }
</script>
</head>
<body>
Modified: sandbox/august/trunk/tests/Style.html
===================================================================
--- sandbox/august/trunk/tests/Style.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Style.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -176,9 +176,9 @@
// c) test that label in returned symbolizer is a string even if property value is a number
var symbolizer = style.createSymbolizer(
- new OpenLayers.Feature.Vector(null, {foo: "bar", labelValue: 10})
+ new OpenLayers.Feature.Vector(null, {foo: "bar", labelValue: 0})
);
- t.eq(symbolizer.label, "10", "c) feature property cast to string when used as symbolizer label");
+ t.eq(symbolizer.label, "0", "c) feature property cast to string when used as symbolizer label");
}
Modified: sandbox/august/trunk/tests/Tile/Image/IFrame.html
===================================================================
--- sandbox/august/trunk/tests/Tile/Image/IFrame.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Tile/Image/IFrame.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -15,7 +15,7 @@
var wmsUrl = "http://labs.metacarta.com/wms/vmap0?";
function test_Tile_Image_IFrame_create (t) {
- t.plan( 5 );
+ t.plan( 3 );
map = new OpenLayers.Map('map');
var bar = new Array(205).join("1234567890");
layer = new OpenLayers.Layer.WMS(name, wmsUrl,
@@ -25,7 +25,6 @@
map.addLayer(layer);
var tile = layer.addTile(bounds, position);
- t.eq(tile.backBufferMode, 2, "backBufferMode is 2 after tile creation");
tile.draw();
t.eq(tile.imgDiv.nodeName.toLowerCase(), "iframe", "IFrame used for long URL");
@@ -33,7 +32,6 @@
layer.mergeNewParams({foo: null});
tile.draw();
t.eq(tile.imgDiv.nodeName.toLowerCase(), "img", "IMG used for short URL");
- t.eq(tile.backBufferMode, 2, "backBufferMode reset to 2");
tile.maxGetUrlLength = 0;
tile.draw();
Modified: sandbox/august/trunk/tests/Tile/Image.html
===================================================================
--- sandbox/august/trunk/tests/Tile/Image.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Tile/Image.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -5,12 +5,27 @@
var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
var tile;
+ var map, layer;
+ function setUp() {
+ map = new OpenLayers.Map("map");
+ layer = new OpenLayers.Layer(null, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer)
+ map.setCenter(new OpenLayers.LonLat(0, 0));
+ }
+
+ function tearDown() {
+ map.destroy();
+ map = null;
+ layer = null;
+ }
+
function test_Tile_Image_constructor (t) {
t.plan( 6 );
- var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
- "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
-
+ setUp();
+
var position = new OpenLayers.Pixel(20,30);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "http://www.openlayers.org/dev/tests/tileimage";
@@ -23,6 +38,8 @@
t.ok( tile.bounds.equals(bounds), "tile.bounds is set correctly");
t.eq( tile.url, url, "tile.url is set correctly");
t.ok( tile.size.equals(size), "tile.size is set correctly");
+
+ tearDown();
}
function test_destroy_observers(t) {
@@ -309,10 +326,12 @@
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0,0), 5);
var tile = layer.grid[0][0];
+ tile.isLoading = false;
var img = tile.imgDiv;
- var backBuffer = tile.createBackBuffer();
- t.eq(backBuffer.style.left, tile.frame.style.left, "backBuffer tile has same left style as frame");
- t.ok(backBuffer.firstChild === img, "image appended to backBuffer");
+ var bb = tile.createBackBuffer();
+ t.eq(bb.style.left, tile.frame.style.left,
+ "backbuffer has same left style as frame");
+ t.ok(bb.firstChild === img, "image appended to bb");
t.ok(tile.imgDiv == null, "image reference removed from tile");
map.destroy();
}
Modified: sandbox/august/trunk/tests/Tile/WFS.html
===================================================================
--- sandbox/august/trunk/tests/Tile/WFS.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Tile/WFS.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -3,11 +3,27 @@
<script src="../OLLoader.js"></script>
<script type="text/javascript">
var tile;
+
+ var map, layer;
+ function setUp() {
+ map = new OpenLayers.Map("map");
+ layer = new OpenLayers.Layer(null, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer)
+ map.setCenter(new OpenLayers.LonLat(0, 0));
+ }
+ function tearDown() {
+ map.destroy();
+ map = null;
+ layer = null;
+ }
+
function test_Tile_WFS_constructor (t) {
t.plan( 8 );
+ setUp();
- var layer = {}; // bogus layer
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
@@ -16,7 +32,7 @@
tile = new OpenLayers.Tile.WFS(layer, position, bounds, url, size);
t.ok( tile instanceof OpenLayers.Tile.WFS, "new OpenLayers.Tile.WFS returns Tile.WFS object" );
- t.eq( tile.layer, layer, "tile.layer set correctly");
+ t.ok( tile.layer === layer, "tile.layer set correctly");
t.ok( tile.position.equals(position), "tile.position set correctly");
t.ok( tile.bounds.equals(bounds), "tile.bounds set correctly");
t.eq( tile.url, url, "tile.url set correctly");
@@ -24,10 +40,13 @@
t.ok( tile.id != null, "tile is given an id");
t.ok( tile.events != null, "tile's events intitialized");
+
+ tearDown();
}
function test_Tile_WFS_requestSuccess(t) {
t.plan(2);
+ setUp();
var tile = {
'request': {}
@@ -37,12 +56,6 @@
t.ok(tile.request == null, "request property on tile set to null");
- var layer = {
- SUPPORTED_TRANSITIONS: [],
- events: {
- unregister: function() {}
- }
- }; // bogus layer
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
@@ -53,6 +66,7 @@
tile.requestSuccess({'requestText': '<xml><foo /></xml>'});
t.ok(true, "Didn't fail after calling requestSuccess on destroyed tile.");
+ tearDown();
}
function test_Tile_WFS_loadFeaturesForRegion(t) {
@@ -88,13 +102,8 @@
function test_Tile_WFS_destroy(t) {
t.plan(9);
+ setUp();
- var layer = {
- SUPPORTED_TRANSITIONS: [],
- events: {
- unregister: function() {}
- }
- }; // bogus layer
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
@@ -127,43 +136,75 @@
tile.requestSuccess({'requestText': '<xml><foo /></xml>'});
t.ok(true, "Didn't fail after calling requestSuccess on destroyed tile.");
+
+ tearDown();
}
function test_nonxml_format(t) {
- t.plan(1);
+ t.plan(2);
+
+ setUp();
+
var data = '{"type":"Feature", "id":"OpenLayers.Feature.Vector_135", "properties":{}, "geometry":{"type":"Point", "coordinates":[118.125, -18.6328125]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}'
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
var size = new OpenLayers.Size(5,6);
- var tile = new OpenLayers.Tile.WFS({
- vectorMode: true,
+ var log = [];
+
+ var l = new OpenLayers.Layer(null, {
+ vectorMode: true,
formatObject: new OpenLayers.Format.GeoJSON(),
addFeatures: function(features) {
- t.eq(features.length, 1, "GeoJSON format returned a single feature which was added.")
+ log.push(features);
}
- }, position, bounds, url, size);
+ })
+ map.addLayer(l);
+
+ var tile = new OpenLayers.Tile.WFS(l, position, bounds, url, size);
+
tile.requestSuccess({responseText: data});
+
+ t.eq(log.length, 1, "one call logged")
+ t.eq(log[0] && log[0].length, 1, "GeoJSON format returned a single feature which was added.");
+
+ tearDown();
}
function test_xml_string_and_dom(t) {
- t.plan(2);
+ t.plan(4);
+ setUp();
+
var data = '<?xml version="1.0" encoding="ISO-8859-1" ?><wfs:FeatureCollection xmlns:bsc="http://www.bsc-eoc.org/bsc" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd http://www.bsc-eoc.org/bsc http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=OWLS&OUTPUTFORMAT=XMLSCHEMA"> <gml:boundedBy> <gml:Box srsName="EPSG:4326"> <gml:coordinates>-94.989723,43.285833 -74.755001,51.709520</gml:coordinates> </gml:Box> </gml:boundedBy> <gml:featureMember> <bsc:OWLS> <gml:boundedBy> <gml:Box srsName="EPSG:4326"> <gml:coordinates>-94.142500,50.992777 -94.142500,50.992777</gml:coor
dinates> </gml:Box> </gml:boundedBy> <bsc:msGeometry> <gml:Point srsName="EPSG:4326"> <gml:coordinates>-94.142500,50.992777</gml:coordinates> </gml:Point> </bsc:msGeometry> <bsc:ROUTEID>ON_2</bsc:ROUTEID> <bsc:ROUTE_NAME>Suffel Road</bsc:ROUTE_NAME> <bsc:LATITUDE>50.9927770</bsc:LATITUDE> <bsc:LONGITUDE>-94.1425000</bsc:LONGITUDE> </bsc:OWLS> </gml:featureMember></wfs:FeatureCollection>';
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
var size = new OpenLayers.Size(5,6);
- var tile = new OpenLayers.Tile.WFS({
- }, position, bounds, url, size);
+
+ var l = new OpenLayers.Layer();
+ map.addLayer(l);
+
+ var tile = new OpenLayers.Tile.WFS(l, position, bounds, url, size);
+
+ var log = [];
tile.addResults = function(results) {
- t.eq(results.length, 1, "results count is correct when passing in XML as a string into non-vectormode");
+ log.push(results);
}
tile.requestSuccess({responseText: data});
+ t.eq(log.length, 1, "first call logged");
+ t.eq(log[0] && log[0].length, 1, "results count is correct when passing in XML as a string into non-vectormode");
+
+ log.length = 0;
tile.addResults = function(results) {
- t.eq(results.length, 1, "results count is correct when passing in XML as DOM into non-vectormode");
+ log.push(results);
}
tile.requestSuccess({responseXML: OpenLayers.Format.XML.prototype.read(data)});
+
+ t.eq(log.length, 1, "second call logged");
+ t.eq(log[0] && log[0].length, 1, "results count is correct when passing in XML as DOM into non-vectormode");
+
+ tearDown();
}
</script>
</head>
Modified: sandbox/august/trunk/tests/Tile.html
===================================================================
--- sandbox/august/trunk/tests/Tile.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Tile.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -3,11 +3,31 @@
<script src="OLLoader.js"></script>
<script type="text/javascript">
var tile;
+
+ var map, layer;
+ function setUp() {
+ map = new OpenLayers.Map("map");
+ layer = new OpenLayers.Layer(null, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer)
+ map.setCenter(new OpenLayers.LonLat(0, 0));
+ }
+ function tearDown() {
+ map.destroy();
+ map = null;
+ layer = null;
+ }
+
+
function test_Tile_constructor (t) {
t.plan( 12 );
- var layer = {}; // bogus layer
+ setUp();
+
+ var dummy = {};
+
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
@@ -15,31 +35,30 @@
tile = new OpenLayers.Tile(layer, position, bounds, url, size);
- t.ok( tile instanceof OpenLayers.Tile, "new OpenLayers.Tile returns Tile object" );
- t.eq( tile.layer, layer, "tile.layer set correctly");
- t.ok( tile.position.equals(position), "tile.position set correctly");
- t.ok( tile.position != position, "tile.position set not by reference");
- t.ok( tile.bounds.equals(bounds), "tile.bounds set correctly");
- t.ok( tile.bounds != bounds, "tile.bounds set not by reference");
- t.eq( tile.url, url, "tile.url set correctly");
- t.ok( tile.size.equals(size), "tile.size is set correctly" );
- t.ok( tile.size != size, "tile.size set not by reference");
+ t.ok(tile instanceof OpenLayers.Tile, "new OpenLayers.Tile returns Tile object");
+ t.ok(tile.layer === layer, "tile.layer set correctly");
+ t.ok(tile.position.equals(position), "tile.position set correctly");
+ t.ok(tile.position != position, "tile.position set not by reference");
+ t.ok(tile.bounds.equals(bounds), "tile.bounds set correctly");
+ t.ok(tile.bounds != bounds, "tile.bounds set not by reference");
+ t.eq(tile.url, url, "tile.url set correctly");
+ t.ok(tile.size.equals(size), "tile.size is set correctly");
+ t.ok(tile.size != size, "tile.size set not by reference");
- t.ok( tile.id != null, "tile is given an id");
+ t.ok(tile.id != null, "tile is given an id");
t.ok(OpenLayers.String.startsWith(tile.id, "Tile_"),
"tile's id starts correctly");
- t.ok( tile.events != null, "tile's events intitialized");
+ t.ok(tile.events != null, "tile's events intitialized");
+
+ tearDown();
+
}
function test_Tile_destroy(t) {
t.plan( 6 );
+
+ setUp();
- var layer = {
- SUPPORTED_TRANSITIONS: [],
- events: {
- unregister: function() {}
- }
- }; // bogus layer
var position = new OpenLayers.Pixel(10,20);
var bounds = new OpenLayers.Bounds(1,2,3,4);
var url = "bobob";
@@ -59,6 +78,9 @@
t.ok(tile.position == null, "tile.position set to null");
t.ok(tile.events == null, "tile.events set to null");
+
+ tearDown();
+
}
</script>
Modified: sandbox/august/trunk/tests/Util.html
===================================================================
--- sandbox/august/trunk/tests/Util.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/Util.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -254,21 +254,6 @@
}
- function test_Util_imageLoadError(t) {
- t.plan(2);
-
- var img = OpenLayers.Util.createImage(null, null, null, null, null, null, null, false);
-
- // mock up image load failure
- img._attempts = OpenLayers.IMAGE_RELOAD_ATTEMPTS + 1;
- OpenLayers.Util.onImageLoadError.call(img);
- t.ok(OpenLayers.Element.hasClass(img, 'olImageLoadError'), 'broken image has class olImageLoadError');
-
- // mock up image load success
- OpenLayers.Util.onImageLoad.call(img);
- t.ok(!OpenLayers.Element.hasClass(img, 'olImageLoadError'), 'good image does not have class olImageLoadError');
- }
-
function test_Util_applyDefaults(t) {
t.plan(12);
Modified: sandbox/august/trunk/tests/list-tests.html
===================================================================
--- sandbox/august/trunk/tests/list-tests.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/list-tests.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -224,7 +224,6 @@
<li>Symbolizer/Text.html</li>
<li>Tile.html</li>
<li>Tile/Image.html</li>
- <li>Tile/BackBufferable.html</li>
<li>Tile/Image/IFrame.html</li>
<li>Tile/WFS.html</li>
<li>Tween.html</li>
Modified: sandbox/august/trunk/tests/manual/dateline-sketch.html
===================================================================
--- sandbox/august/trunk/tests/manual/dateline-sketch.html 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/tests/manual/dateline-sketch.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -13,33 +13,9 @@
}
</style>
- <script src="http://maps.google.com/maps/api/js?v=3.5&sensor=false"></script>
-
<script src="../../lib/OpenLayers.js"></script>
- <script type="text/javascript">
-
-// make map available for easy debugging
-var map;
-
-function init(){
- map = new OpenLayers.Map('map');
-
- var gmap = new OpenLayers.Layer.Google(
- "Google Streets",
- {sphericalMercator: true}
- );
- var vector = new OpenLayers.Layer.Vector("Editable Vectors");
-
- map.addLayers([gmap, vector]);
- map.addControl(new OpenLayers.Control.EditingToolbar(vector));
-
- var extent = new OpenLayers.Bounds(-24225034.496992, -11368938.517442, -14206280.326992, -1350184.3474418);
- map.zoomToExtent(extent);
-}
-
- </script>
</head>
- <body onload="init()">
+ <body>
<h1 id="title">OpenLayers sketch handlers crossing the dateline example</h1>
<div id="tags">
@@ -55,5 +31,36 @@
<div id="docs">
</div>
+ <script type="text/javascript">
+
+ var map = new OpenLayers.Map('map');
+
+ var base = new OpenLayers.Layer.WMS("marble",
+ "http://demo.opengeo.org/geoserver/wms",
+ {layers: "topp:naturalearth"},
+ {wrapDateLine: true}
+ );
+
+ // allow testing of specific renderers via "?renderer=Canvas", etc
+ var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+ renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
+ var vector = new OpenLayers.Layer.Vector("Editable Vectors", {renderers: renderer});
+
+ map.addLayers([base, vector]);
+
+ var wkt = new OpenLayers.Format.WKT();
+ var f = wkt.read("POLYGON((210.8828125 39.7265625,151.8203125 36.2109375,152.171875 -9.4921875,219.3203125 -10.546875,210.8828125 39.7265625))");
+
+ var f2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(-190, 0));
+
+ vector.addFeatures([f, f2]);
+
+ map.addControl(new OpenLayers.Control.EditingToolbar(vector));
+
+ map.setCenter(new OpenLayers.LonLat(-179, 0), 2);
+
+ </script>
+
</body>
</html>
Copied: sandbox/august/trunk/tests/manual/dateline-smallextent.html (from rev 12437, trunk/openlayers/tests/manual/dateline-smallextent.html)
===================================================================
--- sandbox/august/trunk/tests/manual/dateline-smallextent.html (rev 0)
+++ sandbox/august/trunk/tests/manual/dateline-smallextent.html 2011-12-02 17:50:27 UTC (rev 12438)
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <title>OpenLayers: Overlay layer extents crossing the dateline</title>
+ <link rel="stylesheet" href="../../theme/default/style.css" type="text/css">
+ <link rel="stylesheet" href="../../examples/style.css" type="text/css">
+ <style type="text/css">
+ #map {
+ height: 512px;
+ }
+ </style>
+
+ <script src="../../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+
+// make map available for easy debugging
+var map;
+
+function init(){
+ map = new OpenLayers.Map('map');
+
+ var base = new OpenLayers.Layer.WMS("marble",
+ "http://demo.opengeo.org/geoserver/wms",
+ {layers: "topp:naturalearth"},
+ {wrapDateLine: true}
+ );
+ var extent = new OpenLayers.Bounds(142.3828125,-70.902270266175,233.6171875,-12.039326531729);
+ var wms = new OpenLayers.Layer.WMS( "world",
+ "http://demo.opengeo.org/geoserver/wms",
+ {layers: 'world', transparent: true},
+ {maxExtent: extent}
+ );
+
+ var vector = new OpenLayers.Layer.Vector();
+ vector.addFeatures([
+ new OpenLayers.Feature.Vector(extent.toGeometry())
+ ]);
+
+ map.addLayers([base, wms, vector]);
+
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
+ map.zoomToExtent(extent);
+}
+
+ </script>
+ </head>
+ <body onload="init()">
+ <h1 id="title">OpenLayers overlays crossing the dateline test</h1>
+
+ <p id="shortdesc">
+ The overlay has an extent smaller than the world extent, but exceeds
+ the world extent. The base layer is configured with wrapDateLine set to
+ true. The area inside the orange rectangle should always contain tiles
+ from the world layer, regardless of the zoom level.
+ </p>
+ <div id="map" class="smallmap"></div>
+ </body>
+</html>
Modified: sandbox/august/trunk/theme/default/style.css
===================================================================
--- sandbox/august/trunk/theme/default/style.css 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/theme/default/style.css 2011-12-02 17:50:27 UTC (rev 12438)
@@ -90,12 +90,7 @@
-moz-border-radius: 1em 0 0 0;
}
-.olControlOverviewMapMinimizeButton {
- right: 0;
- bottom: 80px;
- cursor: pointer;
-}
-
+.olControlOverviewMapMinimizeButton,
.olControlOverviewMapMaximizeButton {
right: 0;
bottom: 80px;
Modified: sandbox/august/trunk/util/ags-proxy.jsp
===================================================================
--- sandbox/august/trunk/util/ags-proxy.jsp 2011-11-17 07:48:56 UTC (rev 12437)
+++ sandbox/august/trunk/util/ags-proxy.jsp 2011-12-02 17:50:27 UTC (rev 12438)
@@ -8,6 +8,7 @@
"http://sampleserver1.arcgisonline.com/arcgis/rest/services",
"http://sampleserver2.arcgisonline.com/arcgis/rest/services",
"http://ais3:6080/arcgis/rest/services",
+ "http://gouf:6080/arcgis/rest/services", //NOTE - no comma after the last item
"http://sazabiii:6080/arcgis/rest/services" //NOTE - no comma after the last item
};
%>
More information about the Commits
mailing list