Add Bing imagery (chalobest@hotmail.com) to editstops.js.

This commit is contained in:
Schuyler Erle 2012-02-22 04:26:19 -08:00
parent a8c837b1dc
commit 3307f42023
2 changed files with 10 additions and 8 deletions

1
README
View File

@ -1,5 +1,6 @@
Note: If running postgres 9.1 and Django < 1.4, you will probably need this patch for things to work: https://code.djangoproject.com/raw-attachment/ticket/16778/postgis-adapter-2.patch . Reasons are explained here: http://stackoverflow.com/questions/7667724/error-saving-geodjango-pointfield
Don't forget to install python-psycopg2 and python-gdal for the sake of GeoDjango.
chaloBEST

View File

@ -226,13 +226,14 @@ var API_BASE = "/1.0/",
// layers[0] = new OpenLayers.Layer.OSM();
layers[0] = new OpenLayers.Layer.OSM();
layers[1] = new OpenLayers.Layer.Bing({
name: "Bing Aerial",
type: "Aerial",
key: "AqGpO7N9ioFw3YHoPV3C8crGfJqW5YST4gGKgIOnijrUbitLlgcAS2A0M9SJrUv9",
});
geojson_format = new OpenLayers.Format.GeoJSON();
//yes, jsonLayer is global. Yes, I know it's wrong.
jsonLayer = layers[1] = new OpenLayers.Layer.Vector({
geometryType: 'Point'
// projection: new OpenLayers.Projection("EPSG:4326")
});
// map.addLayer(vector_layer);
jsonLayer = layers[2] = new OpenLayers.Layer.Vector("Bus Stops");
map.addLayers(layers);
map.setCenter(center, 12);
var navigationControl = new OpenLayers.Control.Navigation({
@ -269,16 +270,16 @@ var API_BASE = "/1.0/",
}
});
map.addControl(navigationControl);
mapControl = new OpenLayers.Control.SelectFeature(layers[1], {
mapControl = new OpenLayers.Control.SelectFeature(jsonLayer, {
clickout: false,
toggle: true
});
zoomControl = new OpenLayers.Control.ZoomToMaxExtent();
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(mapControl);
// map.addControl(zoomControl);
mapControl.activate();
// zoomControl.activate();
layers[1].events.on({
jsonLayer.events.on({
'featureselected': onFeatureSelect,
'featureunselected': onFeatureUnselect
});