drawBox(bounds);
validateControls();
+ mapnikSizeChanged();
}
$("maxlat").onchange = boundsChanged;
$("minlat").value = Math.round(bounds.bottom * decimals) / decimals;
$("maxlon").value = Math.round(bounds.right * decimals) / decimals;
$("maxlat").value = Math.round(bounds.top * decimals) / decimals;
+
+ mapnikSizeChanged();
}
function clearBox() {
} else {
$("format_osm").disabled = false;
}
-
- var max_zoom = maxOsmarenderZoom();
+
var max_scale = maxMapnikScale();
- $("mapnik_max_scale").innerHTML = roundScale(max_scale);
+ if ($("format_mapnik").checked && $("mapnik_scale").value < max_scale) {
+ $("export_commit").disabled = true;
+ } else {
+ $("export_commit").disabled = false;
+ }
- mapnikScaleChanged();
+ $("mapnik_max_scale").innerHTML = roundScale(max_scale);
+
+ var max_zoom = maxOsmarenderZoom();
for (var o = 0; o < $("osmarender_zoom").options.length; o++) {
var option = $("osmarender_zoom").options[o];
if ($("format_mapnik").checked) {
$("mapnik_scale").value = roundScale(map.getScale());
$("export_mapnik").style.display = "inline";
-
- mapnikScaleChanged();
} else {
$("export_mapnik").style.display = "none";
}
} else {
$("export_osmarender").style.display = "none";
}
+
+ validateControls();
}
$("format_osm").onclick = formatChanged;
function mapnikScaleChanged() {
mapnikSizeChanged();
-
- if ($("mapnik_scale").value < maxMapnikScale()) {
- $("export_commit").disabled = true;
- } else {
- $("export_commit").disabled = false;
- }
+ validateControls();
}
$("mapnik_scale").onchange = mapnikScaleChanged;