- if (["cyclemap", "transportmap"].includes(map.getMapBaseLayerId())) {
- $("#export-image").show();
- $("#mapnik_scale_row").hide();
- $("#export-warning").hide();
- } else if (map.getMapBaseLayerId() === "mapnik") {
- $("#export-image").show();
- $("#mapnik_scale_row").show();
- $("#export-warning").hide();
- } else {
- $("#export-image").hide();
- $("#export-warning").show();
- }
+ $("#export-image").toggle(canDownloadImage);
+ $("#export-warning").toggle(!canDownloadImage);
+ $("#mapnik_scale_row").toggle(canDownloadImage && layer.options.layerId === "mapnik");