Compare commits
12 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8778b746b3 | ||
|
|
a5ea8d7fcf | ||
|
|
b103d3b428 | ||
|
|
8562582dd2 | ||
|
|
cd5ae45273 | ||
|
|
d1b00824fc | ||
|
|
4399ebcb04 | ||
|
|
0bb804c9e7 | ||
|
|
572d78fb4d | ||
|
|
1d948fc914 | ||
|
|
449b85966e | ||
|
|
1223ea339d |
@@ -425,4 +425,4 @@
|
||||
* When asking questions or reporting issues, make sure to include the output of
|
||||
* OpenLayers.VERSION_NUMBER in the question or issue-description.
|
||||
*/
|
||||
OpenLayers.VERSION_NUMBER="Release 2.13-rc2";
|
||||
OpenLayers.VERSION_NUMBER="Release 2.13-rc4";
|
||||
|
||||
@@ -235,8 +235,8 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.handlers.drag.evt);
|
||||
if (feature) {
|
||||
this.dragStart(feature);
|
||||
} else if (this.feature && this.clickout) {
|
||||
this.unselectFeature(this.feature);
|
||||
} else if (this.clickout) {
|
||||
this._unselect = this.feature;
|
||||
}
|
||||
},
|
||||
move: function(pixel) {
|
||||
@@ -363,8 +363,9 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* feature - {<OpenLayers.Feature.Vector>} the selected feature.
|
||||
*/
|
||||
selectFeature: function(feature) {
|
||||
if (this.geometryTypes && OpenLayers.Util.indexOf(this.geometryTypes,
|
||||
feature.geometry.CLASS_NAME) == -1) {
|
||||
if (this.feature === feature ||
|
||||
(this.geometryTypes && OpenLayers.Util.indexOf(this.geometryTypes,
|
||||
feature.geometry.CLASS_NAME) == -1)) {
|
||||
return;
|
||||
}
|
||||
if (this.beforeSelectFeature(feature) !== false) {
|
||||
|
||||
@@ -102,8 +102,9 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
|
||||
* {Array(Array(int))} An array containing n-dimensional arrays of
|
||||
* coordinates.
|
||||
*/
|
||||
decode: function(encoded, dims) {
|
||||
var flatPoints = this.decodeDeltas(encoded, dims, 1);
|
||||
decode: function(encoded, dims, opt_factor) {
|
||||
var factor = opt_factor || 1e5;
|
||||
var flatPoints = this.decodeDeltas(encoded, dims, factor);
|
||||
var flatPointsLength = flatPoints.length;
|
||||
|
||||
var points = [];
|
||||
@@ -177,7 +178,8 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
|
||||
* Returns:
|
||||
* {String} An encoded string
|
||||
*/
|
||||
encode: function (points, dims) {
|
||||
encode: function (points, dims, opt_factor) {
|
||||
var factor = opt_factor || 1e5;
|
||||
var flatPoints = [];
|
||||
|
||||
var pointsLength = points.length;
|
||||
@@ -189,7 +191,7 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
|
||||
}
|
||||
}
|
||||
|
||||
return this.encodeDeltas(flatPoints, dims, 1);
|
||||
return this.encodeDeltas(flatPoints, dims, factor);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -1100,7 +1100,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
this.events.triggerEvent("tileloadstart", {tile: tile});
|
||||
this.numLoadingTiles++;
|
||||
if (!this.singleTile && this.backBuffer && this.gridResolution === this.backBufferResolution) {
|
||||
OpenLayers.Element.addClass(tile.imgDiv, replacingCls);
|
||||
OpenLayers.Element.addClass(tile.getTile(), replacingCls);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1112,13 +1112,14 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
aborted: aborted
|
||||
});
|
||||
if (!this.singleTile && !aborted && this.backBuffer && this.gridResolution === this.backBufferResolution) {
|
||||
if (OpenLayers.Element.getStyle(tile.imgDiv, 'display') === 'none') {
|
||||
var tileDiv = tile.getTile();
|
||||
if (OpenLayers.Element.getStyle(tileDiv, 'display') === 'none') {
|
||||
var bufferTile = document.getElementById(tile.id + '_bb');
|
||||
if (bufferTile) {
|
||||
bufferTile.parentNode.removeChild(bufferTile);
|
||||
}
|
||||
}
|
||||
OpenLayers.Element.removeClass(tile.imgDiv, replacingCls);
|
||||
OpenLayers.Element.removeClass(tileDiv, replacingCls);
|
||||
}
|
||||
//if that was the last tile, then trigger a 'loadend' on the layer
|
||||
if (this.numLoadingTiles === 0) {
|
||||
|
||||
@@ -7,7 +7,7 @@ var OpenLayers = {
|
||||
/**
|
||||
* Constant: VERSION_NUMBER
|
||||
*/
|
||||
VERSION_NUMBER: "Release 2.13-rc2",
|
||||
VERSION_NUMBER: "Release 2.13-rc4",
|
||||
|
||||
/**
|
||||
* Constant: singleFile
|
||||
|
||||
@@ -175,7 +175,7 @@ OpenLayers.TileManager = OpenLayers.Class({
|
||||
* evt - {Object} Listener argument
|
||||
*/
|
||||
move: function(evt) {
|
||||
this.updateTimeout(evt.object, this.moveDelay);
|
||||
this.updateTimeout(evt.object, this.moveDelay, true);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -272,11 +272,16 @@ OpenLayers.TileManager = OpenLayers.Class({
|
||||
* Parameters:
|
||||
* map - {<OpenLayers.Map>} The map to update the timeout for
|
||||
* delay - {Number} The delay to apply
|
||||
* nice - {Boolean} If true, the timeout function will only be created if
|
||||
* the tilequeue is not empty. This is used by the move handler to
|
||||
* avoid impacts on dragging performance. For other events, the tile
|
||||
* queue may not be populated yet, so we need to set the timer
|
||||
* regardless of the queue size.
|
||||
*/
|
||||
updateTimeout: function(map, delay) {
|
||||
updateTimeout: function(map, delay, nice) {
|
||||
window.clearTimeout(this.tileQueueId[map.id]);
|
||||
var tileQueue = this.tileQueue[map.id];
|
||||
if (tileQueue.length) {
|
||||
if (!nice || tileQueue.length) {
|
||||
this.tileQueueId[map.id] = window.setTimeout(
|
||||
OpenLayers.Function.bind(function() {
|
||||
this.drawTilesFromQueue(map);
|
||||
@@ -383,6 +388,11 @@ OpenLayers.TileManager = OpenLayers.Class({
|
||||
if (img && (!img.parentNode ||
|
||||
OpenLayers.Element.hasClass(img.parentNode, 'olBackBuffer'))) {
|
||||
if (tile.layer.backBuffer) {
|
||||
if (tile.layer.backBuffer === img.parentNode) {
|
||||
// cached image is on the target layer's backbuffer already,
|
||||
// so nothing to do here
|
||||
return;
|
||||
}
|
||||
img.style.opacity = 0;
|
||||
img.style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ The `enableKinetic` property for the DragPan control has been changed to true by
|
||||
## Control.ModifyFeature: no more built-in SelectFeature control
|
||||
|
||||
The ModifyFeature control is now much leaner, making it more reliable when combined with other controls. The most noticable change is that it has no
|
||||
`selectControl` member any more. Users who previously relied on this built-in SelectFeature control will now have to create both a SelectFeature and a ModifyFeature control and configure the ModifyFeature control with `standalone: true`. To get features selected, call the `selectFeature` method e.g. from a `featureselected` listener on the vector layer.
|
||||
`selectControl` member any more. Users who previously relied on this built-in SelectFeature control will now have to create both a SelectFeature and a ModifyFeature control and configure the ModifyFeature control with `standalone: true`. To get features selected, call the `selectFeature` method e.g. from a `featureselected` listener on the vector layer. Note that other than in the old implementation, calling `selectFeature` on an already selected feature will not do anything.
|
||||
|
||||
## Format.GPX: No more prefixes
|
||||
|
||||
|
||||
@@ -225,6 +225,7 @@
|
||||
|
||||
// Points don't call collectVertices
|
||||
control.selectFeature(fakeFeature);
|
||||
control.unselectFeature(fakeFeature);
|
||||
|
||||
control.collectVertices = function() {
|
||||
t.ok(true, "collectVertices called");
|
||||
@@ -237,7 +238,8 @@
|
||||
layer.addFeatures = function(features) {
|
||||
t.ok(features == 'a' || features == 'd', "features passed correctly");
|
||||
}
|
||||
|
||||
layer.destroyFeatures = function() {};
|
||||
|
||||
fakeFeature.geometry = new OpenLayers.Geometry.Polygon([
|
||||
new OpenLayers.Geometry.LinearRing([
|
||||
new OpenLayers.Geometry.Point(0, 0),
|
||||
@@ -246,7 +248,9 @@
|
||||
]);
|
||||
|
||||
// OnSelect calls collectVertices and passes features to layer
|
||||
control.selectFeature(fakeFeature);
|
||||
control.selectFeature(fakeFeature);
|
||||
control.unselectFeature(fakeFeature);
|
||||
layer.destroyFeatures = OpenLayers.Layer.Vector.prototype.destroyFeatures;
|
||||
|
||||
control.vertices = ['a'];
|
||||
control.virtualVertices = [{destroy: function() {}}];
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<script src="../OLLoader.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var flatPoints;
|
||||
var floats, smallFloats, encodedFloats;
|
||||
var signedIntegers, encodedSignedIntegers;
|
||||
var unsignedIntegers, encodedUnsignedIntegers;
|
||||
var flatPoints;
|
||||
var floats, smallFloats, encodedFloats;
|
||||
var signedIntegers, encodedSignedIntegers;
|
||||
var unsignedIntegers, encodedUnsignedIntegers;
|
||||
|
||||
function resetTestingData() {
|
||||
function resetTestingData() {
|
||||
flatPoints = [38.50000, -120.20000,
|
||||
40.70000, -120.95000,
|
||||
43.25200, -126.45300];
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
unsignedIntegers = [0, 30, 1, 31, 32, 2, 174];
|
||||
encodedUnsignedIntegers = '?]@^_@AmD';
|
||||
}
|
||||
}
|
||||
|
||||
var basePoints = new Array(
|
||||
new Array(3850000, -12020000),
|
||||
@@ -106,8 +106,8 @@
|
||||
for (i in decodedPoints) {
|
||||
var point = basePoints[i];
|
||||
var decodedPoint = decodedPoints[i];
|
||||
t.eq(point[0], decodedPoint[0]);
|
||||
t.eq(point[1], decodedPoint[1]);
|
||||
t.eq(parseInt(decodedPoint[0] * 1e5), point[0]);
|
||||
t.eq(parseInt(decodedPoint[1] * 1e5), point[1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
var format = new OpenLayers.Format.EncodedPolyline();
|
||||
|
||||
t.eq(format.encode(basePoints, 2), encoded);
|
||||
t.eq(format.encode(basePoints, 2, 1), encoded);
|
||||
}
|
||||
|
||||
function test_encodeDeltas_returns_expected_value(t) {
|
||||
|
||||
@@ -506,7 +506,7 @@ a.olControlZoomOut {
|
||||
}
|
||||
|
||||
/* when replacing tiles, do not show tile and backbuffer at the same time */
|
||||
.olTileImage.olTileReplacing {
|
||||
.olTileReplacing {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user