With review from elem, and oversight from tschaub, rolling in
SphericalMercator changes. Note that this explicitly does *not* include r4182 , so as to keep changes to a single logical set: that should be filed in a seperate bug if it can be reproduced against trunk after this commit. Hooray for Tim, thanks for all the feedback, onward and upward! (Closes #686) git-svn-id: http://svn.openlayers.org/trunk/openlayers@4221 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -128,6 +128,23 @@
|
||||
window.location.host);
|
||||
}
|
||||
}
|
||||
|
||||
function test_Layer_Goole_forwardMercator(t){
|
||||
t.plan(2);
|
||||
//Just test that the fowardMercator function still exists.
|
||||
var layer = new OpenLayers.Layer.Google('Test Layer', {'sphericalMercator': true});
|
||||
layer.forwardMercator = function(evt) {
|
||||
t.ok( true, "GoogleMercator.forwardMercator was called and executed." );
|
||||
return;
|
||||
}
|
||||
layer.forwardMercator();
|
||||
//Now test the fowardMercator returns the expected LonLat object
|
||||
var layer = new OpenLayers.Layer.Google('Test Layer', {'sphericalMercator': true});
|
||||
var lonlat2 = new OpenLayers.LonLat(Math.random(),Math.random());
|
||||
var result = layer.forwardMercator(lonlat2.lon, lonlat2.lat);
|
||||
t.ok( result instanceof OpenLayers.LonLat, "OpenLayers.Google.fowardMercator returns LonLat object" );
|
||||
|
||||
}
|
||||
|
||||
function test_Layer_Google_overlay(t) {
|
||||
// Test for #849.
|
||||
|
||||
Reference in New Issue
Block a user