| | 218 | function test_02_Layer_Google_isBaseLayer (t) { |
|---|
| | 219 | if(validkey) { |
|---|
| | 220 | t.plan(3); |
|---|
| | 221 | var map = new OpenLayers.Map( 'map' , |
|---|
| | 222 | { controls: [] , 'numZoomLevels':20}); |
|---|
| | 223 | |
|---|
| | 224 | var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} ); |
|---|
| | 225 | map.addLayers([satellite]); |
|---|
| | 226 | map.zoomToMaxExtent(); |
|---|
| | 227 | |
|---|
| | 228 | t.eq(satellite.div.style.display, "", "Satellite layer is visible."); |
|---|
| | 229 | satellite.setVisibility(false); |
|---|
| | 230 | t.eq(satellite.div.style.display, "none", "Satellite layer is not visible."); |
|---|
| | 231 | satellite.setVisibility(true); |
|---|
| | 232 | t.eq(satellite.div.style.display, "block", "Satellite layer is visible."); |
|---|
| | 233 | |
|---|
| | 234 | } else { |
|---|
| | 235 | t.plan(0); |
|---|
| | 236 | t.debug_print("Google tests can't be run from " + |
|---|
| | 237 | window.location.host); |
|---|
| | 238 | } |
|---|
| | 239 | } |
|---|