 
 	setMyCoord: (coord) ->
 		@coordMy = coord
+		@coordFocus = coord
 		map.setView coord, 14
 		markers.displayMe map, coordMy
 

		markers.displayAd map, ad for ad in ads

	moveTo: (coord) ->
		map.setView coord, 14



module.exports = () ->
	map = L.map('map').setView defaultCoord, 14

	layer = L.tileLayer 'https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png',
		maxZoom: 18
		id: 'examples.map-i875mjb7'
	.addTo map


	coordMy = defaultCoord
	coordFocus = coordMy
	ads = []

	map.on 'click', (e) ->
		coordFocus = e.latlng
		ad =
			location: coordFocus
			radius: 500
			text: 'Novy Ad'
		markers.displayAd map, ad, 'green'
