Merge all changes from the naturaldocs sandbox. This brings all the work that

has been done in the NaturalDocs branch back to trunk. Thanks to everyone who
helped out in making this happen. (I could list people, but the list would
be long, and I'm already mentally on vacation.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-06-29 15:59:20 +00:00
parent f1c61fd0d6
commit 3948913bfc
107 changed files with 8658 additions and 4011 deletions
+101 -53
View File
@@ -3,35 +3,51 @@
* for the full text of the license. */
/**
* @class
*
* @requires OpenLayers/Layer/EventPane.js
* @requires OpenLayers/Layer/FixedZoomLevels.js
*
* Class: OpenLayers.Layer.MultiMap
*
* Inherits:
* - <OpenLayers.Layers.EventPane>
* - <OpenLayers.Layers.FixedZoomLevels>
*/
OpenLayers.Layer.MultiMap = OpenLayers.Class.create();
OpenLayers.Layer.MultiMap.prototype =
OpenLayers.Class.inherit( OpenLayers.Layer.EventPane,
OpenLayers.Layer.FixedZoomLevels, {
/** @final @type int */
/**
* Constant: MIN_ZOOM_LEVEL
* {Integer} 1
*/
MIN_ZOOM_LEVEL: 1,
/** @final @type int */
/**
* Constant: MAX_ZOOM_LEVEL
* {Integer} 17
*/
MAX_ZOOM_LEVEL: 17,
/** Hardcode these resolutions so that they are more closely
* tied with the standard wms projection
*
* @final @type Array(float) */
/**
* Constant: RESOLUTIONS
* {Array(Float)} Hardcode these resolutions so that they are more closely
* tied with the standard wms projection
*/
RESOLUTIONS: [9, 1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125],
/** @type VEMapType */
/**
* APIProperty: type
* {?}
*/
type: null,
/**
* @constructor
* Constructor: OpenLayers.Layer.MultiMap
*
* @param {String} name
* Parameters:
* name - {String}
* options - {Object}
*/
initialize: function(name, options) {
OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments);
@@ -40,7 +56,7 @@ OpenLayers.Layer.MultiMap.prototype =
},
/**
*
* Method: loadMapObject
*/
loadMapObject:function() {
try { //crash proofing
@@ -49,9 +65,11 @@ OpenLayers.Layer.MultiMap.prototype =
},
/**
* @return String with information on why layer is broken, how to get
* APIMethod: getWarningHTML
*
* Return:
* {String} String with information on why layer is broken, how to get
* it working.
* @type String
*/
getWarningHTML:function() {
@@ -84,26 +102,33 @@ OpenLayers.Layer.MultiMap.prototype =
// Get&Set Center, Zoom
/** Set the mapObject to the specified center and zoom
/**
* APIMethod: setMapObjectCenter
* Set the mapObject to the specified center and zoom
*
* @param {Object} center MapObject LonLat format
* @param {int} zoom MapObject zoom format
* Parameters:
* center - {Object} MapObject LonLat format
* zoom - {int} MapObject zoom format
*/
setMapObjectCenter: function(center, zoom) {
this.mapObject.goToPosition(center, zoom);
},
/**
* @returns the mapObject's current center in Map Object format
* @type Object
* APIMethod: getMapObjectCenter
*
* Return:
* {Object} The mapObject's current center in Map Object format
*/
getMapObjectCenter: function() {
return this.mapObject.getCurrentPosition();
},
/**
* @returns the mapObject's current zoom, in Map Object format
* @type int
* APIMethod: getMapObjectZoom
*
* Return:
* {Integer} The mapObject's current zoom, in Map Object format
*/
getMapObjectZoom: function() {
return this.mapObject.getZoomFactor();
@@ -112,11 +137,14 @@ OpenLayers.Layer.MultiMap.prototype =
// LonLat - Pixel Translation
/**
* @param {Object} moPixel MapObject Pixel format
/**
* APIMethod: getMapObjectLonLatFromMapObjectPixel
*
* @returns MapObject LonLat translated from MapObject Pixel
* @type Object
* Parameters:
* moPixel - {Object} MapObject Pixel format
*
* Return:
* {Object} MapObject LonLat translated from MapObject Pixel
*/
getMapObjectLonLatFromMapObjectPixel: function(moPixel) {
moPixel.x = moPixel.x - (this.map.getSize().w/2);
@@ -124,11 +152,14 @@ OpenLayers.Layer.MultiMap.prototype =
return this.mapObject.getMapPositionAt(moPixel);
},
/**
* @param {Object} moPixel MapObject Pixel format
/**
* APIMethod: getMapObjectPixelFromMapObjectLonLat
*
* @returns MapObject Pixel translated from MapObject LonLat
* @type Object
* Parameters:
* moLonLat - {Object} MapObject LonLat format
*
* Return:
* {Object} MapObject Pixel transtlated from MapObject LonLat
*/
getMapObjectPixelFromMapObjectLonLat: function(moLonLat) {
return this.mapObject.geoPosToContainerPixels(moLonLat);
@@ -145,31 +176,40 @@ OpenLayers.Layer.MultiMap.prototype =
// LonLat
/**
* @param {Object} moLonLat MapObject LonLat format
* APIMethod: getLongitudeFromMapObjectLonLat
*
* @returns Longitude of the given MapObject LonLat
* @type float
* Parameters:
* moLonLat - {Object} MapObject LonLat format
*
* Return:
* {Float} Longitude of the given MapObject LonLat
*/
getLongitudeFromMapObjectLonLat: function(moLonLat) {
return moLonLat.lon;
},
/**
* @param {Object} moLonLat MapObject LonLat format
* APIMethod: getLatitudeFromMapObjectLonLat
*
* @returns Latitude of the given MapObject LonLat
* @type float
* Parameters:
* moLonLat - {Object} MapObject LonLat format
*
* Return:
* {Float} Latitude of the given MapObject LonLat
*/
getLatitudeFromMapObjectLonLat: function(moLonLat) {
return moLonLat.lat;
},
/**
* @param {int} lon float
* @param {int} lat float
* APIMethod: getMapObjectLonLatFromLonLat
*
* @returns MapObject LonLat built from lon and lat params
* @type Object
* Parameters:
* lon - {Float}
* lat - {Float}
*
* Return:
* {Object} MapObject LonLat built from lon and lat params
*/
getMapObjectLonLatFromLonLat: function(lon, lat) {
return new MMLatLon(lat, lon);
@@ -177,38 +217,46 @@ OpenLayers.Layer.MultiMap.prototype =
// Pixel
/**
* @param {Object} moPixel MapObject Pixel format
/**
* APIMethod: getXFromMapObjectPixel
*
* @returns X value of the MapObject Pixel
* @type int
* Parameters:
* moPixel - {Object} MapObject Pixel format
*
* Return:
* {Integer} X value of the MapObject Pixel
*/
getXFromMapObjectPixel: function(moPixel) {
return moPixel.x;
},
/**
* @param {Object} moPixel MapObject Pixel format
/**
* APIMethod: getYFromMapObjectPixel
*
* @returns Y value of the MapObject Pixel
* @type int
* Parameters:
* moPixel - {Object} MapObject Pixel format
*
* Return:
* {Integer} Y value of the MapObject Pixel
*/
getYFromMapObjectPixel: function(moPixel) {
return moPixel.y;
},
/**
* @param {int} x
* @param {int} y
/**
* APIMethod: getMapObjectPixelFromXY
*
* @returns MapObject Pixel from x and y parameters
* @type Object
* Parameters:
* x - {Integer}
* y - {Integer}
*
* Return:
* {Object} MapObject Pixel from x and y parameters
*/
getMapObjectPixelFromXY: function(x, y) {
return new MMPoint(x, y);
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Layer.MultiMap"
});