Skip to content

Commit

Permalink
Clojure code update.
Browse files Browse the repository at this point in the history
  • Loading branch information
sritchie committed Nov 23, 2011
1 parent 47997db commit 5c48ab1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Expand Up @@ -37,16 +37,15 @@ The "Hello World" of Google Maps in ClojureScript looks like this:
```clojure
(def *map* nil)

(defn init-map [element]
(google.maps.Map. element
{"zoom" 8
"mapTypeId" google.maps.MapTypeId.ROADMAP
"center" (google.maps.LatLng. -34.397, 150.644)}))

(def my-opts
{"zoom" 8
"mapTypeId" google.maps.MapTypeId.ROADMAP
"center" (google.maps.LatLng. -34.397, 150.644)})

(defn map-load []
(set! *map* (init-map
(goog.dom/getElement "map_canvas"))))

(let [elem (goog.dom/getElement "map_canvas")]
(set! *map* (google.maps.Map. elem my-opts))))
(events/listen js/window "load"
map-load)
```
Expand Down

0 comments on commit 5c48ab1

Please sign in to comment.