Merge branch 'master' into multiple-builds
This commit is contained in:
@@ -319,6 +319,7 @@ Group: OpenLayers {
|
|||||||
File: nn (no auto-title, OpenLayers/Lang/nn.js)
|
File: nn (no auto-title, OpenLayers/Lang/nn.js)
|
||||||
File: oc (no auto-title, OpenLayers/Lang/oc.js)
|
File: oc (no auto-title, OpenLayers/Lang/oc.js)
|
||||||
File: pt (no auto-title, OpenLayers/Lang/pt.js)
|
File: pt (no auto-title, OpenLayers/Lang/pt.js)
|
||||||
|
File: pl (no auto-title, OpenLayers/Lang/pl.js)
|
||||||
File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js)
|
File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js)
|
||||||
File: ru (no auto-title, OpenLayers/Lang/ru.js)
|
File: ru (no auto-title, OpenLayers/Lang/ru.js)
|
||||||
File: sk (no auto-title, OpenLayers/Lang/sk.js)
|
File: sk (no auto-title, OpenLayers/Lang/sk.js)
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ Group: OpenLayers {
|
|||||||
File: nl (no auto-title, OpenLayers/Lang/nl.js)
|
File: nl (no auto-title, OpenLayers/Lang/nl.js)
|
||||||
File: nn (no auto-title, OpenLayers/Lang/nn.js)
|
File: nn (no auto-title, OpenLayers/Lang/nn.js)
|
||||||
File: oc (no auto-title, OpenLayers/Lang/oc.js)
|
File: oc (no auto-title, OpenLayers/Lang/oc.js)
|
||||||
|
File: pl (no auto-title, OpenLayers/Lang/pl.js)
|
||||||
File: pt (no auto-title, OpenLayers/Lang/pt.js)
|
File: pt (no auto-title, OpenLayers/Lang/pt.js)
|
||||||
File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js)
|
File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js)
|
||||||
File: ru (no auto-title, OpenLayers/Lang/ru.js)
|
File: ru (no auto-title, OpenLayers/Lang/ru.js)
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
<!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 Zoom Example</title>
|
||||||
|
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css">
|
||||||
|
<style>
|
||||||
|
.olControlAttribution {
|
||||||
|
bottom: 5px;
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
#customZoom {
|
||||||
|
z-index: 1001;
|
||||||
|
position: relative;
|
||||||
|
top: 10px;
|
||||||
|
left: 10px;
|
||||||
|
}
|
||||||
|
#customZoom a {
|
||||||
|
text-decoration: none;
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 50px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
background: #369;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
#customZoom a:hover {
|
||||||
|
background: #036;
|
||||||
|
}
|
||||||
|
#customZoomOut {
|
||||||
|
top: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 id="title">Zoom Control Example</h1>
|
||||||
|
<div id="tags">zoom control</div>
|
||||||
|
|
||||||
|
<div id="shortdesc">Shows how to use a simple zoom control.</div>
|
||||||
|
|
||||||
|
<div id="map" class="smallmap"></div>
|
||||||
|
<p>The map above uses the default control configuration and style.</p>
|
||||||
|
<p>The map below uses the custom zoom elements and styling.</p>
|
||||||
|
<div id="map2" class="smallmap">
|
||||||
|
<div id="customZoom">
|
||||||
|
<a href="#customZoomIn" id="customZoomIn">in</a>
|
||||||
|
<a href="#customZoomIn" id="customZoomOut">out</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="docs">
|
||||||
|
<p>This example demonstrates the use of a Zoom control.</p>
|
||||||
|
<p>
|
||||||
|
See the <a href="zoom.js" target="_blank">zoom.js</a> source
|
||||||
|
for details.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<script src="../lib/OpenLayers.js"></script>
|
||||||
|
<script src="zoom.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
var map = new OpenLayers.Map({
|
||||||
|
div: "map",
|
||||||
|
layers: [new OpenLayers.Layer.OSM()],
|
||||||
|
controls: [
|
||||||
|
new OpenLayers.Control.Navigation({
|
||||||
|
dragPanOptions: {
|
||||||
|
enableKinetic: true
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new OpenLayers.Control.Attribution(),
|
||||||
|
new OpenLayers.Control.Zoom()
|
||||||
|
],
|
||||||
|
center: [0, 0],
|
||||||
|
zoom: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
var map2 = new OpenLayers.Map({
|
||||||
|
div: "map2",
|
||||||
|
layers: [new OpenLayers.Layer.OSM()],
|
||||||
|
controls: [
|
||||||
|
new OpenLayers.Control.Navigation({
|
||||||
|
dragPanOptions: {
|
||||||
|
enableKinetic: true
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new OpenLayers.Control.Attribution(),
|
||||||
|
new OpenLayers.Control.Zoom({
|
||||||
|
zoomInId: "customZoomIn",
|
||||||
|
zoomOutId: "customZoomOut"
|
||||||
|
})
|
||||||
|
],
|
||||||
|
center: [0, 0],
|
||||||
|
zoom: 1
|
||||||
|
});
|
||||||
@@ -204,6 +204,7 @@
|
|||||||
"OpenLayers/Control/Graticule.js",
|
"OpenLayers/Control/Graticule.js",
|
||||||
"OpenLayers/Control/TransformFeature.js",
|
"OpenLayers/Control/TransformFeature.js",
|
||||||
"OpenLayers/Control/SLDSelect.js",
|
"OpenLayers/Control/SLDSelect.js",
|
||||||
|
"OpenLayers/Control/Zoom.js",
|
||||||
"OpenLayers/Geometry.js",
|
"OpenLayers/Geometry.js",
|
||||||
"OpenLayers/Geometry/Collection.js",
|
"OpenLayers/Geometry/Collection.js",
|
||||||
"OpenLayers/Geometry/Point.js",
|
"OpenLayers/Geometry/Point.js",
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ OpenLayers.Animation = (function(window) {
|
|||||||
* Terminates an animation loop started with <start>.
|
* Terminates an animation loop started with <start>.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* {Number} Identifier returned from <start>.
|
* id - {Number} Identifier returned from <start>.
|
||||||
*/
|
*/
|
||||||
function stop(id) {
|
function stop(id) {
|
||||||
delete loops[id];
|
delete loops[id];
|
||||||
|
|||||||
@@ -187,7 +187,10 @@ OpenLayers.String = {
|
|||||||
* APIFunction: numericIf
|
* APIFunction: numericIf
|
||||||
* Converts a string that appears to be a numeric value into a number.
|
* Converts a string that appears to be a numeric value into a number.
|
||||||
*
|
*
|
||||||
* Returns
|
* Parameters:
|
||||||
|
* value - {String}
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
* {Number|String} a Number if the passed value is a number, a String
|
* {Number|String} a Number if the passed value is a number, a String
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Property: layers
|
* Property: layers
|
||||||
* {Array(<OpenLayers.Layer>)}
|
* {String} Each character represents the state of the corresponding layer
|
||||||
|
* on the map.
|
||||||
*/
|
*/
|
||||||
layers: null,
|
layers: null,
|
||||||
|
|
||||||
|
|||||||
@@ -333,11 +333,11 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method selectHover
|
* Method: selectHover
|
||||||
* Callback from the handlers.hover set up when <hover> selection is on
|
* Callback from the handlers.hover set up when <hover> selection is on
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* evt {Object} - event object with an xy property
|
* evt - {Object} event object with an xy property
|
||||||
*/
|
*/
|
||||||
selectHover: function(evt) {
|
selectHover: function(evt) {
|
||||||
var bounds = this.pixelToBounds(evt.xy);
|
var bounds = this.pixelToBounds(evt.xy);
|
||||||
@@ -459,7 +459,7 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* Sets the multiple and toggle modifiers according to the current event
|
* Sets the multiple and toggle modifiers according to the current event
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* evt {<OpenLayers.Event>}
|
* evt - {<OpenLayers.Event>}
|
||||||
*/
|
*/
|
||||||
setModifiers: function(evt) {
|
setModifiers: function(evt) {
|
||||||
this.modifiers = {
|
this.modifiers = {
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* the mouse is over a vertex.
|
* the mouse is over a vertex.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* {Integer} Key code corresponding to the keypress event.
|
* evt - {Event} Keypress event.
|
||||||
*/
|
*/
|
||||||
handleKeypress: function(evt) {
|
handleKeypress: function(evt) {
|
||||||
var code = evt.keyCode;
|
var code = evt.keyCode;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* current map view. By default it is drawn in the lower right corner of the
|
* current map view. By default it is drawn in the lower right corner of the
|
||||||
* map. The href is updated as the map is zoomed, panned and whilst layers
|
* map. The href is updated as the map is zoomed, panned and whilst layers
|
||||||
* are switched.
|
* are switched.
|
||||||
* `
|
*
|
||||||
* Inherits from:
|
* Inherits from:
|
||||||
* - <OpenLayers.Control>
|
* - <OpenLayers.Control>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
|
||||||
|
* full list of contributors). Published under the Clear BSD license.
|
||||||
|
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
|
||||||
|
* full text of the license. */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @requires OpenLayers/Control.js
|
||||||
|
* @requires OpenLayers/Events/buttonclick.js
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: OpenLayers.Control.Zoom
|
||||||
|
* The Zoom control is a pair of +/- links for zooming in and out.
|
||||||
|
*
|
||||||
|
* Inherits from:
|
||||||
|
* - <OpenLayers.Control>
|
||||||
|
*/
|
||||||
|
OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APIProperty: zoomInText
|
||||||
|
* {String}
|
||||||
|
* Text for zoom-in link. Default is "+".
|
||||||
|
*/
|
||||||
|
zoomInText: "+",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APIProperty: zoomInId
|
||||||
|
* {String}
|
||||||
|
* Instead of having the control create a zoom in link, you can provide
|
||||||
|
* the identifier for an anchor element already added to the document.
|
||||||
|
* By default, an element with id "olZoomInLink" will be searched for
|
||||||
|
* and used if it exists.
|
||||||
|
*/
|
||||||
|
zoomInId: "olZoomInLink",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APIProperty: zoomOutText
|
||||||
|
* {String}
|
||||||
|
* Text for zoom-out link. Default is "-".
|
||||||
|
*/
|
||||||
|
zoomOutText: "-",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APIProperty: zoomOutId
|
||||||
|
* {String}
|
||||||
|
* Instead of having the control create a zoom out link, you can provide
|
||||||
|
* the identifier for an anchor element already added to the document.
|
||||||
|
* By default, an element with id "olZoomOutLink" will be searched for
|
||||||
|
* and used if it exists.
|
||||||
|
*/
|
||||||
|
zoomOutId: "olZoomOutLink",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: draw
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {DOMElement} A reference to the DOMElement containing the zoom links.
|
||||||
|
*/
|
||||||
|
draw: function() {
|
||||||
|
var div = OpenLayers.Control.prototype.draw.apply(this),
|
||||||
|
links = this.getOrCreateLinks(div),
|
||||||
|
zoomIn = links.zoomIn,
|
||||||
|
zoomOut = links.zoomOut,
|
||||||
|
bind = OpenLayers.Function.bind,
|
||||||
|
eventsInstance = this.map.events;
|
||||||
|
|
||||||
|
if (zoomOut.parentNode !== div) {
|
||||||
|
eventsInstance = this.events;
|
||||||
|
eventsInstance.attachToElement(zoomOut.parentNode);
|
||||||
|
}
|
||||||
|
eventsInstance.register("buttonclick", this, this.onZoomClick);
|
||||||
|
|
||||||
|
this.zoomInLink = zoomIn;
|
||||||
|
this.zoomOutLink = zoomOut;
|
||||||
|
return div;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: getOrCreateLinks
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* el - {DOMElement}
|
||||||
|
*
|
||||||
|
* Return:
|
||||||
|
* {Object} Object with zoomIn and zoomOut properties referencing links.
|
||||||
|
*/
|
||||||
|
getOrCreateLinks: function(el) {
|
||||||
|
var zoomIn = document.getElementById(this.zoomInId),
|
||||||
|
zoomOut = document.getElementById(this.zoomOutId);
|
||||||
|
if (!zoomIn) {
|
||||||
|
zoomIn = document.createElement("a");
|
||||||
|
zoomIn.href = "#zoomIn";
|
||||||
|
zoomIn.appendChild(document.createTextNode(this.zoomInText));
|
||||||
|
zoomIn.className = "olControlZoomIn";
|
||||||
|
el.appendChild(zoomIn);
|
||||||
|
}
|
||||||
|
OpenLayers.Element.addClass(zoomIn, "olButton");
|
||||||
|
if (!zoomOut) {
|
||||||
|
zoomOut = document.createElement("a");
|
||||||
|
zoomOut.href = "#zoomOut";
|
||||||
|
zoomOut.appendChild(document.createTextNode(this.zoomOutText));
|
||||||
|
zoomOut.className = "olControlZoomOut";
|
||||||
|
el.appendChild(zoomOut);
|
||||||
|
}
|
||||||
|
OpenLayers.Element.addClass(zoomOut, "olButton");
|
||||||
|
return {
|
||||||
|
zoomIn: zoomIn, zoomOut: zoomOut
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: onZoomClick
|
||||||
|
* Called when zoomin/out link is clicked.
|
||||||
|
*/
|
||||||
|
onZoomClick: function(evt) {
|
||||||
|
var button = evt.buttonElement;
|
||||||
|
if (button === this.zoomInLink) {
|
||||||
|
this.map.zoomIn();
|
||||||
|
} else if (button === this.zoomOutLink) {
|
||||||
|
this.map.zoomOut();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: destroy
|
||||||
|
* Clean up.
|
||||||
|
*/
|
||||||
|
destroy: function() {
|
||||||
|
if (this.map) {
|
||||||
|
this.map.events.unregister("buttonclick", this, this.onZoomClick);
|
||||||
|
}
|
||||||
|
delete this.zoomInLink;
|
||||||
|
delete this.zoomOutLink;
|
||||||
|
OpenLayers.Control.prototype.destroy.apply(this);
|
||||||
|
},
|
||||||
|
|
||||||
|
CLASS_NAME: "OpenLayers.Control.Zoom"
|
||||||
|
});
|
||||||
@@ -166,11 +166,11 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, {
|
|||||||
* regular expression already.
|
* regular expression already.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* wildCard - {<Char>} wildcard character in the above value, default
|
* wildCard - {Char} wildcard character in the above value, default
|
||||||
* is "*"
|
* is "*"
|
||||||
* singleChar - {<Char>) single-character wildcard in the above value
|
* singleChar - {Char} single-character wildcard in the above value
|
||||||
* default is "."
|
* default is "."
|
||||||
* escape - {<Char>) escape character in the above value, default is
|
* escapeChar - {Char} escape character in the above value, default is
|
||||||
* "!"
|
* "!"
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
* node - {DOMElement} An Atom entry or feed node.
|
* node - {DOMElement} An Atom entry or feed node.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* An <OpenLayers.Feature.Vector>.
|
* {<OpenLayers.Feature.Vector>}
|
||||||
*/
|
*/
|
||||||
parseFeature: function(node) {
|
parseFeature: function(node) {
|
||||||
var atomAttrib = {};
|
var atomAttrib = {};
|
||||||
@@ -554,7 +554,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
* node - {DOMElement} An Atom entry or feed node.
|
* node - {DOMElement} An Atom entry or feed node.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* An Array of <OpenLayers.Feature.Vector>s.
|
* Array({<OpenLayers.Feature.Vector>})
|
||||||
*/
|
*/
|
||||||
parseFeatures: function(node) {
|
parseFeatures: function(node) {
|
||||||
var features = [];
|
var features = [];
|
||||||
@@ -578,7 +578,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
* node - {DOMElement} An Atom entry or feed node.
|
* node - {DOMElement} An Atom entry or feed node.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* An Array of <OpenLayers.Geometry>s.
|
* Array({<OpenLayers.Geometry>})
|
||||||
*/
|
*/
|
||||||
parseLocations: function(node) {
|
parseLocations: function(node) {
|
||||||
var georssns = this.namespaces.georss;
|
var georssns = this.namespaces.georss;
|
||||||
|
|||||||
@@ -887,6 +887,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
* (code)
|
* (code)
|
||||||
* <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
|
* <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
|
||||||
* (end)
|
* (end)
|
||||||
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* geometry - {<OpenLayers.Geometry>}
|
* geometry - {<OpenLayers.Geometry>}
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: setGeometryTypes
|
* Method: setGeometryTypes
|
||||||
* Sets the <geometryTypes> mapping.
|
* Sets the <geometryTypes> mapping.
|
||||||
*/
|
*/
|
||||||
setGeometryTypes: function() {
|
setGeometryTypes: function() {
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function: setGeometryTypes
|
* Method: setGeometryTypes
|
||||||
* Sets the <geometryTypes> mapping.
|
* Sets the <geometryTypes> mapping.
|
||||||
*/
|
*/
|
||||||
setGeometryTypes: function() {
|
setGeometryTypes: function() {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
* doc - {Element}
|
* doc - {Element}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* An Array of <OpenLayers.Feature.Vector>s
|
* Array({<OpenLayers.Feature.Vector>})
|
||||||
*/
|
*/
|
||||||
read: function(doc) {
|
read: function(doc) {
|
||||||
if (typeof doc == "string") {
|
if (typeof doc == "string") {
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, {
|
|||||||
* <OpenLayers.Geometry>.
|
* <OpenLayers.Geometry>.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* array {Object} The coordinates array from the GeoJSON fragment.
|
* array - {Object} The coordinates array from the GeoJSON fragment.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {<OpenLayers.Geometry>} A geometry.
|
* {<OpenLayers.Geometry>} A geometry.
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
* doc - {Element}
|
* doc - {Element}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* An Array of <OpenLayers.Feature.Vector>s
|
* Array({<OpenLayers.Feature.Vector>})
|
||||||
*/
|
*/
|
||||||
read: function(doc) {
|
read: function(doc) {
|
||||||
if (typeof doc == "string") {
|
if (typeof doc == "string") {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ OpenLayers.Format.Text = OpenLayers.Class(OpenLayers.Format, {
|
|||||||
* text - {String}
|
* text - {String}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* An Array of <OpenLayers.Feature.Vector>s
|
* Array({<OpenLayers.Feature.Vector>})
|
||||||
*/
|
*/
|
||||||
read: function(text) {
|
read: function(text) {
|
||||||
var lines = text.split('\n');
|
var lines = text.split('\n');
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires OpenLayers/Format/XML.js
|
* @requires OpenLayers/Format/XML.js
|
||||||
*
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
* Class: OpenLayers.Format.WFSDescribeFeatureType
|
* Class: OpenLayers.Format.WFSDescribeFeatureType
|
||||||
* Read WFS DescribeFeatureType response
|
* Read WFS DescribeFeatureType response
|
||||||
*
|
*
|
||||||
@@ -145,8 +147,8 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
|
|||||||
* Reads restriction defined in the child nodes of a restriction element
|
* Reads restriction defined in the child nodes of a restriction element
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* node {DOMElement} - the node to parse
|
* node - {DOMElement} the node to parse
|
||||||
* obj {Object} - the object that receives the read result
|
* obj - {Object} the object that receives the read result
|
||||||
*/
|
*/
|
||||||
readRestriction: function(node, obj) {
|
readRestriction: function(node, obj) {
|
||||||
var children = node.childNodes;
|
var children = node.childNodes;
|
||||||
|
|||||||
@@ -1055,15 +1055,16 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: write_wmc_URLType
|
* Method: write_wmc_URLType
|
||||||
* Create a LogoURL/DescriptionURL/MetadataURL/DataURL/LegendURL node given a object and elementName.
|
* Create a LogoURL/DescriptionURL/MetadataURL/DataURL/LegendURL node given a object and elementName.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* elName - {String} Name of element (LogoURL/DescriptionURL/MetadataURL/LegendURL)
|
* elName - {String} Name of element (LogoURL/DescriptionURL/MetadataURL/LegendURL)
|
||||||
* url - {String} URL string value
|
* url - {String} URL string value
|
||||||
* attr - {Object} Optional attributes (width, height, format)
|
* attr - {Object} Optional attributes (width, height, format)
|
||||||
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {Element} A WMC element node.
|
* {Element} A WMC element node.
|
||||||
*/
|
*/
|
||||||
write_wmc_URLType: function(elName, url, attr) {
|
write_wmc_URLType: function(elName, url, attr) {
|
||||||
var node = this.createElementDefaultNS(elName);
|
var node = this.createElementDefaultNS(elName);
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
* criteria - {String} Search string which will match some part of a tagName
|
* criteria - {String} Search string which will match some part of a tagName
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Array({DOMElement)) An array of sibling xml nodes
|
* Array({DOMElement}) An array of sibling xml nodes
|
||||||
*/
|
*/
|
||||||
getSiblingNodesByTagCriteria: function(node, criteria){
|
getSiblingNodesByTagCriteria: function(node, criteria){
|
||||||
var nodes = [];
|
var nodes = [];
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method handleMapEvents
|
* Method: handleMapEvents
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* evt - {Object}
|
* evt - {Object}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ OpenLayers.Lang = {
|
|||||||
* Get the current language code.
|
* Get the current language code.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* The current language code.
|
* {String} The current language code.
|
||||||
*/
|
*/
|
||||||
getCode: function() {
|
getCode: function() {
|
||||||
if(!OpenLayers.Lang.code) {
|
if(!OpenLayers.Lang.code) {
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
/* Translators:
|
||||||
|
* - Arkadiusz Grabka
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @requires OpenLayers/Lang.js
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Namespace: OpenLayers.Lang["pl"]
|
||||||
|
* Dictionary for Polish. Keys for entries are used in calls to
|
||||||
|
* <OpenLayers.Lang.translate>. Entry bodies are normal strings or
|
||||||
|
* strings formatted for use with <OpenLayers.String.format> calls.
|
||||||
|
*/
|
||||||
|
OpenLayers.Lang["pl"] = OpenLayers.Util.applyDefaults({
|
||||||
|
|
||||||
|
'unhandledRequest': "Nieobsługiwane żądanie zwróciło ${statusText}",
|
||||||
|
|
||||||
|
'Permalink': "Permalink",
|
||||||
|
|
||||||
|
'Overlays': "Nakładki",
|
||||||
|
|
||||||
|
'Base Layer': "Warstwa podstawowa",
|
||||||
|
|
||||||
|
'noFID': "Nie można zaktualizować funkcji, dla których nie ma FID.",
|
||||||
|
|
||||||
|
'browserNotSupported':
|
||||||
|
"Twoja przeglądarka nie obsługuje renderowania wektorów. Obecnie obsługiwane renderowanie to:\n${renderers}",
|
||||||
|
|
||||||
|
// console message
|
||||||
|
'minZoomLevelError':
|
||||||
|
"Właściwość minZoomLevel jest przeznaczona tylko do użytku " +
|
||||||
|
"z warstwami FixedZoomLevels-descendent." +
|
||||||
|
"Warstwa wfs, która sprawdza minZoomLevel jest reliktem przeszłości." +
|
||||||
|
"Nie możemy jej jednak usunąc bez mozliwości łamania OL aplikacji, " +
|
||||||
|
"które mogą być od niej zależne. " +
|
||||||
|
"Dlatego jesteśmy za deprecjację -- minZoomLevel " +
|
||||||
|
"zostanie usunięta w wersji 3.0. W zamian prosze użyj " +
|
||||||
|
"min/max rozdzielczości w sposób opisany tutaj: " +
|
||||||
|
"http://trac.openlayers.org/wiki/SettingZoomLevels",
|
||||||
|
|
||||||
|
'commitSuccess': "Transakcja WFS: SUKCES ${response}",
|
||||||
|
|
||||||
|
'commitFailed': "Transakcja WFS: FAILED ${response}",
|
||||||
|
|
||||||
|
'googleWarning':
|
||||||
|
"Warstwa Google nie był w stanie załadować się poprawnie.<br><br>" +
|
||||||
|
"Aby pozbyć się tej wiadomości, wybierz nową Warstwe podstawową " +
|
||||||
|
"w przełączniku warstw w górnym prawym rogu mapy.<br><br>" +
|
||||||
|
"Najprawdopodobniej jest to spowodowane tym, że biblioteka Google Maps " +
|
||||||
|
"nie jest załadowana, lub nie zawiera poprawnego klucza do API dla twojej strony<br><br>" +
|
||||||
|
"Programisto: Aby uzyskać pomoc , " +
|
||||||
|
"<a href='http://trac.openlayers.org/wiki/Google' " +
|
||||||
|
"target='_blank'>kliknij tutaj</a>",
|
||||||
|
|
||||||
|
'getLayerWarning':
|
||||||
|
"Warstwa ${layerType} nie mogła zostać załadowana poprawnie.<br><br>" +
|
||||||
|
"Aby pozbyć się tej wiadomości, wybierz nową Warstwe podstawową " +
|
||||||
|
"w przełączniku warstw w górnym prawym rogu mapy.<br><br>" +
|
||||||
|
"Najprawdopodobniej jest to spowodowane tym, że biblioteka ${layerLib} " +
|
||||||
|
"nie jest załadowana, lub może(o ile biblioteka tego wymaga) " +
|
||||||
|
"byc potrzebny klucza do API dla twojej strony<br><br>" +
|
||||||
|
"Programisto: Aby uzyskać pomoc , " +
|
||||||
|
"<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
|
||||||
|
"target='_blank'>kliknij tutaj</a>",
|
||||||
|
|
||||||
|
'Scale = 1 : ${scaleDenom}': "Skala = 1 : ${scaleDenom}",
|
||||||
|
|
||||||
|
//labels for the graticule control
|
||||||
|
'W': 'ZACH',
|
||||||
|
'E': 'WSCH',
|
||||||
|
'N': 'PN',
|
||||||
|
'S': 'PD',
|
||||||
|
'Graticule': 'Siatka',
|
||||||
|
|
||||||
|
// console message
|
||||||
|
'reprojectDeprecated':
|
||||||
|
"w warstwie ${layerName} używasz opcji 'reproject'. " +
|
||||||
|
"Ta opcja jest przestarzała: " +
|
||||||
|
"jej zastosowanie został zaprojektowany, aby wspierać wyświetlania danych przez komercyjne mapy, "+
|
||||||
|
"jednak obecnie ta funkcjonalność powinien zostać osiągnięty za pomocą Spherical Mercator " +
|
||||||
|
"its use was designed to support displaying data over commercial. Więcje informacji na ten temat możesz znaleźć na stronie " +
|
||||||
|
"http://trac.openlayers.org/wiki/SphericalMercator.",
|
||||||
|
|
||||||
|
// console message
|
||||||
|
'methodDeprecated':
|
||||||
|
"Ta metoda jest przestarzała i będzie usunięta od wersji 3.0. " +
|
||||||
|
"W zamian użyj ${newMethod}.",
|
||||||
|
|
||||||
|
'proxyNeeded': "Prawdopodobnie musisz ustawić OpenLayers.ProxyHost aby otrzymać dostęp do ${url}."+
|
||||||
|
"See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost"
|
||||||
|
|
||||||
|
});
|
||||||
@@ -56,10 +56,11 @@ OpenLayers.Layer.ArcGIS93Rest = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
* url - {String} Base url for the ArcGIS server REST service
|
* url - {String} Base url for the ArcGIS server REST service
|
||||||
* options - {Object} An object with key/value pairs representing the
|
* options - {Object} An object with key/value pairs representing the
|
||||||
* options and option values.
|
* options and option values.
|
||||||
|
*
|
||||||
* Valid Options:
|
* Valid Options:
|
||||||
* format: {String} MIME type of desired image type.
|
* format - {String} MIME type of desired image type.
|
||||||
* layers: {String} Comma-separated list of layers to display.
|
* layers - {String} Comma-separated list of layers to display.
|
||||||
* srs: {String} Projection ID.
|
* srs - {String} Projection ID.
|
||||||
*/
|
*/
|
||||||
initialize: function(name, url, params, options) {
|
initialize: function(name, url, params, options) {
|
||||||
var newArguments = [];
|
var newArguments = [];
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* id - {String} The ArcIMS layer ID.
|
* id - {String} The ArcIMS layer ID.
|
||||||
* queryDef - {Object} The query definition to apply to this layer.
|
* querydef - {Object} The query definition to apply to this layer.
|
||||||
*/
|
*/
|
||||||
setLayerQuery: function(id, querydef) {
|
setLayerQuery: function(id, querydef) {
|
||||||
// find the matching layer, if it exists
|
// find the matching layer, if it exists
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ OpenLayers.Layer.Google = OpenLayers.Class(
|
|||||||
* Hide or show the Layer
|
* Hide or show the Layer
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* display - {Boolean}
|
* visible - {Boolean}
|
||||||
*/
|
*/
|
||||||
display: function(visible) {
|
display: function(visible) {
|
||||||
if (!this._dragging) {
|
if (!this._dragging) {
|
||||||
@@ -190,7 +190,7 @@ OpenLayers.Layer.Google = OpenLayers.Class(
|
|||||||
* Method: moveTo
|
* Method: moveTo
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* bound - {<OpenLayers.Bounds>}
|
* bounds - {<OpenLayers.Bounds>}
|
||||||
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
|
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
|
||||||
* do some init work in that case.
|
* do some init work in that case.
|
||||||
* dragging - {Boolean}
|
* dragging - {Boolean}
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
* resolution - {Number}
|
* resolution - {Number}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Object containing properties tilelon, tilelat, tileoffsetlat,
|
* {Object} containing properties tilelon, tilelat, tileoffsetlat,
|
||||||
* tileoffsetlat, tileoffsetx, tileoffsety
|
* tileoffsetlat, tileoffsetx, tileoffsety
|
||||||
*/
|
*/
|
||||||
calculateGridLayout: function(bounds, origin, resolution) {
|
calculateGridLayout: function(bounds, origin, resolution) {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
* resolution - {Number}
|
* resolution - {Number}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Object containing properties tilelon, tilelat, tileoffsetlat,
|
* {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
|
||||||
* tileoffsetlat, tileoffsetx, tileoffsety
|
* tileoffsetlat, tileoffsetx, tileoffsety
|
||||||
*/
|
*/
|
||||||
calculateGridLayout: function(bounds, origin, resolution) {
|
calculateGridLayout: function(bounds, origin, resolution) {
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ OpenLayers.Layer.MapGuide = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
* resolution - {Number}
|
* resolution - {Number}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Object containing properties tilelon, tilelat, tileoffsetlat,
|
* {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
|
||||||
* tileoffsetlat, tileoffsetx, tileoffsety
|
* tileoffsetlat, tileoffsetx, tileoffsety
|
||||||
*/
|
*/
|
||||||
calculateGridLayout: function(bounds, origin, resolution) {
|
calculateGridLayout: function(bounds, origin, resolution) {
|
||||||
|
|||||||
@@ -936,7 +936,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
|||||||
* attrValue - {Mixed}
|
* attrValue - {Mixed}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Array(<OpenLayers.Feature.Vector>) An array of features that have the
|
* Array({<OpenLayers.Feature.Vector>}) An array of features that have the
|
||||||
* passed named attribute set to the given value.
|
* passed named attribute set to the given value.
|
||||||
*/
|
*/
|
||||||
getFeaturesByAttribute: function(attrName, attrValue) {
|
getFeaturesByAttribute: function(attrName, attrValue) {
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
* Method: moveTo
|
* Method: moveTo
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* bound - {<OpenLayers.Bounds>}
|
* bounds - {<OpenLayers.Bounds>}
|
||||||
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
|
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
|
||||||
* do some init work in that case.
|
* do some init work in that case.
|
||||||
* dragging - {Boolean}
|
* dragging - {Boolean}
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
* resolution - {Number}
|
* resolution - {Number}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Object containing properties tilelon, tilelat, tileoffsetlat,
|
* {Object} Object containing properties tilelon, tilelat, tileoffsetlat,
|
||||||
* tileoffsetlat, tileoffsetx, tileoffsety
|
* tileoffsetlat, tileoffsetx, tileoffsety
|
||||||
*/
|
*/
|
||||||
calculateGridLayout: function(bounds, origin, resolution) {
|
calculateGridLayout: function(bounds, origin, resolution) {
|
||||||
|
|||||||
+11
-8
@@ -193,8 +193,8 @@ OpenLayers.Map = OpenLayers.Class({
|
|||||||
* {Array(<OpenLayers.Control>)} List of controls associated with the map.
|
* {Array(<OpenLayers.Control>)} List of controls associated with the map.
|
||||||
*
|
*
|
||||||
* If not provided in the map options at construction, the map will
|
* If not provided in the map options at construction, the map will
|
||||||
* be given the following controls by default:
|
* by default be given the following controls if present in the build:
|
||||||
* - <OpenLayers.Control.Navigation>
|
* - <OpenLayers.Control.Navigation> or <OpenLayers.Control.TouchNavigation>
|
||||||
* - <OpenLayers.Control.PanZoom>
|
* - <OpenLayers.Control.PanZoom>
|
||||||
* - <OpenLayers.Control.ArgParser>
|
* - <OpenLayers.Control.ArgParser>
|
||||||
* - <OpenLayers.Control.Attribution>
|
* - <OpenLayers.Control.Attribution>
|
||||||
@@ -588,20 +588,23 @@ OpenLayers.Map = OpenLayers.Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.controls == null) {
|
if (this.controls == null) { // default controls
|
||||||
this.controls = [];
|
this.controls = [];
|
||||||
if (OpenLayers.Control != null) { // running full or lite?
|
if (OpenLayers.Control != null) { // running full or lite?
|
||||||
|
// Navigation or TouchNavigation depending on what is in build
|
||||||
if (OpenLayers.Control.Navigation) {
|
if (OpenLayers.Control.Navigation) {
|
||||||
this.controls.push(new OpenLayers.Control.Navigation())
|
this.controls.push(new OpenLayers.Control.Navigation());
|
||||||
|
} else if (OpenLayers.Control.TouchNavigation) {
|
||||||
|
this.controls.push(new OpenLayers.Control.TouchNavigation());
|
||||||
}
|
}
|
||||||
if (OpenLayers.Control.PanZoom) {
|
if (OpenLayers.Control.PanZoom) {
|
||||||
this.controls.push(new OpenLayers.Control.PanZoom())
|
this.controls.push(new OpenLayers.Control.PanZoom());
|
||||||
}
|
}
|
||||||
if (OpenLayers.Control.ArgParser) {
|
if (OpenLayers.Control.ArgParser) {
|
||||||
this.controls.push(new OpenLayers.Control.ArgParser())
|
this.controls.push(new OpenLayers.Control.ArgParser());
|
||||||
}
|
}
|
||||||
if (OpenLayers.Control.Attribution) {
|
if (OpenLayers.Control.Attribution) {
|
||||||
this.controls.push(new OpenLayers.Control.Attribution())
|
this.controls.push(new OpenLayers.Control.Attribution());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2318,7 +2321,7 @@ OpenLayers.Map = OpenLayers.Class({
|
|||||||
* Zoom to the full extent and recenter.
|
* Zoom to the full extent and recenter.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* options -
|
* options - {Object}
|
||||||
*
|
*
|
||||||
* Allowed Options:
|
* Allowed Options:
|
||||||
* restricted - {Boolean} True to zoom to restricted extent if it is
|
* restricted - {Boolean} True to zoom to restricted extent if it is
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ OpenLayers.Marker = OpenLayers.Class({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor: OpenLayers.Marker
|
* Constructor: OpenLayers.Marker
|
||||||
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* lonlat - {<OpenLayers.LonLat>} the position of this marker
|
* lonlat - {<OpenLayers.LonLat>} the position of this marker
|
||||||
* icon - {<OpenLayers.Icon>} the icon for this marker
|
* icon - {<OpenLayers.Icon>} the icon for this marker
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* options - {Object} Optional object whose properties will be set on the
|
* options - {Object} Optional object whose properties will be set on the
|
||||||
* instance.
|
* instance.
|
||||||
|
*
|
||||||
* Valid options properties:
|
* Valid options properties:
|
||||||
* url - {String} URL to send requests to (required).
|
* url - {String} URL to send requests to (required).
|
||||||
* fois - {Array} The features of interest (required).
|
* fois - {Array} The features of interest (required).
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
|||||||
* Register a callback for a newly created script.
|
* Register a callback for a newly created script.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* callback: {Function} The callback to be executed when the newly added
|
* callback - {Function} The callback to be executed when the newly added
|
||||||
* script loads. This callback will be called with a single argument
|
* script loads. This callback will be called with a single argument
|
||||||
* that is the JSON returned by the service.
|
* that is the JSON returned by the service.
|
||||||
*
|
*
|
||||||
@@ -368,7 +368,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
|||||||
* Unregister a callback previously registered with the register function.
|
* Unregister a callback previously registered with the register function.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* id: {Number} The identifer returned by the register function.
|
* id - {Number} The identifer returned by the register function.
|
||||||
*/
|
*/
|
||||||
o.unregister = function(id) {
|
o.unregister = function(id) {
|
||||||
delete o.registry[id];
|
delete o.registry[id];
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ OpenLayers.Protocol.WFS = function(options) {
|
|||||||
* FeatureType at the same server url with the same typename.
|
* FeatureType at the same server url with the same typename.
|
||||||
* options - {Object} Default properties to be set on the protocol.
|
* options - {Object} Default properties to be set on the protocol.
|
||||||
*
|
*
|
||||||
|
* Returns:
|
||||||
|
* {<OpenLayers.Protocol.WFS>}
|
||||||
*/
|
*/
|
||||||
OpenLayers.Protocol.WFS.fromWMSLayer = function(layer, options) {
|
OpenLayers.Protocol.WFS.fromWMSLayer = function(layer, options) {
|
||||||
var typeName, featurePrefix;
|
var typeName, featurePrefix;
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ OpenLayers.Renderer = OpenLayers.Class({
|
|||||||
* Uses cached copy of resolution if available to minimize computing
|
* Uses cached copy of resolution if available to minimize computing
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* The current map's resolution
|
* {Float} The current map's resolution
|
||||||
*/
|
*/
|
||||||
getResolution: function() {
|
getResolution: function() {
|
||||||
this.resolution = this.resolution || this.map.getResolution();
|
this.resolution = this.resolution || this.map.getResolution();
|
||||||
@@ -429,4 +429,4 @@ OpenLayers.Renderer.symbol = {
|
|||||||
"x": [0,0, 25,0, 50,35, 75,0, 100,0, 65,50, 100,100, 75,100, 50,65, 25,100, 0,100, 35,50, 0,0],
|
"x": [0,0, 25,0, 50,35, 75,0, 100,0, 65,50, 100,100, 75,100, 50,65, 25,100, 0,100, 35,50, 0,0],
|
||||||
"square": [0,0, 0,1, 1,1, 1,0, 0,0],
|
"square": [0,0, 0,1, 1,1, 1,0, 0,0],
|
||||||
"triangle": [0,10, 10,10, 5,0, 0,10]
|
"triangle": [0,10, 10,10, 5,0, 0,10]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({
|
|||||||
* APIMethod: exists
|
* APIMethod: exists
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* node- {DOMElement} The node to test for existence.
|
* node - {DOMElement} The node to test for existence.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {Boolean} Whether or not the node exists in the indexer?
|
* {Boolean} Whether or not the node exists in the indexer?
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ OpenLayers.Strategy = OpenLayers.Class({
|
|||||||
* Called to set the <layer> property.
|
* Called to set the <layer> property.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* {<OpenLayers.Layer.Vector>}
|
* layer - {<OpenLayers.Layer.Vector>}
|
||||||
*/
|
*/
|
||||||
setLayer: function(layer) {
|
setLayer: function(layer) {
|
||||||
this.layer = layer;
|
this.layer = layer;
|
||||||
|
|||||||
@@ -214,7 +214,8 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, {
|
|||||||
* Method: triggerRead
|
* Method: triggerRead
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* options - Additional options for the protocol's read method (optional)
|
* options - {Object} Additional options for the protocol's read method
|
||||||
|
* (optional)
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {<OpenLayers.Protocol.Response>} The protocol response object
|
* {<OpenLayers.Protocol.Response>} The protocol response object
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ OpenLayers.Strategy.Filter = OpenLayers.Class(OpenLayers.Strategy, {
|
|||||||
* added to the layer. Others will be cached by the strategy.
|
* added to the layer. Others will be cached by the strategy.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* filter - <OpenLayers.Filter> A filter for evaluating features.
|
* filter - {<OpenLayers.Filter>} A filter for evaluating features.
|
||||||
*/
|
*/
|
||||||
setFilter: function(filter) {
|
setFilter: function(filter) {
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ OpenLayers.Strategy.Paging = OpenLayers.Class(OpenLayers.Strategy, {
|
|||||||
* Gets or sets page length.
|
* Gets or sets page length.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* newLength: {Integer} Optional length to be set.
|
* newLength - {Integer} Optional length to be set.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {Integer} The length of a page (number of features per page).
|
* {Integer} The length of a page (number of features per page).
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ OpenLayers.Style = OpenLayers.Class({
|
|||||||
* geometry type of the passed geometry
|
* geometry type of the passed geometry
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* geometry {<OpenLayers.Geometry>}
|
* geometry - {<OpenLayers.Geometry>}
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {String} key of the according symbolizer
|
* {String} key of the according symbolizer
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ OpenLayers.Tile = OpenLayers.Class({
|
|||||||
|
|
||||||
/** TBD 3.0 -- remove 'url' from the list of parameters to the constructor.
|
/** TBD 3.0 -- remove 'url' from the list of parameters to the constructor.
|
||||||
* there is no need for the base tile class to have a url.
|
* there is no need for the base tile class to have a url.
|
||||||
*
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
* Constructor: OpenLayers.Tile
|
* Constructor: OpenLayers.Tile
|
||||||
* Constructor for a new <OpenLayers.Tile> instance.
|
* Constructor for a new <OpenLayers.Tile> instance.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
|
|||||||
/** TBD 3.0 - reorder the parameters to the init function to remove
|
/** TBD 3.0 - reorder the parameters to the init function to remove
|
||||||
* URL. the getUrl() function on the layer gets called on
|
* URL. the getUrl() function on the layer gets called on
|
||||||
* each draw(), so no need to specify it here.
|
* each draw(), so no need to specify it here.
|
||||||
*
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
* Constructor: OpenLayers.Tile.Image
|
* Constructor: OpenLayers.Tile.Image
|
||||||
* Constructor for a new <OpenLayers.Tile.Image> instance.
|
* Constructor for a new <OpenLayers.Tile.Image> instance.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -179,6 +179,9 @@ OpenLayers.Easing.Linear = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeIn: function(t, b, c, d) {
|
easeIn: function(t, b, c, d) {
|
||||||
return c*t/d + b;
|
return c*t/d + b;
|
||||||
@@ -192,6 +195,9 @@ OpenLayers.Easing.Linear = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeOut: function(t, b, c, d) {
|
easeOut: function(t, b, c, d) {
|
||||||
return c*t/d + b;
|
return c*t/d + b;
|
||||||
@@ -205,6 +211,9 @@ OpenLayers.Easing.Linear = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeInOut: function(t, b, c, d) {
|
easeInOut: function(t, b, c, d) {
|
||||||
return c*t/d + b;
|
return c*t/d + b;
|
||||||
@@ -226,6 +235,9 @@ OpenLayers.Easing.Expo = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeIn: function(t, b, c, d) {
|
easeIn: function(t, b, c, d) {
|
||||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||||
@@ -239,6 +251,9 @@ OpenLayers.Easing.Expo = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeOut: function(t, b, c, d) {
|
easeOut: function(t, b, c, d) {
|
||||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||||
@@ -252,6 +267,9 @@ OpenLayers.Easing.Expo = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeInOut: function(t, b, c, d) {
|
easeInOut: function(t, b, c, d) {
|
||||||
if (t==0) return b;
|
if (t==0) return b;
|
||||||
@@ -276,6 +294,9 @@ OpenLayers.Easing.Quad = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeIn: function(t, b, c, d) {
|
easeIn: function(t, b, c, d) {
|
||||||
return c*(t/=d)*t + b;
|
return c*(t/=d)*t + b;
|
||||||
@@ -289,6 +310,9 @@ OpenLayers.Easing.Quad = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeOut: function(t, b, c, d) {
|
easeOut: function(t, b, c, d) {
|
||||||
return -c *(t/=d)*(t-2) + b;
|
return -c *(t/=d)*(t-2) + b;
|
||||||
@@ -302,6 +326,9 @@ OpenLayers.Easing.Quad = {
|
|||||||
* b - {Float} beginning position
|
* b - {Float} beginning position
|
||||||
* c - {Float} total change
|
* c - {Float} total change
|
||||||
* d - {Float} duration of the transition
|
* d - {Float} duration of the transition
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {Float}
|
||||||
*/
|
*/
|
||||||
easeInOut: function(t, b, c, d) {
|
easeInOut: function(t, b, c, d) {
|
||||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||||
|
|||||||
@@ -935,7 +935,7 @@ OpenLayers.Util.lastSeqID = 0;
|
|||||||
* prefix (defaults to "id_") appended with the counter value.
|
* prefix (defaults to "id_") appended with the counter value.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* prefix {String} Optionsal string to prefix unique id. Default is "id_".
|
* prefix - {String} Optional string to prefix unique id. Default is "id_".
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {String} A unique id string, built on the passed in prefix.
|
* {String} A unique id string, built on the passed in prefix.
|
||||||
@@ -1252,6 +1252,9 @@ OpenLayers.Util.pagePosition = function(forElement) {
|
|||||||
* document.body or document.documentElement, depending on the document's
|
* document.body or document.documentElement, depending on the document's
|
||||||
* compatibility mode (see
|
* compatibility mode (see
|
||||||
* http://code.google.com/p/doctype/wiki/ArticleClientViewportElement)
|
* http://code.google.com/p/doctype/wiki/ArticleClientViewportElement)
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* {DOMElement}
|
||||||
*/
|
*/
|
||||||
OpenLayers.Util.getViewportElement = function() {
|
OpenLayers.Util.getViewportElement = function() {
|
||||||
var viewportElement = arguments.callee.viewportElement;
|
var viewportElement = arguments.callee.viewportElement;
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="../OLLoader.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function test_constructor(t) {
|
||||||
|
t.plan(5);
|
||||||
|
|
||||||
|
var control = new OpenLayers.Control.Zoom();
|
||||||
|
t.ok(control instanceof OpenLayers.Control, "instance of Control");
|
||||||
|
t.ok(control instanceof OpenLayers.Control.Zoom, "instance of Zoom");
|
||||||
|
t.eq(control.displayClass, "olControlZoom", "displayClass");
|
||||||
|
control.destroy();
|
||||||
|
|
||||||
|
control = new OpenLayers.Control.Zoom({
|
||||||
|
zoomInText: "zoom in!",
|
||||||
|
zoomOutText: "zoom out!"
|
||||||
|
});
|
||||||
|
t.eq(control.zoomInText, "zoom in!", "zoomInText");
|
||||||
|
t.eq(control.zoomOutText, "zoom out!", "zoomOutText");
|
||||||
|
control.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_addControl(t) {
|
||||||
|
t.plan(3);
|
||||||
|
var map = new OpenLayers.Map("map");
|
||||||
|
var control = new OpenLayers.Control.Zoom();
|
||||||
|
map.addControl(control);
|
||||||
|
t.ok(control.map === map, "Control.map set");
|
||||||
|
t.ok(!!~OpenLayers.Util.indexOf(map.controls, control), "map.controls contains control");
|
||||||
|
|
||||||
|
control = new OpenLayers.Control.Zoom({zoomInId: "in", zoomOutId: "out"});
|
||||||
|
map.addControl(control);
|
||||||
|
var eventsEl = document.getElementById("out").parentNode;
|
||||||
|
t.ok(control.events.element === eventsEl, "Events instance listens to custom div's parentNode");
|
||||||
|
|
||||||
|
map.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_zoomIn(t) {
|
||||||
|
t.plan(2);
|
||||||
|
|
||||||
|
var map = new OpenLayers.Map({
|
||||||
|
div: "map",
|
||||||
|
layers: [new OpenLayers.Layer(null, {isBaseLayer: true})]
|
||||||
|
});
|
||||||
|
var control = new OpenLayers.Control.Zoom();
|
||||||
|
map.addControl(control);
|
||||||
|
map.setCenter([0, 0], 0);
|
||||||
|
|
||||||
|
t.eq(map.getZoom(), 0, "initial center");
|
||||||
|
map.events.triggerEvent("buttonclick", {buttonElement: control.zoomInLink});
|
||||||
|
t.eq(map.getZoom(), 1, "after zoom in");
|
||||||
|
map.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_zoomOut(t) {
|
||||||
|
t.plan(2);
|
||||||
|
|
||||||
|
var map = new OpenLayers.Map({
|
||||||
|
div: "map",
|
||||||
|
layers: [new OpenLayers.Layer(null, {isBaseLayer: true})]
|
||||||
|
});
|
||||||
|
var control = new OpenLayers.Control.Zoom();
|
||||||
|
map.addControl(control);
|
||||||
|
map.setCenter([0, 0], 1);
|
||||||
|
|
||||||
|
t.eq(map.getZoom(), 1, "initial center");
|
||||||
|
map.events.triggerEvent("buttonclick", {buttonElement: control.zoomOutLink});
|
||||||
|
t.eq(map.getZoom(), 0, "after zoom out");
|
||||||
|
map.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="map" style="width: 512px; height: 256px;"/>
|
||||||
|
<div id="in">in</div><div id="out">out</out>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
<li>Control/WMTSGetFeatureInfo.html</li>
|
<li>Control/WMTSGetFeatureInfo.html</li>
|
||||||
<li>Control/PanPanel.html</li>
|
<li>Control/PanPanel.html</li>
|
||||||
<li>Control/SLDSelect.html</li>
|
<li>Control/SLDSelect.html</li>
|
||||||
|
<li>Control/Zoom.html</li>
|
||||||
<li>Events.html</li>
|
<li>Events.html</li>
|
||||||
<li>Events/buttonclick.html</li>
|
<li>Events/buttonclick.html</li>
|
||||||
<li>Extras.html</li>
|
<li>Extras.html</li>
|
||||||
|
|||||||
@@ -429,6 +429,41 @@ span.olGoogleAttribution.hybrid a, span.olGoogleAttribution.satellite a {
|
|||||||
background-position: -26px -24px;
|
background-position: -26px -24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.olControlZoom {
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
left: 8px;
|
||||||
|
}
|
||||||
|
div.olControlZoom a {
|
||||||
|
display: block;
|
||||||
|
margin: 1px;
|
||||||
|
padding: 0;
|
||||||
|
color: white;
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
text-align: center;
|
||||||
|
height: 22px;
|
||||||
|
width:22px;
|
||||||
|
line-height: 19px;
|
||||||
|
background: #666666; /* fallback for IE - IE6 requires background shorthand*/
|
||||||
|
background: rgba(0, 0, 0, 0.3);
|
||||||
|
filter: alpha(opacity=60);
|
||||||
|
}
|
||||||
|
div.olControlZoom a:hover {
|
||||||
|
background: #444444; /* fallback for IE */
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
filter: alpha(opacity=80);
|
||||||
|
}
|
||||||
|
a.olControlZoomIn {
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
|
}
|
||||||
|
a.olControlZoomOut {
|
||||||
|
border-radius: 0 0 4px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animations
|
* Animations
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user