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}))

The strange thing (to me) is that extend-object! is defined with defn-
in cljs.core, but it works in other namespaces.  However, it is not used
anywhere else in cljs.core, so I'm wondering if it should be made public
or just gotten rid of.

Cheers,
Chris

On Tue, 22 Nov 2011 14:07:59 -0500, Sam Ritchie <sritchi...@gmail.com> wrote:
> 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 what it looks like in the wild:
> 
> http://contour.herokuapp.com/.
> 
> On Sun, Oct 9, 2011 at 6:27 AM, r0man <roman.sche...@burningswell.com>wrote:
> 
> > 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)
> >               (. (setCenter (to-lat-lng *location*)))
> >               (. (setZoom 10)))]
> >     (style/setSize element (. element-size width) (. parent-size height))
> >     (events/listen
> >      viewport-monitor
> >      events/EventType.RESIZE
> >      (fn [event] (google.maps.event/trigger map "resize")))))
> >
> >
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> >
> 
> 
> 
> -- 
> Sam Ritchie, Twitter Inc
> 703.662.1337
> @sritchie09
> 
> (Too brief? Here's why! http://emailcharter.org)
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=enNon-text part: text/html

-- 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to