Add Bing imagery (chalobest@hotmail.com) to editstops.js.
This commit is contained in:
parent
a8c837b1dc
commit
3307f42023
1
README
1
README
|
@ -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
|
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
|
chaloBEST
|
||||||
|
|
||||||
|
|
|
@ -226,13 +226,14 @@ var API_BASE = "/1.0/",
|
||||||
// layers[0] = new OpenLayers.Layer.OSM();
|
// layers[0] = new OpenLayers.Layer.OSM();
|
||||||
|
|
||||||
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();
|
geojson_format = new OpenLayers.Format.GeoJSON();
|
||||||
//yes, jsonLayer is global. Yes, I know it's wrong.
|
//yes, jsonLayer is global. Yes, I know it's wrong.
|
||||||
jsonLayer = layers[1] = new OpenLayers.Layer.Vector({
|
jsonLayer = layers[2] = new OpenLayers.Layer.Vector("Bus Stops");
|
||||||
geometryType: 'Point'
|
|
||||||
// projection: new OpenLayers.Projection("EPSG:4326")
|
|
||||||
});
|
|
||||||
// map.addLayer(vector_layer);
|
|
||||||
map.addLayers(layers);
|
map.addLayers(layers);
|
||||||
map.setCenter(center, 12);
|
map.setCenter(center, 12);
|
||||||
var navigationControl = new OpenLayers.Control.Navigation({
|
var navigationControl = new OpenLayers.Control.Navigation({
|
||||||
|
@ -269,16 +270,16 @@ var API_BASE = "/1.0/",
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
map.addControl(navigationControl);
|
map.addControl(navigationControl);
|
||||||
mapControl = new OpenLayers.Control.SelectFeature(layers[1], {
|
mapControl = new OpenLayers.Control.SelectFeature(jsonLayer, {
|
||||||
clickout: false,
|
clickout: false,
|
||||||
toggle: true
|
toggle: true
|
||||||
});
|
});
|
||||||
zoomControl = new OpenLayers.Control.ZoomToMaxExtent();
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||||
map.addControl(mapControl);
|
map.addControl(mapControl);
|
||||||
// map.addControl(zoomControl);
|
// map.addControl(zoomControl);
|
||||||
mapControl.activate();
|
mapControl.activate();
|
||||||
// zoomControl.activate();
|
// zoomControl.activate();
|
||||||
layers[1].events.on({
|
jsonLayer.events.on({
|
||||||
'featureselected': onFeatureSelect,
|
'featureselected': onFeatureSelect,
|
||||||
'featureunselected': onFeatureUnselect
|
'featureunselected': onFeatureUnselect
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user