Merge branch 'master' of https://github.com/openlayers/openlayers into no-$
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license.
|
||||
*
|
||||
* @requires OpenLayers/SingleFile.js
|
||||
@@ -82,7 +82,7 @@ OpenLayers.Animation = (function(window) {
|
||||
} else {
|
||||
delete loops[id];
|
||||
}
|
||||
}
|
||||
};
|
||||
requestFrame(loops[id], element);
|
||||
return id;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ OpenLayers.Animation = (function(window) {
|
||||
* Terminates an animation loop started with <start>.
|
||||
*
|
||||
* Parameters:
|
||||
* {Number} Identifier returned from <start>.
|
||||
* id - {Number} Identifier returned from <start>.
|
||||
*/
|
||||
function stop(id) {
|
||||
delete loops[id];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -187,12 +187,20 @@ OpenLayers.String = {
|
||||
* APIFunction: numericIf
|
||||
* Converts a string that appears to be a numeric value into a number.
|
||||
*
|
||||
* Returns
|
||||
* Parameters:
|
||||
* value - {String}
|
||||
* trimWhitespace - {Boolean}
|
||||
*
|
||||
* Returns:
|
||||
* {Number|String} a Number if the passed value is a number, a String
|
||||
* otherwise.
|
||||
*/
|
||||
numericIf: function(value) {
|
||||
return OpenLayers.String.isNumeric(value) ? parseFloat(value) : value;
|
||||
numericIf: function(value, trimWhitespace) {
|
||||
var originalValue = value;
|
||||
if (trimWhitespace === true && value != null && value.replace) {
|
||||
value = value.replace(/^\s*|\s*$/g, "");
|
||||
}
|
||||
return OpenLayers.String.isNumeric(value) ? parseFloat(value) : originalValue;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -56,15 +56,19 @@ OpenLayers.Bounds = OpenLayers.Class({
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Bounds
|
||||
* Construct a new bounds object.
|
||||
* Construct a new bounds object. Coordinates can either be passed as four
|
||||
* arguments, or as a single argument.
|
||||
*
|
||||
* Parameters:
|
||||
* Parameters (four arguments):
|
||||
* left - {Number} The left bounds of the box. Note that for width
|
||||
* calculations, this is assumed to be less than the right value.
|
||||
* bottom - {Number} The bottom bounds of the box. Note that for height
|
||||
* calculations, this is assumed to be more than the top value.
|
||||
* right - {Number} The right bounds.
|
||||
* top - {Number} The top bounds.
|
||||
*
|
||||
* Parameters (single argument):
|
||||
* bounds - {Array(Number)} [left, bottom, right, top]
|
||||
*/
|
||||
initialize: function(left, bottom, right, top) {
|
||||
if (OpenLayers.Util.isArray(left)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -15,6 +15,14 @@
|
||||
*/
|
||||
OpenLayers.Date = {
|
||||
|
||||
/**
|
||||
* APIProperty: dateRegEx
|
||||
* The regex to be used for validating dates. You can provide your own
|
||||
* regex for instance for adding support for years before BC. Default
|
||||
* value is: /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/
|
||||
*/
|
||||
dateRegEx: /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/,
|
||||
|
||||
/**
|
||||
* APIMethod: toISOString
|
||||
* Generates a string representing a date. The format of the string follows
|
||||
@@ -91,7 +99,7 @@ OpenLayers.Date = {
|
||||
*/
|
||||
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}))?)))|Z)?$/);
|
||||
var match = str.match(this.dateRegEx);
|
||||
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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -27,15 +27,19 @@ OpenLayers.LonLat = OpenLayers.Class({
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.LonLat
|
||||
* Create a new map location.
|
||||
* Create a new map location. Coordinates can be passed either as two
|
||||
* arguments, or as a single argument.
|
||||
*
|
||||
* Parameters:
|
||||
* Parameters (two arguments):
|
||||
* lon - {Number} The x-axis coordinate in map units. If your map is in
|
||||
* a geographic projection, this will be the Longitude. Otherwise,
|
||||
* it will be the x coordinate of the map location in your map units.
|
||||
* lat - {Number} The y-axis coordinate in map units. If your map is in
|
||||
* a geographic projection, this will be the Latitude. Otherwise,
|
||||
* it will be the y coordinate of the map location in your map units.
|
||||
*
|
||||
* Parameters (single argument):
|
||||
* location - {Array(Float)} [lon, lat]
|
||||
*/
|
||||
initialize: function(lon, lat) {
|
||||
if (OpenLayers.Util.isArray(lon)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -120,6 +120,12 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
*/
|
||||
active: null,
|
||||
|
||||
/**
|
||||
* Property: handlerOptions
|
||||
* {Object} Used to set non-default properties on the control's handler
|
||||
*/
|
||||
handlerOptions: null,
|
||||
|
||||
/**
|
||||
* Property: handler
|
||||
* {<OpenLayers.Handler>} null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* Property: layers
|
||||
* {Array(<OpenLayers.Layer>)}
|
||||
* {String} Each character represents the state of the corresponding layer
|
||||
* on the map.
|
||||
*/
|
||||
layers: null,
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
|
||||
* full list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Control.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Control.CacheRead
|
||||
* A control for using image tiles cached with <OpenLayers.Control.CacheWrite>
|
||||
* from the browser's local storage.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Control>
|
||||
*/
|
||||
OpenLayers.Control.CacheRead = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* APIProperty: fetchEvent
|
||||
* {String} The layer event to listen to for replacing remote resource tile
|
||||
* URLs with cached data URIs. Supported values are "tileerror" (try
|
||||
* remote first, fall back to cached) and "tileloadstart" (try cache
|
||||
* first, fall back to remote). Default is "tileloadstart".
|
||||
*
|
||||
* Note that "tileerror" will not work for CORS enabled images (see
|
||||
* https://developer.mozilla.org/en/CORS_Enabled_Image), i.e. layers
|
||||
* configured with a <OpenLayers.Tile.Image.crossOriginKeyword> in
|
||||
* <OpenLayers.Layer.Grid.tileOptions>.
|
||||
*/
|
||||
fetchEvent: "tileloadstart",
|
||||
|
||||
/**
|
||||
* APIProperty: layers
|
||||
* {Array(<OpenLayers.Layer.Grid>)}. Optional. If provided, only these
|
||||
* layers will receive tiles from the cache.
|
||||
*/
|
||||
layers: null,
|
||||
|
||||
/**
|
||||
* APIProperty: autoActivate
|
||||
* {Boolean} Activate the control when it is added to a map. Default is
|
||||
* true.
|
||||
*/
|
||||
autoActivate: true,
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control.CacheRead
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object} Object with API properties for this control
|
||||
*/
|
||||
|
||||
/**
|
||||
* Method: setMap
|
||||
* Set the map property for the control.
|
||||
*
|
||||
* Parameters:
|
||||
* map - {<OpenLayers.Map>}
|
||||
*/
|
||||
setMap: function(map) {
|
||||
OpenLayers.Control.prototype.setMap.apply(this, arguments);
|
||||
var i, layers = this.layers || map.layers;
|
||||
for (i=layers.length-1; i>=0; --i) {
|
||||
this.addLayer({layer: layers[i]});
|
||||
}
|
||||
if (!this.layers) {
|
||||
map.events.on({
|
||||
addlayer: this.addLayer,
|
||||
removeLayer: this.removeLayer,
|
||||
scope: this
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: addLayer
|
||||
* Adds a layer to the control. Once added, tiles requested for this layer
|
||||
* will be cached.
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Object} Object with a layer property referencing an
|
||||
* <OpenLayers.Layer> instance
|
||||
*/
|
||||
addLayer: function(evt) {
|
||||
evt.layer.events.register(this.fetchEvent, this, this.fetch);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: removeLayer
|
||||
* Removes a layer from the control. Once removed, tiles requested for this
|
||||
* layer will no longer be cached.
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Object} Object with a layer property referencing an
|
||||
* <OpenLayers.Layer> instance
|
||||
*/
|
||||
removeLayer: function(evt) {
|
||||
evt.layer.events.unregister(this.fetchEvent, this, this.fetch);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: fetch
|
||||
* Listener to the <fetchEvent> event. Replaces a tile's url with a data
|
||||
* URI from the cache.
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Object} Event object with a tile property.
|
||||
*/
|
||||
fetch: function(evt) {
|
||||
if (this.active && window.localStorage &&
|
||||
evt.tile instanceof OpenLayers.Tile.Image) {
|
||||
var tile = evt.tile,
|
||||
url = tile.url;
|
||||
// deal with modified tile urls when both CacheWrite and CacheRead
|
||||
// are active
|
||||
if (!tile.layer.crossOriginKeyword && OpenLayers.ProxyHost &&
|
||||
url.indexOf(OpenLayers.ProxyHost) === 0) {
|
||||
url = OpenLayers.Control.CacheWrite.urlMap[url];
|
||||
}
|
||||
var dataURI = window.localStorage.getItem("olCache_" + url);
|
||||
if (dataURI) {
|
||||
tile.url = dataURI;
|
||||
if (evt.type === "tileerror") {
|
||||
tile.setImgSrc(dataURI);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: destroy
|
||||
* The destroy method is used to perform any clean up before the control
|
||||
* is dereferenced. Typically this is where event listeners are removed
|
||||
* to prevent memory leaks.
|
||||
*/
|
||||
destroy: function() {
|
||||
if (this.layers || this.map) {
|
||||
var i, layers = this.layers || this.map.layers;
|
||||
for (i=layers.length-1; i>=0; --i) {
|
||||
this.removeLayer({layer: layers[i]});
|
||||
}
|
||||
}
|
||||
if (this.map) {
|
||||
this.map.events.un({
|
||||
addlayer: this.addLayer,
|
||||
removeLayer: this.removeLayer,
|
||||
scope: this
|
||||
});
|
||||
}
|
||||
OpenLayers.Control.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Control.CacheRead"
|
||||
});
|
||||
@@ -0,0 +1,245 @@
|
||||
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
|
||||
* full list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Control.js
|
||||
* @requires OpenLayers/Request.js
|
||||
* @requires OpenLayers/Console.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Control.CacheWrite
|
||||
* A control for caching image tiles in the browser's local storage. The
|
||||
* <OpenLayers.Control.CacheRead> control is used to fetch and use the cached
|
||||
* tile images.
|
||||
*
|
||||
* Note: Before using this control on any layer that is not your own, make sure
|
||||
* that the terms of service of the tile provider allow local storage of tiles.
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Control>
|
||||
*/
|
||||
OpenLayers.Control.CacheWrite = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* APIProperty: events
|
||||
* {<OpenLayers.Events>} Events instance for listeners and triggering
|
||||
* control specific events.
|
||||
*
|
||||
* To register events in the constructor, configure <eventListeners>.
|
||||
*
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
*
|
||||
* Supported event types (in addition to those from <OpenLayers.Control.events>):
|
||||
* cachefull - Triggered when the cache is full. Listeners receive an
|
||||
* object with a tile property as first argument. The tile references
|
||||
* the tile that couldn't be cached.
|
||||
*/
|
||||
|
||||
/**
|
||||
* APIProperty: eventListeners
|
||||
* {Object} Object with event listeners, keyed by event name. An optional
|
||||
* scope property defines the scope that listeners will be executed in.
|
||||
*/
|
||||
|
||||
/**
|
||||
* APIProperty: layers
|
||||
* {Array(<OpenLayers.Layer.Grid>)}. Optional. If provided, caching
|
||||
* will be enabled for these layers only, otherwise for all cacheable
|
||||
* layers.
|
||||
*/
|
||||
layers: null,
|
||||
|
||||
/**
|
||||
* APIProperty: imageFormat
|
||||
* {String} The image format used for caching. The default is "image/png".
|
||||
* Supported formats depend on the user agent. If an unsupported
|
||||
* <imageFormat> is provided, "image/png" will be used. For aerial
|
||||
* imagery, "image/jpeg" is recommended.
|
||||
*/
|
||||
imageFormat: "image/png",
|
||||
|
||||
/**
|
||||
* Property: quotaRegEx
|
||||
* {RegExp}
|
||||
*/
|
||||
quotaRegEx: (/quota/i),
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control.CacheWrite
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object} Object with API properties for this control.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Method: setMap
|
||||
* Set the map property for the control.
|
||||
*
|
||||
* Parameters:
|
||||
* map - {<OpenLayers.Map>}
|
||||
*/
|
||||
setMap: function(map) {
|
||||
OpenLayers.Control.prototype.setMap.apply(this, arguments);
|
||||
var i, layers = this.layers || map.layers;
|
||||
for (i=layers.length-1; i>=0; --i) {
|
||||
this.addLayer({layer: layers[i]});
|
||||
}
|
||||
if (!this.layers) {
|
||||
map.events.on({
|
||||
addlayer: this.addLayer,
|
||||
removeLayer: this.removeLayer,
|
||||
scope: this
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: addLayer
|
||||
* Adds a layer to the control. Once added, tiles requested for this layer
|
||||
* will be cached.
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Object} Object with a layer property referencing an
|
||||
* <OpenLayers.Layer> instance
|
||||
*/
|
||||
addLayer: function(evt) {
|
||||
evt.layer.events.on({
|
||||
tileloadstart: this.makeSameOrigin,
|
||||
tileloaded: this.cache,
|
||||
scope: this
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: removeLayer
|
||||
* Removes a layer from the control. Once removed, tiles requested for this
|
||||
* layer will no longer be cached.
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Object} Object with a layer property referencing an
|
||||
* <OpenLayers.Layer> instance
|
||||
*/
|
||||
removeLayer: function(evt) {
|
||||
evt.layer.events.un({
|
||||
tileloadstart: this.makeSameOrigin,
|
||||
tileloaded: this.cache,
|
||||
scope: this
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: makeSameOrigin
|
||||
* If the tile does not have CORS image loading enabled and is from a
|
||||
* different origin, use OpenLayers.ProxyHost to make it a same origin url.
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {<OpenLayers.Event>}
|
||||
*/
|
||||
makeSameOrigin: function(evt) {
|
||||
if (this.active) {
|
||||
var tile = evt.tile;
|
||||
if (tile instanceof OpenLayers.Tile.Image &&
|
||||
!tile.crossOriginKeyword &&
|
||||
tile.url.substr(0, 5) !== "data:") {
|
||||
var sameOriginUrl = OpenLayers.Request.makeSameOrigin(
|
||||
tile.url, OpenLayers.ProxyHost
|
||||
);
|
||||
OpenLayers.Control.CacheWrite.urlMap[sameOriginUrl] = tile.url;
|
||||
tile.url = sameOriginUrl;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: cache
|
||||
* Adds a tile to the cache. When the cache is full, the "cachefull" event
|
||||
* is triggered.
|
||||
*
|
||||
* Parameters:
|
||||
* obj - {Object} Object with a tile property, tile being the
|
||||
* <OpenLayers.Tile.Image> with the data to add to the cache
|
||||
*/
|
||||
cache: function(obj) {
|
||||
if (this.active && window.localStorage) {
|
||||
var tile = obj.tile;
|
||||
if (tile instanceof OpenLayers.Tile.Image &&
|
||||
tile.url.substr(0, 5) !== 'data:') {
|
||||
try {
|
||||
var canvasContext = tile.getCanvasContext();
|
||||
if (canvasContext) {
|
||||
var urlMap = OpenLayers.Control.CacheWrite.urlMap;
|
||||
var url = urlMap[tile.url] || tile.url;
|
||||
window.localStorage.setItem(
|
||||
"olCache_" + url,
|
||||
canvasContext.canvas.toDataURL(this.imageFormat)
|
||||
);
|
||||
delete urlMap[tile.url];
|
||||
}
|
||||
} catch(e) {
|
||||
// local storage full or CORS violation
|
||||
var reason = e.name || e.message;
|
||||
if (reason && this.quotaRegEx.test(reason)) {
|
||||
this.events.triggerEvent("cachefull", {tile: tile});
|
||||
} else {
|
||||
OpenLayers.Console.error(e.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: destroy
|
||||
* The destroy method is used to perform any clean up before the control
|
||||
* is dereferenced. Typically this is where event listeners are removed
|
||||
* to prevent memory leaks.
|
||||
*/
|
||||
destroy: function() {
|
||||
if (this.layers || this.map) {
|
||||
var i, layers = this.layers || this.map.layers;
|
||||
for (i=layers.length-1; i>=0; --i) {
|
||||
this.removeLayer({layer: layers[i]});
|
||||
}
|
||||
}
|
||||
if (this.map) {
|
||||
this.map.events.un({
|
||||
addlayer: this.addLayer,
|
||||
removeLayer: this.removeLayer,
|
||||
scope: this
|
||||
});
|
||||
}
|
||||
OpenLayers.Control.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Control.CacheWrite"
|
||||
});
|
||||
|
||||
/**
|
||||
* APIFunction: OpenLayers.Control.CacheWrite.clearCache
|
||||
* Clears all tiles cached with <OpenLayers.Control.CacheWrite> from the cache.
|
||||
*/
|
||||
OpenLayers.Control.CacheWrite.clearCache = function() {
|
||||
if (!window.localStorage) { return; }
|
||||
var i, key;
|
||||
for (i=window.localStorage.length-1; i>=0; --i) {
|
||||
key = window.localStorage.key(i);
|
||||
if (key.substr(0, 8) === "olCache_") {
|
||||
window.localStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Property: OpenLayers.Control.CacheWrite.urlMap
|
||||
* {Object} Mapping of same origin urls to cache url keys. Entries will be
|
||||
* deleted as soon as a tile was cached.
|
||||
*/
|
||||
OpenLayers.Control.CacheWrite.urlMap = {};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* APIProperty: handlerOptions
|
||||
* {Object} Used to set non-default properties on the control's handler
|
||||
*/
|
||||
handlerOptions: null,
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control.DrawFeature
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -144,7 +144,6 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* {Object} Additional options for the handlers used by this control. This
|
||||
* is a hash with the keys "click", "box" and "hover".
|
||||
*/
|
||||
handlerOptions: null,
|
||||
|
||||
/**
|
||||
* Property: handlers
|
||||
@@ -333,11 +332,11 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
},
|
||||
|
||||
/**
|
||||
* Method selectHover
|
||||
* Method: selectHover
|
||||
* Callback from the handlers.hover set up when <hover> selection is on
|
||||
*
|
||||
* Parameters:
|
||||
* evt {Object} - event object with an xy property
|
||||
* evt - {Object} event object with an xy property
|
||||
*/
|
||||
selectHover: function(evt) {
|
||||
var bounds = this.pixelToBounds(evt.xy);
|
||||
@@ -459,7 +458,7 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* Sets the multiple and toggle modifiers according to the current event
|
||||
*
|
||||
* Parameters:
|
||||
* evt {<OpenLayers.Event>}
|
||||
* evt - {<OpenLayers.Event>}
|
||||
*/
|
||||
setModifiers: function(evt) {
|
||||
this.modifiers = {
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Control.js
|
||||
* @requires OpenLayers/Lang.js
|
||||
* @requires OpenLayers/Rule.js
|
||||
* @requires OpenLayers/StyleMap.js
|
||||
* @requires OpenLayers/Layer/Vector.js
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -41,7 +41,6 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, {
|
||||
* APIProperty: handlerOptions
|
||||
* {Object} Used to set non-default properties on the control's handler
|
||||
*/
|
||||
handlerOptions: null,
|
||||
|
||||
/**
|
||||
* Property: callbacks
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -616,7 +616,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* the mouse is over a vertex.
|
||||
*
|
||||
* Parameters:
|
||||
* {Integer} Key code corresponding to the keypress event.
|
||||
* evt - {Event} Keypress event.
|
||||
*/
|
||||
handleKeypress: function(evt) {
|
||||
var code = evt.keyCode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -202,7 +202,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
draw: function() {
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
if(!(this.layers.length > 0)) {
|
||||
if (this.layers.length === 0) {
|
||||
if (this.map.baseLayer) {
|
||||
var layer = this.map.baseLayer.clone();
|
||||
this.layers = [layer];
|
||||
@@ -356,7 +356,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.minimizeControl();
|
||||
} else if (evt.buttonElement === this.maximizeDiv) {
|
||||
this.maximizeControl();
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -398,8 +398,12 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
||||
* minimize - {Boolean}
|
||||
*/
|
||||
showToggle: function(minimize) {
|
||||
this.maximizeDiv.style.display = minimize ? '' : 'none';
|
||||
this.minimizeDiv.style.display = minimize ? 'none' : '';
|
||||
if (this.maximizeDiv) {
|
||||
this.maximizeDiv.style.display = minimize ? '' : 'none';
|
||||
}
|
||||
if (this.minimizeDiv) {
|
||||
this.minimizeDiv.style.display = minimize ? 'none' : '';
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -330,9 +330,8 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
iconOn: function() {
|
||||
var d = this.panel_div; // "this" refers to a control on panel!
|
||||
var re = new RegExp(this.displayClass + 'ItemInactive');
|
||||
d.className = d.className.replace(re,
|
||||
this.displayClass + "ItemActive");
|
||||
var re = new RegExp("\\b(" + this.displayClass + "Item)Inactive\\b");
|
||||
d.className = d.className.replace(re, "$1Active");
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -341,9 +340,8 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
iconOff: function() {
|
||||
var d = this.panel_div; // "this" refers to a control on panel!
|
||||
var re = new RegExp(this.displayClass + 'ItemActive');
|
||||
d.className = d.className.replace(re,
|
||||
this.displayClass + "ItemInactive");
|
||||
var re = new RegExp("\\b(" + this.displayClass + "Item)Active\\b");
|
||||
d.className = d.className.replace(re, "$1Inactive");
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* 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
|
||||
* are switched.
|
||||
* `
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Control>
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -46,6 +46,11 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
autoActivate: true,
|
||||
|
||||
/**
|
||||
* APIProperty: handlerOptions
|
||||
* {Object} Used to set non-default properties on the pinch handler
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control.PinchZoom
|
||||
* Create a control for zooming with pinch gestures. This works on devices
|
||||
@@ -184,6 +189,20 @@ OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
|
||||
location.lon += resolution * ((size.w / 2) - zoomPixel.x);
|
||||
location.lat -= resolution * ((size.h / 2) - zoomPixel.y);
|
||||
|
||||
// Force a reflow before calling setCenter. This is to work
|
||||
// around an issue occuring in iOS.
|
||||
//
|
||||
// See https://github.com/openlayers/openlayers/pull/351.
|
||||
//
|
||||
// Without a reflow setting the layer container div's top left
|
||||
// style properties to "0px" - as done in Map.moveTo when zoom
|
||||
// is changed - won't actually correctly reposition the layer
|
||||
// container div.
|
||||
//
|
||||
// Also, we need to use a statement that the Google Closure
|
||||
// compiler won't optimize away.
|
||||
this.map.div.clientWidth = this.map.div.clientWidth;
|
||||
|
||||
this.map.setCenter(location, zoom);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -82,7 +82,6 @@ OpenLayers.Control.SLDSelect = OpenLayers.Class(OpenLayers.Control, {
|
||||
* APIProperty: handlerOptions
|
||||
* {Object} Used to set non-default properties on the control's handler
|
||||
*/
|
||||
handlerOptions: null,
|
||||
|
||||
/**
|
||||
* APIProperty: sketchStyle
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
|
||||
* full list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Control.js
|
||||
* @requires OpenLayers/Handler/Hover.js
|
||||
* @requires OpenLayers/Handler/Click.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Control.UTFGrid
|
||||
*
|
||||
* This Control provides behavior associated with UTFGrid Layers.
|
||||
* These 'hit grids' provide underlying feature attributes without
|
||||
* calling the server (again). This control allows Mousemove, Hovering
|
||||
* and Click events to trigger callbacks that use the attributes in
|
||||
* whatever way you need.
|
||||
*
|
||||
* The most common example may be a UTFGrid layer containing feature
|
||||
* attributes that are displayed in a div as you mouseover.
|
||||
*
|
||||
* Example Code:
|
||||
*
|
||||
* (start code)
|
||||
* var world_utfgrid = new OpenLayers.Layer.UTFGrid(
|
||||
* 'UTFGrid Layer',
|
||||
* "http://tiles/world_utfgrid/${z}/${x}/${y}.json"
|
||||
* );
|
||||
* map.addLayer(world_utfgrid);
|
||||
*
|
||||
* var control = new OpenLayers.Control.UTFGrid({
|
||||
* layers: [world_utfgrid],
|
||||
* handlerMode: 'move',
|
||||
* callback: function(infoLookup) {
|
||||
* // do something with returned data
|
||||
*
|
||||
* }
|
||||
* })
|
||||
* (end code)
|
||||
*
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Control>
|
||||
*/
|
||||
OpenLayers.Control.UTFGrid = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
/**
|
||||
* APIProperty: autoActivate
|
||||
* {Boolean} Activate the control when it is added to a map. Default is
|
||||
* true.
|
||||
*/
|
||||
autoActivate: true,
|
||||
|
||||
/**
|
||||
* APIProperty: Layers
|
||||
* List of layers to consider. Must be Layer.UTFGrids
|
||||
* `null` is the default indicating all UTFGrid Layers are queried.
|
||||
* {Array} <OpenLayers.Layer.UTFGrid>
|
||||
*/
|
||||
layers: null,
|
||||
|
||||
/* Property: defaultHandlerOptions
|
||||
* The default opts passed to the handler constructors
|
||||
*/
|
||||
defaultHandlerOptions: {
|
||||
'delay': 300,
|
||||
'pixelTolerance': 4,
|
||||
'stopMove': false,
|
||||
'single': true,
|
||||
'double': false,
|
||||
'stopSingle': false,
|
||||
'stopDouble': false
|
||||
},
|
||||
|
||||
/* APIProperty: handlerMode
|
||||
* Defaults to 'click'. Can be 'hover' or 'move'.
|
||||
*/
|
||||
handlerMode: 'click',
|
||||
|
||||
/**
|
||||
* APIMethod: setHandler
|
||||
* sets this.handlerMode and calls resetHandler()
|
||||
*
|
||||
* Parameters:
|
||||
* hm - {String} Handler Mode string; 'click', 'hover' or 'move'.
|
||||
*/
|
||||
setHandler: function(hm) {
|
||||
this.handlerMode = hm;
|
||||
this.resetHandler();
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: resetHandler
|
||||
* Deactivates the old hanlder and creates a new
|
||||
* <OpenLayers.Handler> based on the mode specified in
|
||||
* this.handlerMode
|
||||
*
|
||||
*/
|
||||
resetHandler: function() {
|
||||
if (this.handler) {
|
||||
this.handler.deactivate();
|
||||
this.handler.destroy();
|
||||
this.handler = null;
|
||||
}
|
||||
|
||||
if (this.handlerMode == 'hover') {
|
||||
// Handle this event on hover
|
||||
this.handler = new OpenLayers.Handler.Hover(
|
||||
this,
|
||||
{'pause': this.handleEvent, 'move': this.reset},
|
||||
this.handlerOptions
|
||||
);
|
||||
} else if (this.handlerMode == 'click') {
|
||||
// Handle this event on click
|
||||
this.handler = new OpenLayers.Handler.Click(
|
||||
this, {
|
||||
'click': this.handleEvent
|
||||
}, this.handlerOptions
|
||||
);
|
||||
} else if (this.handlerMode == 'move') {
|
||||
this.handler = new OpenLayers.Handler.Hover(
|
||||
this,
|
||||
// Handle this event while hovering OR moving
|
||||
{'pause': this.handleEvent, 'move': this.handleEvent},
|
||||
this.handlerOptions
|
||||
);
|
||||
}
|
||||
if (this.handler) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Constructor: <OpenLayers.Control.UTFGrid>
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object}
|
||||
*/
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
options.handlerOptions = options.handlerOptions || this.defaultHandlerOptions;
|
||||
OpenLayers.Control.prototype.initialize.apply(this, [options]);
|
||||
this.resetHandler();
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: handleEvent
|
||||
* Internal method called when specified event is triggered.
|
||||
*
|
||||
* This method does several things:
|
||||
*
|
||||
* Gets the lonLat of the event.
|
||||
*
|
||||
* Loops through the appropriate hit grid layers and gathers the attributes.
|
||||
*
|
||||
* Passes the attributes to the callback
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {<OpenLayers.Event>}
|
||||
*/
|
||||
handleEvent: function(evt) {
|
||||
if (evt == null) {
|
||||
this.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
var lonLat = this.map.getLonLatFromPixel(evt.xy);
|
||||
if (!lonLat) {
|
||||
return;
|
||||
}
|
||||
|
||||
var layers = this.findLayers();
|
||||
if (layers.length > 0) {
|
||||
var infoLookup = {};
|
||||
var layer, idx;
|
||||
for (var i=0, len=layers.length; i<len; i++) {
|
||||
layer = layers[i];
|
||||
idx = OpenLayers.Util.indexOf(this.map.layers, layer);
|
||||
infoLookup[idx] = layer.getFeatureInfo(lonLat);
|
||||
}
|
||||
this.callback(infoLookup, lonLat, evt.xy);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: callback
|
||||
* Function to be called when a mouse event corresponds with a location that
|
||||
* includes data in one of the configured UTFGrid layers.
|
||||
*
|
||||
* Parameters:
|
||||
* infoLookup - {Object} Keys of this object are layer indexes and can be
|
||||
* used to resolve a layer in the map.layers array. The structure of
|
||||
* the property values depend on the data included in the underlying
|
||||
* UTFGrid and may be any valid JSON type.
|
||||
*/
|
||||
callback: function(infoLookup) {
|
||||
// to be provided in the constructor
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: reset
|
||||
* Calls the callback with null.
|
||||
*/
|
||||
reset: function(evt) {
|
||||
this.callback(null);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: findLayers
|
||||
* Internal method to get the layers, independent of whether we are
|
||||
* inspecting the map or using a client-provided array
|
||||
*
|
||||
* The default value of this.layers is null; this causes the
|
||||
* findLayers method to return ALL UTFGrid layers encountered.
|
||||
*
|
||||
* Parameters:
|
||||
* None
|
||||
*
|
||||
* Returns:
|
||||
* {Array} Layers to handle on each event
|
||||
*/
|
||||
findLayers: function() {
|
||||
var candidates = this.layers || this.map.layers;
|
||||
var layers = [];
|
||||
var layer;
|
||||
for (var i=candidates.length-1; i>=0; --i) {
|
||||
layer = candidates[i];
|
||||
if (layer instanceof OpenLayers.Layer.UTFGrid ) {
|
||||
layers.push(layer);
|
||||
}
|
||||
}
|
||||
return layers;
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Control.UTFGrid"
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* @requires OpenLayers/Handler/Click.js
|
||||
* @requires OpenLayers/Handler/Hover.js
|
||||
* @requires OpenLayers/Request.js
|
||||
* @requires OpenLayers/Format/WMSGetFeatureInfo.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -139,7 +140,6 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* }
|
||||
* (end)
|
||||
*/
|
||||
handlerOptions: null,
|
||||
|
||||
/**
|
||||
* Property: handler
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ OpenLayers.Control.WMTSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* }
|
||||
* (end)
|
||||
*/
|
||||
handlerOptions: null,
|
||||
|
||||
/**
|
||||
* Property: handler
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
|
||||
* full list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository 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,
|
||||
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"
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
// TRASH THIS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -166,11 +166,11 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, {
|
||||
* regular expression already.
|
||||
*
|
||||
* Parameters:
|
||||
* wildCard - {<Char>} wildcard character in the above value, default
|
||||
* wildCard - {Char} wildcard character in the above value, default
|
||||
* is "*"
|
||||
* singleChar - {<Char>) single-character wildcard in the above value
|
||||
* singleChar - {Char} single-character wildcard in the above value
|
||||
* default is "."
|
||||
* escape - {<Char>) escape character in the above value, default is
|
||||
* escapeChar - {Char} escape character in the above value, default is
|
||||
* "!"
|
||||
*
|
||||
* Returns:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -418,7 +418,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
* node - {DOMElement} An Atom entry or feed node.
|
||||
*
|
||||
* Returns:
|
||||
* An <OpenLayers.Feature.Vector>.
|
||||
* {<OpenLayers.Feature.Vector>}
|
||||
*/
|
||||
parseFeature: function(node) {
|
||||
var atomAttrib = {};
|
||||
@@ -554,7 +554,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
* node - {DOMElement} An Atom entry or feed node.
|
||||
*
|
||||
* Returns:
|
||||
* An Array of <OpenLayers.Feature.Vector>s.
|
||||
* Array({<OpenLayers.Feature.Vector>})
|
||||
*/
|
||||
parseFeatures: function(node) {
|
||||
var features = [];
|
||||
@@ -578,7 +578,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
* node - {DOMElement} An Atom entry or feed node.
|
||||
*
|
||||
* Returns:
|
||||
* An Array of <OpenLayers.Geometry>s.
|
||||
* Array({<OpenLayers.Geometry>})
|
||||
*/
|
||||
parseLocations: function(node) {
|
||||
var georssns = this.namespaces.georss;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -345,7 +345,7 @@ OpenLayers.Format.CQL = (function() {
|
||||
var result = buildAst(tokenize(text));
|
||||
if (this.keepData) {
|
||||
this.data = result;
|
||||
};
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
/**
|
||||
* @requires OpenLayers/Format/Filter.js
|
||||
@@ -27,7 +27,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
xlink: "http://www.w3.org/1999/xlink",
|
||||
xsi: "http://www.w3.org/2001/XMLSchema-instance"
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Property: defaultPrefix
|
||||
*/
|
||||
@@ -180,18 +180,18 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
},
|
||||
"Literal": function(node, obj) {
|
||||
obj.value = OpenLayers.String.numericIf(
|
||||
this.getChildValue(node));
|
||||
this.getChildValue(node), true);
|
||||
},
|
||||
"PropertyName": function(node, filter) {
|
||||
filter.property = this.getChildValue(node);
|
||||
},
|
||||
"LowerBoundary": function(node, filter) {
|
||||
filter.lowerBoundary = OpenLayers.String.numericIf(
|
||||
this.readers.ogc._expression.call(this, node));
|
||||
this.readers.ogc._expression.call(this, node), true);
|
||||
},
|
||||
"UpperBoundary": function(node, filter) {
|
||||
filter.upperBoundary = OpenLayers.String.numericIf(
|
||||
this.readers.ogc._expression.call(this, node));
|
||||
this.readers.ogc._expression.call(this, node), true);
|
||||
},
|
||||
"Intersects": function(node, obj) {
|
||||
this.readSpatial(node, obj, OpenLayers.Filter.Spatial.INTERSECTS);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -887,6 +887,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
* (code)
|
||||
* <gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
|
||||
* (end)
|
||||
*
|
||||
* Parameters:
|
||||
* geometry - {<OpenLayers.Geometry>}
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -615,7 +615,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
},
|
||||
|
||||
/**
|
||||
* Function: setGeometryTypes
|
||||
* Method: setGeometryTypes
|
||||
* Sets the <geometryTypes> mapping.
|
||||
*/
|
||||
setGeometryTypes: function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -444,7 +444,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
|
||||
},
|
||||
|
||||
/**
|
||||
* Function: setGeometryTypes
|
||||
* Method: setGeometryTypes
|
||||
* Sets the <geometryTypes> mapping.
|
||||
*/
|
||||
setGeometryTypes: function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -102,7 +102,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
* doc - {Element}
|
||||
*
|
||||
* Returns:
|
||||
* An Array of <OpenLayers.Feature.Vector>s
|
||||
* Array({<OpenLayers.Feature.Vector>})
|
||||
*/
|
||||
read: function(doc) {
|
||||
if (typeof doc == "string") {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -287,7 +287,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, {
|
||||
* <OpenLayers.Geometry>.
|
||||
*
|
||||
* Parameters:
|
||||
* array {Object} The coordinates array from the GeoJSON fragment.
|
||||
* array - {Object} The coordinates array from the GeoJSON fragment.
|
||||
*
|
||||
* Returns:
|
||||
* {<OpenLayers.Geometry>} A geometry.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -111,7 +111,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
var box = this.getElementsByTagNameNS(item,
|
||||
this.georssns,
|
||||
"box");
|
||||
|
||||
|
||||
if (point.length > 0 || (lat.length > 0 && lon.length > 0)) {
|
||||
var location;
|
||||
if (point.length > 0) {
|
||||
@@ -168,7 +168,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
point = new OpenLayers.Geometry.Point(coords[1], coords[0]);
|
||||
components.push(point);
|
||||
}
|
||||
geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);
|
||||
geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]);
|
||||
}
|
||||
|
||||
if (geometry && this.internalProjection && this.externalProjection) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -90,7 +90,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
* doc - {Element}
|
||||
*
|
||||
* Returns:
|
||||
* An Array of <OpenLayers.Feature.Vector>s
|
||||
* Array({<OpenLayers.Feature.Vector>})
|
||||
*/
|
||||
read: function(doc) {
|
||||
if (typeof doc == "string") {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -270,8 +270,8 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
*/
|
||||
writers: {
|
||||
"ows": {
|
||||
"BoundingBox": function(options) {
|
||||
var node = this.createElementNSPlus("ows:BoundingBox", {
|
||||
"BoundingBox": function(options, nodeName) {
|
||||
var node = this.createElementNSPlus(nodeName || "ows:BoundingBox", {
|
||||
attributes: {
|
||||
crs: options.projection
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo
|
||||
range.maxValue = this.getChildValue(node);
|
||||
},
|
||||
"Identifier": function(node, obj) {
|
||||
obj.identifier = this.getChildValue(node);
|
||||
obj.identifier = this.getChildValue(node);
|
||||
},
|
||||
"SupportedCRS": function(node, obj) {
|
||||
obj.supportedCRS = this.getChildValue(node);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* 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 list of contributors). Published under the 2-clause BSD license.
|
||||
* See license.txt in the OpenLayers distribution or repository for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user