move map defition back to map.js, so other programs can control its
definition as well as its declaration
add max distance constant for camera (off by default)