 			showMap()
 			renderFlags()
 			Obs.observe ->
-				if mapReady.get()
+				if mapReady()
 					# Corner 1
 					loc1 = L.latLng(Db.shared.get('game', 'bounds', 'one', 'lat'), Db.shared.get('game', 'bounds', 'one', 'lng'))
 					window.locationOne = L.marker(loc1, {draggable: true})

hideMap = ->
	log 'hidemap'
	mapElement = document.getElementById("OpenStreetMap")
	if mapReady.get()
		mapElement.style.visibility = 'hidden'
		mapElement.style.opacity = '0'
# Show the map
showMap = ->
	log 'showmap'
	mapElement = document.getElementById("OpenStreetMap")
	if mapReady.get()
		mapElement.style.visibility = 'visible'
		mapElement.style.opacity = '1'
					map.on('contextmenu', addMarkerListener)
				Obs.onClean ->
					log 'onClean() rectangle'
					if mapReady()
						map.removeLayer boundaryRectangle if boundaryRectangle?
						map.off('contextmenu', addMarkerListener)
	else
