#lang planet dyoo/whalesong
(require (planet dyoo/whalesong/web-world)
"maps.rkt")
(initialize-google-maps-api! "AIzaSyCRKQNI_nbyyN1286cssEy3taKj5IZcHN8" #f)
(define-values (dom gmap)
(make-dom-and-map 41.82706261971936 -71.39962630844116))
(define on-map-click (make-on-map-click gmap))
(xexp->dom '(h1 "Google Maps demonstration"))
(big-bang "???"
(initial-view
(xexp->dom
`(div (p (@ (id "where"))
"<<fill me in>>")
(hr)
,dom
(hr)
(p "Instructions: click the map. The "
"world program will follow the map clicks."))))
(to-draw (lambda (w v)
(update-view-text (view-focus v "where")
(format "~a" w))))
(on-map-click (lambda (w v lat lng)
(list lat lng))))