Reworking the Google layer so that a shared GMap object is used for all Google layers on a single map. This reduces the DOM overhead and gets rid of map resizing issues. Excellent solution by ahocevar. r=me,ahocevar (closes #1797).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10021 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -85,35 +85,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function test_Layer_Google_setMapType (t) {
|
||||
if (validkey) {
|
||||
t.plan(3);
|
||||
var layer = new OpenLayers.Layer.Google('Goog Layer');
|
||||
layer.map = {'events':{'unregister': function() {}}};
|
||||
layer.loadMapObject();
|
||||
layer.mapObject.getCenter= function() { return true; }
|
||||
layer.mapObject.getMapTypes = function() { return [0, 1]; }
|
||||
layer.mapObject.addMapType = function(type) {
|
||||
t.eq(type, 5, "new map type passed correctly.");
|
||||
}
|
||||
layer.mapObject.setMapType = function(arg) {
|
||||
t.eq(arg, 5, "got map type");
|
||||
}
|
||||
layer.type = 5;
|
||||
layer.setMapType();
|
||||
layer.mapObject.setMapType = function(arg) {
|
||||
t.eq(arg, 0, "got map type");
|
||||
}
|
||||
layer.type = 0
|
||||
layer.setMapType();
|
||||
|
||||
} else {
|
||||
t.plan(0);
|
||||
t.debug_print("Google tests can't be run from " +
|
||||
window.location.host);
|
||||
}
|
||||
}
|
||||
|
||||
function test_Layer_Google_Translation_pixel (t) {
|
||||
if(validkey) {
|
||||
t.plan( 4 );
|
||||
|
||||
Reference in New Issue
Block a user