Last active
February 1, 2016 21:33
-
-
Save bensu/edd68d11102c2197a729 to your computer and use it in GitHub Desktop.
google maps config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns component.maps | |
(:require [google.maps]) | |
(defn map-opts [] | |
"Default initial map options." | |
{:zoom 3 | |
:mapTypeId google.maps.MapTypeId.ROADMAP | |
:center (google.maps.LatLng. 59, 18) | |
:mapTypeControl false | |
:styles [{:stylers [{:visibility "on"}]}]}) | |
(google.maps.Map. map-node map-opts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:dependencies [[cljsjs/google-maps "3.18-1"]] | |
:compiler {:output-to "resources/public/js/cljs/app.js" | |
:foreign-libs [{:file ~(str "https://maps.googleapis.com/maps/api/js?key=" | |
(System/getenv "GOOGLE_MAPS_KEY") | |
"&libraries=places") | |
:provides ["google.maps"]}] | |
:optimizations :none} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a bad idea: you fetch the google maps file at compile time and they come with another key which then expires then your compiled artifacts suddenly start failing.
Add
<script src=https:
the usual way.