added the OpenStreetMap.js file to the list of JS that's included to make all maps work. If you don't have OSM map layer selected thyen this file is left out and the JS errors out. I also used the my_map.getLayersByName() method to figure out if a layer already existed and not re-add it if it's already there. This is all in reference to issue #1