Roman, I apologize, I never thanked you for this. I finally got around to
trying this out last night and put together this small project for anyone
else interested:
https://github.com/sritchie/contour
I'm using Noir server-side. This is just a demo now, but we'll see what
comes of it. Here's
Hi,
Just to add another way of doing the same thing, I used the following
when I was using Google Maps in Clojurescript:
(def map-opts (extend-object! (js-obj) {zoom 4
center center-of-us
mapTypeId types/ROADMAP
Hey all,
I started playing with Clojurescript tonight, and couldn't quite figure out
how to access an external library -- specifically the Google Maps API --
from within a clojurescript project. I can download maps.js, but how do I go
about including it in a project?
Thanks,
--
Sam Ritchie,
Hi Sam,
this is how I use Google Maps with Clojurescript. In the html
page I load Google's Loader library, the Google Closure base.js
file and the deps.js file which is the one cljsc spit out.
(defhtml javascripts []
(html
(include-js (str https://www.google.com/jsapi?key=; (google-api-key
Forgot to mention my init-map fn:
(defn init-map [element]
(let [options (h/clj-js {:zoom 1 :mapTypeId
google.maps.MapTypeId.ROADMAP})
parent-size (style/getSize (. element parentNode))
element-size (style/getSize element)
map (doto (google.maps.Map. element options)