We need to handle the backbuffer before we fire the loadend event.
Otherwise listeners that call e.g. mergeNewParams() will cause the
backbuffer removal code to fail, because tile.imgDiv (and hence
this._transitionElement) will be null.
This change introduces a new 'replace' mode for tile transitions: when the
resolution does not change, which happens when mergeNewParams is called,
the tile will be marked with the .olTileReplace class. If this class sets
the tile's imgDiv display to 'none', the backbuffer for the tile will
immediately be removed when the tile is loaded.
We now reuse tile images by maintaining a cache of image elements with a
simplified LRU expiry policy (by order, not by timestamp). The tile queue
is bypassed for images that are available in the cache, so they can be
rendered immediately. And the tile queue itself loads more than just one
image at a time now (2 per layer url).
In addition to relying on removeBackBufferDelay, we can remove the
backbuffer earlier without flicker in an ontransitionend listener on the
last loaded tile.
The Bing REST api still returns HTTP urls in meta data even if
we hit the API over SSL. This replaces http:// with // to
avoid any SSL browser errors.
Default to replacing with // but can force http: or https: with the
protocol parameter
This avoids issues with Elements renderers, where the nodeFactory method
cannot find nodes while the map viewport is transitioning from the mapDiv
to the googleControl.
The control div is now an empty container that we can always append to and
remove from without having to worry about GMaps changing styles on it. It
also makes sure that the control is appended before Google's own
attribution control, so the "Report a map error" link will always be
clickable.
Simple and effective: As soon as a map has a Google layer, the whole map viewport is added as control to the GMap. As soon as no Google layer is visible on the map any more, the map viewport is appended to the map container again. With this change, OpenLayers strictly limits its GMaps integration to the GMaps API.
Also note that there are no css overrides for the attribution any more. Instead, controls can now be conditionally positioned differently for Google layer by using the .olForeignContainer selector.
Calculating pixel positions from origin and grid index causes alignment
issues in the grid. By going back to incremental positioning, we get a
result without blank spaces between tiles again.
This also fixes an issue that has gone unnoticed for a while: the grid did
not cover the bottom of the map viewport, but instead covered an invisible
area above the top of the map viewport.
Now we also do not use deltas for shiftRow and shiftColumn. Some
refactoring was done so we do not need different calculateGridLayout
methods for layers with top-left and bottom-left tile origin.
TODO: With this commit, ArcGisCache and KaMap layers are broken.
The [URI standard](http://tools.ietf.org/html/rfc3986#section-4.2) allows for URI without a scheme. Where http is used to load the app, using a schemeless URL for the Bing metadata loads a script using http - and the same goes for https.