+ const mapWidth = Math.round(size.x / scale / 0.00028);
+ const mapHeight = Math.round(size.y / scale / 0.00028);
+ $("#mapnik_image_width").text(mapWidth);
+ $("#mapnik_image_height").text(mapHeight);
+
+ const layer = map.getMapBaseLayerId();
+ const layerKeys = new Map([
+ ["mapnik", "standard"],
+ ["cyclemap", "cycle_map"],
+ ["transportmap", "transport_map"]
+ ]);
+
+ $("#mapnik_image_layer").text(layerKeys.has(layer) ? I18n.t(`javascripts.map.base.${layerKeys.get(layer)}`) : "");
+ $("#map_format").val(layer);
+
+ $("#map_zoom").val(map.getZoom());
+ $("#mapnik_lon").val(map.getCenter().lng);
+ $("#mapnik_lat").val(map.getCenter().lat);
+ $("#map_width").val(mapWidth);
+ $("#map_height").val(mapHeight);
+
+ 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();
+ }