 React = require 'react'
 {div, p, a, button, span, input, label, h1} = React.DOM
 L = global.L or require('leaflet')
+backend = require './backend.coffee'
 # require 'leaflet/dist/leaflet.css'
 L.Icon.Default.imagePath = '/styles/images'
 
 
 
 map = L.map 'map',
-    center: [38, 0]
-    zoom: 3
+    center: [13, -37]
+    zoom: 2
     doubleClickZoom: false
 
-# coffeelint: disable=max_line_length
 OpenStreetMap_France =
   L.tileLayer('http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
   maxZoom: 19
-  attribution: '&copy; Openstreetmap France | &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>')
-# coffeelint: enable=max_line_length
-
+  attribution:
+      '&copy;
+      Openstreetmap France | &copy;
+      <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>')
 
 Layers = OpenStreetMap_France
 .addTo map
 
-markerPosition = [42, 0]
-popupContent = 'Are you a Mapper?'
 
-MarkerDefault = L.marker markerPosition
-.addTo map
-.bindPopup popupContent
-.openPopup map
 
+configIcon = L.icon(
+    iconUrl: '/styles/images/homemarker.png'
+    shadowUrl: '/styles/images/marker-shadow.png'
+    iconSize: [25, 41]
+    iconAnchor: [12, 41]
+    popupAnchor: [1, -34]
+    shadowSize: [41, 41])
 
 redIcon = L.icon(
     iconUrl: '/styles/images/marker2-icon.png'

    shadowSize: [41, 41])


# Module PeaceMarker start
map.on 'dblclick', (event) ->

    marker = new L.marker event.latlng,

        marker.bindPopup(popupContent).openPopup()
        map.panTo(new L.LatLng(position.lat, position.lng))
        map.addLayer(marker)
# End Module PeaceMarker



# React wrapper for our leaflet widget.
module.exports =
