Merged with upstream master
This commit is contained in:
@@ -414,4 +414,4 @@
|
||||
/**
|
||||
* Constant: VERSION_NUMBER
|
||||
*/
|
||||
OpenLayers.VERSION_NUMBER="Release 2.12-rc4";
|
||||
OpenLayers.VERSION_NUMBER="Release 2.12-rc5";
|
||||
|
||||
@@ -127,6 +127,20 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
maximized: false,
|
||||
|
||||
/**
|
||||
* APIProperty: maximizeTitle
|
||||
* {String} This property is used for showing a tooltip over the
|
||||
* maximize div. Defaults to "" (no title).
|
||||
*/
|
||||
maximizeTitle: "",
|
||||
|
||||
/**
|
||||
* APIProperty: minimizeTitle
|
||||
* {String} This property is used for showing a tooltip over the
|
||||
* minimize div. Defaults to "" (no title).
|
||||
*/
|
||||
minimizeTitle: "",
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control.OverviewMap
|
||||
* Create a new overview map
|
||||
@@ -247,6 +261,9 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
||||
'absolute');
|
||||
this.maximizeDiv.style.display = 'none';
|
||||
this.maximizeDiv.className = this.displayClass + 'MaximizeButton olButton';
|
||||
if (this.maximizeTitle) {
|
||||
this.maximizeDiv.title = this.maximizeTitle;
|
||||
}
|
||||
this.div.appendChild(this.maximizeDiv);
|
||||
|
||||
// minimize button div
|
||||
@@ -259,6 +276,9 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
||||
'absolute');
|
||||
this.minimizeDiv.style.display = 'none';
|
||||
this.minimizeDiv.className = this.displayClass + 'MinimizeButton olButton';
|
||||
if (this.minimizeTitle) {
|
||||
this.minimizeDiv.title = this.minimizeTitle;
|
||||
}
|
||||
this.div.appendChild(this.minimizeDiv);
|
||||
this.minimizeControl();
|
||||
} else {
|
||||
|
||||
@@ -285,11 +285,9 @@ OpenLayers.Event = {
|
||||
if (elementObservers) {
|
||||
for(var i = elementObservers.length-1; i >= 0; i--) {
|
||||
var entry = elementObservers[i];
|
||||
var args = new Array(entry.element,
|
||||
entry.name,
|
||||
entry.observer,
|
||||
entry.useCapture);
|
||||
var removed = OpenLayers.Event.stopObserving.apply(this, args);
|
||||
OpenLayers.Event.stopObserving.apply(this, [
|
||||
entry.element, entry.name, entry.observer, entry.useCapture
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -311,8 +311,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
|
||||
/**
|
||||
* Method: parseStyles
|
||||
* Looks for <Style> nodes in the data and parses them
|
||||
* Also parses <StyleMap> nodes, but only uses the 'normal' key
|
||||
* Parses <Style> nodes
|
||||
*
|
||||
* Parameters:
|
||||
* nodes - {Array} of {DOMElement} data to read/parse.
|
||||
@@ -558,8 +557,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
|
||||
/**
|
||||
* Method: parseStyleMaps
|
||||
* Looks for <Style> nodes in the data and parses them
|
||||
* Also parses <StyleMap> nodes, but only uses the 'normal' key
|
||||
* Parses <StyleMap> nodes, but only uses the 'normal' key
|
||||
*
|
||||
* Parameters:
|
||||
* nodes - {Array} of {DOMElement} data to read/parse.
|
||||
@@ -1212,8 +1210,8 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
createPlacemarkXML: function(feature) {
|
||||
// Placemark name
|
||||
var placemarkName = this.createElementNS(this.kmlns, "name");
|
||||
var name = feature.style && feature.style.label ? feature.style.label :
|
||||
feature.attributes.name || feature.id;
|
||||
var label = (feature.style && feature.style.label) ? feature.style.label : feature.id;
|
||||
var name = feature.attributes.name || label;
|
||||
placemarkName.appendChild(this.createTextNode(name));
|
||||
|
||||
// Placemark description
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
/**
|
||||
* @requires OpenLayers/Format/XML.js
|
||||
* @requires OpenLayers/Format/WFST.js
|
||||
* @requires OpenLayers/Filter/Spatial.js
|
||||
* @requires OpenLayers/Filter/FeatureId.js
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,13 @@
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.EventPane
|
||||
* Base class for 3rd party layers. Create a new event pane layer with the
|
||||
* Base class for 3rd party layers, providing a DOM element which isolates
|
||||
* the 3rd-party layer from mouse events.
|
||||
* Only used by Google layers.
|
||||
*
|
||||
* Automatically instantiated by the Google constructor, and not usually instantiated directly.
|
||||
*
|
||||
* Create a new event pane layer with the
|
||||
* <OpenLayers.Layer.EventPane> constructor.
|
||||
*
|
||||
* Inherits from:
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
/**
|
||||
* Class: OpenLayers.Layer.Google
|
||||
*
|
||||
* Provides a wrapper for Google's Maps API
|
||||
* Normally the Terms of Use for this API do not allow wrapping, but Google
|
||||
* have provided written consent to OpenLayers for this - see email in
|
||||
* http://osgeo-org.1560.n6.nabble.com/Google-Maps-API-Terms-of-Use-changes-tp4910013p4911981.html
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.SphericalMercator>
|
||||
* - <OpenLayers.Layer.EventPane>
|
||||
@@ -462,6 +467,10 @@ OpenLayers.Layer.Google.cache = {};
|
||||
* Constant: OpenLayers.Layer.Google.v2
|
||||
*
|
||||
* Mixin providing functionality specific to the Google Maps API v2.
|
||||
*
|
||||
* This API has been deprecated by Google.
|
||||
* Developers are encouraged to migrate to v3 of the API; support for this
|
||||
* is provided by <OpenLayers.Layer.Google.v3>
|
||||
*/
|
||||
OpenLayers.Layer.Google.v2 = {
|
||||
|
||||
|
||||
@@ -11,15 +11,42 @@
|
||||
/**
|
||||
* Constant: OpenLayers.Layer.Google.v3
|
||||
*
|
||||
* Mixin providing functionality specific to the Google Maps API v3 <= v3.6.
|
||||
* Note that this layer configures the google.maps.map object with the
|
||||
* "disableDefaultUI" option set to true. Using UI controls that the Google
|
||||
* Maps API provides is not supported by the OpenLayers API. To use this layer,
|
||||
* you must include the GMaps API (<= v3.6) in your html:
|
||||
* Mixin providing functionality specific to the Google Maps API v3.
|
||||
*
|
||||
* To use this layer, you must include the GMaps v3 API in your html.
|
||||
*
|
||||
* Because OpenLayers needs to control mouse events, it isolates the GMaps mapObject
|
||||
* (the DOM elements provided by Google) using the EventPane.
|
||||
* However, because the Terms of Use require some of those elements,
|
||||
* such as the links to Google's terms, to be clickable, these elements have
|
||||
* to be moved up to OpenLayers' container div. There is however no easy way
|
||||
* to identify these, and the logic (see the repositionMapElements function
|
||||
* in the source) may need to be changed if Google changes them.
|
||||
* These elements are not part of the published API and can be changed at any time,
|
||||
* so a given OpenLayers release can only guarantee support for the 'frozen'
|
||||
* Google release at the time of the OpenLayers release. See
|
||||
* https://developers.google.com/maps/documentation/javascript/basics#Versioning
|
||||
* for Google's current release cycle.
|
||||
*
|
||||
* For this reason, it's recommended that production code specifically loads
|
||||
* the current frozen version, for example:
|
||||
*
|
||||
* (code)
|
||||
* <script src="http://maps.google.com/maps/api/js?v=3.6&sensor=false"></script>
|
||||
* <script src="http://maps.google.com/maps/api/js?v=3.7&sensor=false"></script>
|
||||
* (end)
|
||||
*
|
||||
* but that development code should use the latest 'nightly' version, so that any
|
||||
* problems can be dealt with as soon as they arise, and before they affect the production, 'frozen', code.
|
||||
*
|
||||
* Note, however, that frozen versions are retired as part of Google's release
|
||||
* cycle, and once this happens, you will get the next version, in the example above, 3.8 once 3.7 is retired.
|
||||
*
|
||||
* This version supports 3.7.
|
||||
*
|
||||
*
|
||||
* Note that this layer configures the google.maps.map object with the
|
||||
* "disableDefaultUI" option set to true. Using UI controls that the Google
|
||||
* Maps API provides is not supported by the OpenLayers API.
|
||||
*/
|
||||
OpenLayers.Layer.Google.v3 = {
|
||||
|
||||
|
||||
@@ -1302,19 +1302,20 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
* columns - {Integer} Maximum number of columns we want our grid to have.
|
||||
*/
|
||||
removeExcessTiles: function(rows, columns) {
|
||||
var i, l;
|
||||
|
||||
// remove extra rows
|
||||
while (this.grid.length > rows) {
|
||||
var row = this.grid.pop();
|
||||
for (var i=0, l=row.length; i<l; i++) {
|
||||
for (i=0, l=row.length; i<l; i++) {
|
||||
var tile = row[i];
|
||||
this.destroyTile(tile);
|
||||
}
|
||||
}
|
||||
|
||||
// remove extra columns
|
||||
while (this.grid[0].length > columns) {
|
||||
for (var i=0, l=this.grid.length; i<l; i++) {
|
||||
for (i=0, l=this.grid.length; i<l; i++) {
|
||||
while (this.grid[i].length > columns) {
|
||||
var row = this.grid[i];
|
||||
var tile = row.pop();
|
||||
this.destroyTile(tile);
|
||||
|
||||
@@ -662,6 +662,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
* be properly set below.
|
||||
*/
|
||||
delete this.center;
|
||||
delete this.zoom;
|
||||
this.addLayers(options.layers);
|
||||
// set center (and optionally zoom)
|
||||
if (options.center && !this.getCenter()) {
|
||||
|
||||
@@ -107,11 +107,8 @@ OpenLayers.Popup.Anchored =
|
||||
moveTo: function(px) {
|
||||
var oldRelativePosition = this.relativePosition;
|
||||
this.relativePosition = this.calculateRelativePosition(px);
|
||||
|
||||
var newPx = this.calculateNewPx(px);
|
||||
|
||||
var newArguments = new Array(newPx);
|
||||
OpenLayers.Popup.prototype.moveTo.apply(this, newArguments);
|
||||
|
||||
OpenLayers.Popup.prototype.moveTo.call(this, this.calculateNewPx(px));
|
||||
|
||||
//if this move has caused the popup to change its relative position,
|
||||
// we need to make the appropriate cosmetic changes.
|
||||
|
||||
@@ -7,7 +7,7 @@ var OpenLayers = {
|
||||
/**
|
||||
* Constant: VERSION_NUMBER
|
||||
*/
|
||||
VERSION_NUMBER: "Release 2.12-rc4",
|
||||
VERSION_NUMBER: "Release 2.12-rc5",
|
||||
|
||||
/**
|
||||
* Constant: singleFile
|
||||
|
||||
@@ -74,13 +74,6 @@ OpenLayers.Util.isArray = function(a) {
|
||||
return (Object.prototype.toString.call(a) === '[object Array]');
|
||||
};
|
||||
|
||||
/**
|
||||
* Maintain existing definition of $.
|
||||
*/
|
||||
if(typeof window.$ === "undefined") {
|
||||
window.$ = OpenLayers.Util.getElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function: removeItem
|
||||
* Remove an object from an array. Iterates through the array
|
||||
|
||||
@@ -164,6 +164,17 @@ OpenLayers.Util.getArgs = function(url) {
|
||||
return OpenLayers.Util.getParameters(url);
|
||||
};
|
||||
|
||||
/**
|
||||
* Maintain existing definition of $.
|
||||
*
|
||||
* The use of our $-method is deprecated and the mapping of
|
||||
* OpenLayers.Util.getElement will eventually be removed. Do not depend on
|
||||
* window.$ being defined by OpenLayers.
|
||||
*/
|
||||
if(typeof window.$ === "undefined") {
|
||||
window.$ = OpenLayers.Util.getElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Namespace: OpenLayers.Ajax
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user