Added Bing layer with direct tile access. p=me,tschaub r=tschaub,me (closes #2975)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10975 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
26
examples/bing-tiles.js
Normal file
26
examples/bing-tiles.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// API key for http://openlayers.org. Please get your own at
|
||||
// http://bingmapsportal.com/ and use that instead.
|
||||
var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
|
||||
|
||||
var map = new OpenLayers.Map( 'map');
|
||||
|
||||
var road = new OpenLayers.Layer.Bing({
|
||||
key: apiKey,
|
||||
type: "Road"
|
||||
});
|
||||
var aerial = new OpenLayers.Layer.Bing({
|
||||
key: apiKey,
|
||||
type: "Aerial"
|
||||
});
|
||||
var hybrid = new OpenLayers.Layer.Bing({
|
||||
key: apiKey,
|
||||
type: "AerialWithLabels",
|
||||
name: "Bing Aerial With Labels"
|
||||
});
|
||||
|
||||
map.addLayers([road, aerial, hybrid]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform(
|
||||
new OpenLayers.Projection("EPSG:4326"),
|
||||
map.getProjectionObject()
|
||||
), 12);
|
||||
Reference in New Issue
Block a user