Fix order of initialization
initializeNotes needs to be called after L.OSM.note.
This commit is contained in:
parent
e68e3e9150
commit
8b5e0d0248
1 changed files with 12 additions and 12 deletions
|
@ -102,18 +102,6 @@ $(document).ready(function () {
|
|||
map.dataLayer = new L.OSM.DataLayer(null);
|
||||
map.dataLayer.options.code = 'D';
|
||||
|
||||
if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
|
||||
initializeNotes(map);
|
||||
if (params.layers.indexOf(map.noteLayer.options.code) >= 0) {
|
||||
map.addLayer(map.noteLayer);
|
||||
}
|
||||
|
||||
initializeBrowse(map);
|
||||
if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
|
||||
map.addLayer(map.dataLayer);
|
||||
}
|
||||
}
|
||||
|
||||
var position = $('html').attr('dir') === 'rtl' ? 'topleft' : 'topright';
|
||||
|
||||
L.OSM.zoom({position: position})
|
||||
|
@ -155,6 +143,18 @@ $(document).ready(function () {
|
|||
L.control.scale()
|
||||
.addTo(map);
|
||||
|
||||
if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
|
||||
initializeNotes(map);
|
||||
if (params.layers.indexOf(map.noteLayer.options.code) >= 0) {
|
||||
map.addLayer(map.noteLayer);
|
||||
}
|
||||
|
||||
initializeBrowse(map);
|
||||
if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
|
||||
map.addLayer(map.dataLayer);
|
||||
}
|
||||
}
|
||||
|
||||
$('.leaflet-control .control-button').tooltip({placement: 'left', container: 'body'});
|
||||
|
||||
map.on('moveend layeradd layerremove', function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue