New GoogleNG layer using tiles from the v3 API's mapType::getTile method. r=bartvde (closes #3312)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12000 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-05-23 21:42:09 +00:00
parent 0c943fb5e0
commit 275889aa1a
10 changed files with 650 additions and 1 deletions

28
examples/google-ng.js Normal file
View File

@@ -0,0 +1,28 @@
var map;
function init() {
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.GoogleNG(
{type: google.maps.MapTypeId.TERRAIN}
);
var gmap = new OpenLayers.Layer.GoogleNG(
// ROADMAP, the default
);
var ghyb = new OpenLayers.Layer.GoogleNG(
{type: google.maps.MapTypeId.HYBRID}
);
var gsat = new OpenLayers.Layer.GoogleNG(
{type: google.maps.MapTypeId.SATELLITE}
);
map.addLayers([gphy, gmap, ghyb, gsat]);
// GoogleNG uses EPSG:900913 as projection, so we have to
// transform our coordinates
map.setCenter(new OpenLayers.LonLat(10.2, 48.9).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
), 5);
}