- if (map.hasLayer(map.noteLayer)) {
- map.removeLayer(map.noteLayer);
- } else {
- map.addLayer(map.noteLayer);
- }
+ function update() {
+ var disabled = OSM.STATUS === "database_offline" || map.getZoom() < 12;
+ link
+ .toggleClass("disabled", disabled)
+ .attr("data-bs-original-title", I18n.t(disabled ?
+ "javascripts.site.createnote_disabled_tooltip" :
+ "javascripts.site.createnote_tooltip"));