Merge branch 'master' into clientzoom
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
* @requires OpenLayers/Layer/Vector.js
|
||||
* @requires OpenLayers/Request/XMLHttpRequest.js
|
||||
* @requires OpenLayers/Console.js
|
||||
* @requires OpenLayers/Lang.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -167,7 +166,7 @@ OpenLayers.Layer.GML = OpenLayers.Class(OpenLayers.Layer.Vector, {
|
||||
* request - {String}
|
||||
*/
|
||||
requestFailure: function(request) {
|
||||
OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML", {'url':this.url}));
|
||||
OpenLayers.Console.userError('Error in loading GML file ' + this.url);
|
||||
this.events.triggerEvent("loadend");
|
||||
},
|
||||
|
||||
|
||||
@@ -516,6 +516,18 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
* tileoffsetlat, tileoffsetx, tileoffsety
|
||||
*/
|
||||
calculateGridLayout: function(bounds, origin, resolution) {
|
||||
bounds = bounds.clone();
|
||||
if (this.map.baseLayer.wrapDateLine) {
|
||||
var maxExtent = this.map.getMaxExtent(),
|
||||
width = maxExtent.getWidth();
|
||||
// move the bounds one world width to the right until the origin is
|
||||
// within the world extent
|
||||
while (bounds.left < maxExtent.left) {
|
||||
bounds.left += width;
|
||||
bounds.right += width;
|
||||
}
|
||||
}
|
||||
|
||||
var tilelon = resolution * this.tileSize.w;
|
||||
var tilelat = resolution * this.tileSize.h;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Layer/Vector.js
|
||||
* @requires OpenLayers/Console.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -64,10 +63,8 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, {
|
||||
*/
|
||||
addNodes: function(pointFeatures, options) {
|
||||
if (pointFeatures.length < 2) {
|
||||
OpenLayers.Console.error(
|
||||
"At least two point features have to be added to create" +
|
||||
"a line from");
|
||||
return;
|
||||
throw new Error("At least two point features have to be added to " +
|
||||
"create a line from");
|
||||
}
|
||||
|
||||
var lines = new Array(pointFeatures.length-1);
|
||||
@@ -81,9 +78,7 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, {
|
||||
var lonlat = pointFeature.lonlat;
|
||||
endPoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
|
||||
} else if(endPoint.CLASS_NAME != "OpenLayers.Geometry.Point") {
|
||||
OpenLayers.Console.error(
|
||||
"Only features with point geometries are supported.");
|
||||
return;
|
||||
throw new TypeError("Only features with point geometries are supported.");
|
||||
}
|
||||
|
||||
if(i > 0) {
|
||||
|
||||
@@ -565,9 +565,8 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
|
||||
if (this.geometryType &&
|
||||
!(feature.geometry instanceof this.geometryType)) {
|
||||
var throwStr = OpenLayers.i18n('componentShouldBe',
|
||||
{'geomType':this.geometryType.prototype.CLASS_NAME});
|
||||
throw throwStr;
|
||||
throw new TypeError('addFeatures: component should be an ' +
|
||||
this.geometryType.prototype.CLASS_NAME);
|
||||
}
|
||||
|
||||
//give feature reference to its layer
|
||||
@@ -827,8 +826,10 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
*/
|
||||
getFeatureFromEvent: function(evt) {
|
||||
if (!this.renderer) {
|
||||
OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));
|
||||
return null;
|
||||
throw new Error('getFeatureFromEvent called on layer with no ' +
|
||||
'renderer. This usually means you destroyed a ' +
|
||||
'layer, but not some handler which is associated ' +
|
||||
'with it.');
|
||||
}
|
||||
var feature = null;
|
||||
var featureId = this.renderer.getFeatureIdFromEvent(evt);
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.VirtualEarth
|
||||
* *Deprecated*. Use <OpenLayers.Layer.Bing> instead.
|
||||
*
|
||||
* Instances of OpenLayers.Layer.VirtualEarth are used to display the data from
|
||||
* the Bing Maps AJAX Control (see e.g.
|
||||
* http://msdn.microsoft.com/library/bb429619.aspx). Create a VirtualEarth
|
||||
|
||||
Reference in New Issue
Block a user