Merge branch '2.12'

This commit is contained in:
Bart van den Eijnden
2012-03-16 15:02:37 +01:00
8 changed files with 185 additions and 11 deletions

View File

@@ -1061,7 +1061,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
this.numLoadingTiles--;
this.events.triggerEvent("tileloaded", {tile: tile});
//if that was the last tile, then trigger a 'loadend' on the layer
if (this.tileQueue.length === 0 && this.numLoadingTiles === 0) {
if (this.numLoadingTiles === 0) {
this.events.triggerEvent("loadend");
if(this.backBuffer) {
// the removal of the back buffer is delayed to prevent flash

View File

@@ -1797,7 +1797,7 @@ OpenLayers.Map = OpenLayers.Class({
* options - {Object}
*/
moveTo: function(lonlat, zoom, options) {
if (!(lonlat instanceof OpenLayers.LonLat)) {
if (lonlat != null && !(lonlat instanceof OpenLayers.LonLat)) {
lonlat = new OpenLayers.LonLat(lonlat);
}
if (!options) {