Beginning work on getting a map working.
This commit is contained in:
parent
682f952b66
commit
5676ba2612
|
@ -54,7 +54,8 @@
|
||||||
[org.clojars.punkisdead/lein-cucumber "1.0.5"]
|
[org.clojars.punkisdead/lein-cucumber "1.0.5"]
|
||||||
[lein-cljsbuild "1.1.4"]
|
[lein-cljsbuild "1.1.4"]
|
||||||
[lein-uberwar "0.2.0"]
|
[lein-uberwar "0.2.0"]
|
||||||
[lein-bower "0.5.1"]]
|
[lein-bower "0.5.1"]
|
||||||
|
[lein-less "1.7.5"]]
|
||||||
|
|
||||||
:bower-dependencies [[bootstrap "2.3.1"]
|
:bower-dependencies [[bootstrap "2.3.1"]
|
||||||
[font-awesome "3.2.1"]
|
[font-awesome "3.2.1"]
|
||||||
|
@ -62,6 +63,8 @@
|
||||||
|
|
||||||
:cucumber-feature-paths ["test/clj/features"]
|
:cucumber-feature-paths ["test/clj/features"]
|
||||||
|
|
||||||
|
:hooks [leiningen.less]
|
||||||
|
|
||||||
:uberwar
|
:uberwar
|
||||||
{:handler youyesyet.handler/app
|
{:handler youyesyet.handler/app
|
||||||
:init youyesyet.handler/init
|
:init youyesyet.handler/init
|
||||||
|
@ -70,12 +73,14 @@
|
||||||
|
|
||||||
:clean-targets ^{:protect false}
|
:clean-targets ^{:protect false}
|
||||||
[:target-path [:cljsbuild :builds :app :compiler :output-dir] [:cljsbuild :builds :app :compiler :output-to]]
|
[:target-path [:cljsbuild :builds :app :compiler :output-dir] [:cljsbuild :builds :app :compiler :output-to]]
|
||||||
|
|
||||||
:figwheel
|
:figwheel
|
||||||
{:http-server-root "public"
|
{:http-server-root "public"
|
||||||
:nrepl-port 7002
|
:nrepl-port 7002
|
||||||
:css-dirs ["resources/public/css"]
|
:css-dirs ["resources/public/css"]
|
||||||
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
|
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
|
||||||
|
|
||||||
|
:externs ["externs.js"]
|
||||||
|
|
||||||
:profiles
|
:profiles
|
||||||
{:uberjar {:omit-source true
|
{:uberjar {:omit-source true
|
||||||
|
@ -86,7 +91,7 @@
|
||||||
{:source-paths ["src/cljc" "src/cljs" "env/prod/cljs"]
|
{:source-paths ["src/cljc" "src/cljs" "env/prod/cljs"]
|
||||||
:compiler
|
:compiler
|
||||||
{:output-to "target/cljsbuild/public/js/app.js"
|
{:output-to "target/cljsbuild/public/js/app.js"
|
||||||
:externs ["react/externs/react.js"]
|
:externs ["react/externs/react.js" "externs.js"]
|
||||||
:optimizations :advanced
|
:optimizations :advanced
|
||||||
:pretty-print false
|
:pretty-print false
|
||||||
:closure-warnings
|
:closure-warnings
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- scripts and styles -->
|
<!-- scripts and styles -->
|
||||||
{% style "/vendor/bootstrap/css/bootstrap.min.css" %}
|
{% style "/assets/bootstrap/css/bootstrap.min.css" %}
|
||||||
{% style "/vendor/font-awesome/css/font-awesome.min.css" %}
|
{% style "/assets/font-awesome/css/font-awesome.min.css" %}
|
||||||
{% style "/css/screen.css" %}
|
{% style "/css/screen.css" %}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -33,7 +33,17 @@
|
||||||
;;; See https://github.com/simon-brooke/youyesyet/blob/master/doc/specification/userspec.md#map-view
|
;;; See https://github.com/simon-brooke/youyesyet/blob/master/doc/specification/userspec.md#map-view
|
||||||
|
|
||||||
|
|
||||||
(defn panel
|
;;; Cribbed heavily from
|
||||||
"Generate the map panel."
|
;;; https://github.com/reagent-project/reagent-cookbook/tree/master/recipes/leaflet
|
||||||
|
;;; but using OSM data because we can't afford commercial, so also cribbed from
|
||||||
|
;;; https://switch2osm.org/using-tiles/getting-started-with-leaflet/
|
||||||
|
|
||||||
|
(defn map-div
|
||||||
|
"Generate the actual div containing the map."
|
||||||
[]
|
[]
|
||||||
[])
|
[:div#map {:style {:height "360px"}}])
|
||||||
|
|
||||||
|
(defn panel
|
||||||
|
"Generate the map panel"
|
||||||
|
[]
|
||||||
|
[div-map])
|
||||||
|
|
Loading…
Reference in a new issue