added some phonegap code to see the map and see if device was offline