Fix NullPointerException on map zooming reported by users. If some
elements are null, the Map is zoomed to a default value
Fix "java.lang.IllegalStateException: database not open" problem