Don't try and look at params.layers when it isn't set
This commit is contained in:
parent
c8fb5ad24c
commit
5f95fb6b78
1 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,10 @@ function initializeNotes(map) {
|
|||
});
|
||||
|
||||
if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
|
||||
if (params.notes || params.layers.indexOf('N') >= 0) map.addLayer(noteLayer);
|
||||
if (params.notes || (params.layers && params.layers.indexOf('N')) >= 0) {
|
||||
map.addLayer(noteLayer);
|
||||
}
|
||||
|
||||
if (params.note) {
|
||||
$.ajax({
|
||||
url: "/api/" + OSM.API_VERSION + "/notes/" + params.note + ".json",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue