Chasing tiles
This commit is contained in:
+9
-23
@@ -1,35 +1,21 @@
|
|||||||
var streets = new OpenLayers.Layer.XYZ(
|
var earth = new OpenLayers.Layer.XYZ(
|
||||||
"MapBox Streets",
|
"Natural Earth",
|
||||||
[
|
[
|
||||||
"http://a.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png",
|
"http://a.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png",
|
||||||
"http://b.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png",
|
"http://b.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png",
|
||||||
"http://c.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png",
|
"http://c.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png",
|
||||||
"http://d.tiles.mapbox.com/v3/mapbox.mapbox-streets/${z}/${x}/${y}.png"
|
"http://d.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy/${z}/${x}/${y}.png"
|
||||||
], {
|
], {
|
||||||
attribution: "Tiles © <a href='http://mapbox.com/'>MapBox</a> | " +
|
attribution: "Tiles © <a href='http://mapbox.com/'>MapBox</a>",
|
||||||
"Data © <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> " +
|
|
||||||
"and contributors, CC-BY-SA",
|
|
||||||
sphericalMercator: true,
|
sphericalMercator: true,
|
||||||
wrapDateLine: true,
|
wrapDateLine: true,
|
||||||
transitionEffect: "resize",
|
numZoomLevels: 5
|
||||||
buffer: 1,
|
|
||||||
numZoomLevels: 17
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
var map = new OpenLayers.Map({
|
var map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
layers: [streets],
|
layers: [earth],
|
||||||
controls: [
|
|
||||||
new OpenLayers.Control.Attribution(),
|
|
||||||
new OpenLayers.Control.Navigation({
|
|
||||||
dragPanOptions: {
|
|
||||||
enableKinetic: true
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new OpenLayers.Control.Zoom(),
|
|
||||||
new OpenLayers.Control.Permalink({anchor: true})
|
|
||||||
],
|
|
||||||
center: [0, 0],
|
center: [0, 0],
|
||||||
zoom: 1
|
zoom: 1
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user