Include layers in hash

This commit is contained in:
John Firebaugh 2013-07-24 15:23:19 -07:00
parent 1a5f14d338
commit 6618cb9019
8 changed files with 108 additions and 33 deletions

View file

@ -2,7 +2,7 @@
//= require templates/browse/feature_list
//= require templates/browse/feature_history
function initializeBrowse(map) {
function initializeBrowse(map, params) {
var browseBounds;
var layersById;
var selectedLayer;
@ -49,6 +49,12 @@ function initializeBrowse(map) {
}
});
if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
if (params.layers.indexOf(dataLayer.options.code) >= 0) {
map.addLayer(dataLayer);
}
}
function startBrowse(sidebarHtml) {
locationFilter = new L.LocationFilter({
enableButton: false,

View file

@ -1,9 +1,8 @@
//= require templates/notes/show
//= require templates/notes/new
function initializeNotes(map) {
var params = OSM.mapParams(),
noteLayer = map.noteLayer,
function initializeNotes(map, params) {
var noteLayer = map.noteLayer,
notes = {},
newNote;
@ -50,7 +49,7 @@ function initializeNotes(map) {
});
if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
if (params.notes || (params.layers && params.layers.indexOf('N')) >= 0) {
if (params.layers.indexOf(noteLayer.options.code) >= 0) {
map.addLayer(noteLayer);
}