Woohoo! it works
Problem was a missing CSS file
|
@ -14,6 +14,7 @@ You will need [Leiningen][1] 2.0 or above installed.
|
|||
|
||||
To start a web server for the application, run:
|
||||
|
||||
lein npm install
|
||||
lein run
|
||||
|
||||
## License
|
||||
|
|
13
package-lock.json
generated
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "geocsv",
|
||||
"version": "0.1.0-SNAPSHOT",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"leaflet": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.3.1.tgz",
|
||||
"integrity": "sha512-adQOIzh+bfdridLM1xIgJ9VnJbAUY3wqs/ueF+ITla+PLQ1z47USdBKUf+iD9FuUA8RtlT6j6hZBfZoA6mW+XQ=="
|
||||
}
|
||||
}
|
||||
}
|
|
@ -39,6 +39,7 @@
|
|||
[selmer "1.12.18"]]
|
||||
|
||||
:min-lein-version "2.0.0"
|
||||
:npm {:dependencies [[leaflet "1.3.1"]]}
|
||||
|
||||
:source-paths ["src/clj" "src/cljs" "src/cljc"]
|
||||
:test-paths ["test/clj"]
|
||||
|
@ -46,7 +47,11 @@
|
|||
:target-path "target/%s/"
|
||||
:main ^:skip-aot geocsv.core
|
||||
|
||||
:plugins [[lein-cljsbuild "1.1.7"]]
|
||||
:plugins [[lein-cljsbuild "1.1.7"]
|
||||
[lein-codox "0.10.7"]
|
||||
[lein-npm "0.6.2"]
|
||||
[lein-release "1.0.5"]]
|
||||
|
||||
:clean-targets ^{:protect false}
|
||||
[:target-path [:cljsbuild :builds :app :compiler :output-dir] [:cljsbuild :builds :app :compiler :output-to]]
|
||||
:figwheel
|
||||
|
|
|
@ -36,6 +36,12 @@
|
|||
<script type="text/javascript">
|
||||
var csrfToken = "{{csrf-token}}";
|
||||
</script>
|
||||
<!-- scripts and styles -->
|
||||
<!-- ATTENTION \/ -->
|
||||
<!-- ATTENTION /\ -->
|
||||
<!-- Leaflet -->
|
||||
<link rel="stylesheet" href="js/lib/node_modules/leaflet/dist/leaflet.css" />
|
||||
{% script "js/lib/node_modules/leaflet/dist/leaflet.js" %}
|
||||
{% script "/js/app.js" %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
BIN
resources/public/img/credits/clojure-icon.gif
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/public/img/credits/github-logo-transparent.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
resources/public/img/credits/gnu.small.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/public/img/credits/luminus-logo.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
resources/public/img/map-pins/Planning-authority-pin.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
182
resources/public/img/map-pins/Planning-authority-pin.svg
Normal file
|
@ -0,0 +1,182 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<!-- Icon created for SceneHere (c) 2010 Simon Brooke $Revision: 1.2 $ -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240.5"
|
||||
height="317.00851"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="Planning-authority-pin.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
inkscape:export-filename="/home/simon/workspace/youyesyet/resources/public/img/map-pins/basic_map_pin.png"
|
||||
inkscape:export-xdpi="11.98"
|
||||
inkscape:export-ydpi="11.98"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient3155">
|
||||
<stop
|
||||
style="stop-color:#ffff67;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3157" />
|
||||
<stop
|
||||
id="stop3163"
|
||||
offset="1"
|
||||
style="stop-color:#ffd200;stop-opacity:0.74789917;" />
|
||||
<stop
|
||||
style="stop-color:#ffff67;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3159" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 526.18109 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||
id="perspective10" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-144.01361"
|
||||
inkscape:cy="86.04423"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2383"
|
||||
originx="-384.75"
|
||||
originy="-548.24148" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Basic pin for SceneHere</dc:title>
|
||||
<dc:date>20100801</dc:date>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>Copyright (c) 2010 Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:identifier>basic_map_pin.svg</dc:identifier>
|
||||
<dc:description>
|
||||
Basic default map pin
|
||||
$Revision: 1.2 $
|
||||
</dc:description>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-384.75,-187.11218)">
|
||||
<path
|
||||
style="fill:#dddddc;fill-opacity:0.70403586;fill-rule:evenodd;stroke:#4f4f4f;stroke-width:10.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 430,192.36218 150,0 c 20,1e-5 40,20.00001 40,40 l 0,150 c 0,20.00001 -20,40.00001 -40,40 l -40,0 c -20,0 -20,46.66667 -30,70 -13.33333,-23.33333 -20,-70 -40,-70 l -40,0 c -20,10e-6 -40,-19.99999 -40,-40 l 0,-150 c 0,-19.99999 20,-39.99999 40,-40 z"
|
||||
id="path2387"
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g986" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g988" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g990" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g992" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g994" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g996" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g998" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1000" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1002" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1004" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1006" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1008" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1010" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1012" />
|
||||
<g
|
||||
transform="translate(354.75,65.100704)"
|
||||
id="g1014" />
|
||||
<g
|
||||
transform="matrix(0.47531389,0,0,0.47531389,410.17013,212.25752)"
|
||||
id="g984">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 13.076,135.976 c 0.004,0.166 0.01,0.332 0.025,0.499 0.009,0.098 0.023,0.194 0.036,0.292 0.02,0.144 0.038,0.288 0.066,0.431 0.023,0.12 0.052,0.238 0.081,0.356 0.028,0.116 0.055,0.232 0.089,0.348 0.042,0.143 0.092,0.281 0.142,0.42 0.032,0.09 0.063,0.18 0.099,0.269 0.064,0.159 0.137,0.313 0.211,0.466 0.026,0.055 0.047,0.111 0.075,0.165 0.007,0.013 0.016,0.024 0.023,0.037 0.148,0.283 0.313,0.555 0.496,0.815 0.044,0.063 0.092,0.123 0.138,0.184 0.143,0.191 0.293,0.375 0.453,0.552 0.061,0.068 0.121,0.138 0.185,0.203 0.203,0.208 0.416,0.406 0.642,0.589 0.059,0.048 0.121,0.09 0.182,0.136 0.188,0.144 0.382,0.278 0.583,0.403 0.071,0.045 0.144,0.09 0.216,0.132 0.525,0.304 1.089,0.546 1.684,0.716 0.066,0.019 0.131,0.034 0.195,0.05 0.233,0.06 0.471,0.108 0.712,0.146 0.083,0.013 0.164,0.028 0.247,0.038 0.279,0.034 0.563,0.056 0.851,0.058 0.022,0.001 0.045,0.005 0.067,0.005 0.008,0 0.017,-0.001 0.025,-0.001 h 7.221 v 17.745 c 0,4.142 3.357,7.5 7.5,7.5 h 9.326 v 132 H 35.32 c -4.143,0 -7.5,3.357 -7.5,7.5 0,4.142 3.357,7.5 7.5,7.5 h 16.826 28.311 59.89 28.311 59.889 28.311 59.889 28.311 18.646 c 4.143,0 7.5,-3.358 7.5,-7.5 0,-4.143 -3.357,-7.5 -7.5,-7.5 h -11.146 v -132 h 12.954 c 0.039,0 0.078,-0.006 0.117,-0.006 0.039,0.001 0.078,0.006 0.117,0.006 4.143,0 7.5,-3.358 7.5,-7.5 v -17.745 h 6.895 c 0.04,0 0.079,-0.005 0.119,-0.006 0.043,0.001 0.086,0.008 0.128,0.008 2.714,0 5.334,-1.479 6.667,-4.056 1.903,-3.679 0.464,-8.204 -3.215,-10.107 L 204.912,36.568 c -1.324,-0.685 -2.756,-0.93 -4.137,-0.801 -1.377,-0.128 -2.804,0.116 -4.122,0.796 L 17.13,129.119 c -0.016,0.008 -0.029,0.018 -0.045,0.026 -0.153,0.081 -0.302,0.17 -0.448,0.261 -0.069,0.043 -0.142,0.082 -0.209,0.127 -0.116,0.077 -0.228,0.162 -0.34,0.246 -0.09,0.067 -0.183,0.131 -0.269,0.201 -0.073,0.06 -0.141,0.126 -0.212,0.188 -0.113,0.101 -0.229,0.199 -0.336,0.306 -0.039,0.039 -0.074,0.081 -0.112,0.122 -0.13,0.135 -0.258,0.27 -0.376,0.413 -0.036,0.044 -0.066,0.091 -0.102,0.136 -0.113,0.143 -0.225,0.286 -0.326,0.435 -0.087,0.128 -0.163,0.263 -0.242,0.396 -0.041,0.07 -0.088,0.138 -0.127,0.21 -0.112,0.204 -0.214,0.415 -0.307,0.63 -0.002,0.004 -0.004,0.008 -0.006,0.012 -0.086,0.201 -0.161,0.407 -0.229,0.616 -0.007,0.02 -0.017,0.041 -0.023,0.062 -0.052,0.163 -0.093,0.33 -0.133,0.497 -0.019,0.073 -0.041,0.145 -0.057,0.218 -0.025,0.122 -0.042,0.247 -0.063,0.372 -0.02,0.124 -0.043,0.249 -0.057,0.374 -0.01,0.091 -0.013,0.184 -0.02,0.276 -0.012,0.162 -0.023,0.323 -0.024,0.486 0,0.019 -0.003,0.038 -0.003,0.057 0.002,0.064 0.01,0.126 0.012,0.19 z m 187.697,-84.661 148.796,76.97 H 51.479 Z M 132.845,168.53 v 132 h -44.89 v -132 z m 88.199,0 v 132 h -44.889 v -132 z m -161.399,132 V 169.619 H 72.956 V 300.53 Z m 88.2,0 V 169.619 h 13.311 V 300.53 Z m 88.199,0 V 169.619 h 13.311 V 300.53 Z m 88.2,0 V 169.619 h 13.311 V 300.53 Z m -15,0 h -44.889 v -132 h 44.889 z m 49,-147 H 42.818 v -10.245 h 315.426 z"
|
||||
id="path978" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 21.655,324.407 c -4.143,0 -7.5,3.358 -7.5,7.5 0,4.142 3.357,7.5 7.5,7.5 h 355.709 c 4.143,0 7.5,-3.358 7.5,-7.5 0,-4.142 -3.357,-7.5 -7.5,-7.5 z"
|
||||
id="path980" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 391.52,348.285 H 7.5 c -4.142,0 -7.5,3.358 -7.5,7.5 0,4.142 3.358,7.5 7.5,7.5 h 384.02 c 4.143,0 7.5,-3.358 7.5,-7.5 0,-4.142 -3.358,-7.5 -7.5,-7.5 z"
|
||||
id="path982" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.5 KiB |
BIN
resources/public/img/map-pins/basic_map_pin.png
Normal file
After Width: | Height: | Size: 333 B |
149
resources/public/img/map-pins/basic_map_pin.svg
Normal file
|
@ -0,0 +1,149 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<!-- Icon created for SceneHere (c) 2010 Simon Brooke $Revision: 1.2 $ -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240.5"
|
||||
height="317.00851"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="basic_map_pin.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
inkscape:export-filename="/home/simon/workspace/youyesyet/resources/public/img/map-pins/basic_map_pin.png"
|
||||
inkscape:export-xdpi="11.98"
|
||||
inkscape:export-ydpi="11.98"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient3155">
|
||||
<stop
|
||||
style="stop-color:#ffff67;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3157" />
|
||||
<stop
|
||||
id="stop3163"
|
||||
offset="1"
|
||||
style="stop-color:#ffd200;stop-opacity:0.74789917;" />
|
||||
<stop
|
||||
style="stop-color:#ffff67;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3159" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 526.18109 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||
id="perspective10" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3155"
|
||||
id="radialGradient3161"
|
||||
cx="77.050865"
|
||||
cy="429.06537"
|
||||
fx="77.050865"
|
||||
fy="429.06537"
|
||||
r="155.491"
|
||||
gradientTransform="matrix(1,0,0,1.0302596,0,-12.983332)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-144.01361"
|
||||
inkscape:cy="86.04423"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1031"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2383"
|
||||
originx="-384.75"
|
||||
originy="-548.24148" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Basic pin for SceneHere</dc:title>
|
||||
<dc:date>20100801</dc:date>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>Copyright (c) 2010 Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:identifier>basic_map_pin.svg</dc:identifier>
|
||||
<dc:description>
|
||||
Basic default map pin
|
||||
$Revision: 1.2 $
|
||||
</dc:description>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-384.75,-187.11218)">
|
||||
<path
|
||||
style="fill:#dddddc;fill-opacity:0.70403586;fill-rule:evenodd;stroke:#4f4f4f;stroke-width:10.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 430,192.36218 150,0 c 20,1e-5 40,20.00001 40,40 l 0,150 c 0,20.00001 -20,40.00001 -40,40 l -40,0 c -20,0 -20,46.66667 -30,70 -13.33333,-23.33333 -20,-70 -40,-70 l -40,0 c -20,10e-6 -40,-19.99999 -40,-40 l 0,-150 c 0,-19.99999 20,-39.99999 40,-40 z"
|
||||
id="path2387"
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="fill:url(#radialGradient3161);fill-opacity:1;stroke:#f4f3f3;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3153"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="90"
|
||||
sodipodi:cy="432.36218"
|
||||
sodipodi:r1="168.77766"
|
||||
sodipodi:r2="56.68261"
|
||||
sodipodi:arg1="0.69157251"
|
||||
sodipodi:arg2="1.2771074"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 220,540 106.40877,486.61778 27.802561,589.26144 43.470446,464.73376 -78.440131,421.69344 44.83438,398.11331 48.095713,268.86928 108.61567,378.82364 232.54186,341.98675 146.67073,433.52241 Z"
|
||||
transform="matrix(0.6026863,0.1441863,-0.1441863,0.6026863,509.16002,39.357112)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/public/img/map-pins/shadow_pin.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
122
resources/public/img/map-pins/shadow_pin.svg
Normal file
|
@ -0,0 +1,122 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<!-- Icon created for SceneHere (c) 2010 Simon Brooke $Revision: 1.2 $ -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="393.64932"
|
||||
height="234.32486"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="shadow_pin.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
inkscape:export-filename="/home/simon/workspace/scenehere/src/war/images/icons/shadow_pin.png"
|
||||
inkscape:export-xdpi="11.98"
|
||||
inkscape:export-ydpi="11.98"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 526.18109 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||
id="perspective10" />
|
||||
<inkscape:perspective
|
||||
id="perspective2470"
|
||||
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 526.18109 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter3286"
|
||||
x="-0.097085193"
|
||||
width="1.1941704"
|
||||
y="-0.18284883"
|
||||
height="1.3656976">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="13.632102"
|
||||
id="feGaussianBlur3288" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="139.64551"
|
||||
inkscape:cy="107.26322"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="949"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-maximized="0">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2383"
|
||||
originx="-309.93331"
|
||||
originy="-527.02249" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Shadow pin for SceneHere</dc:title>
|
||||
<dc:date>20100801</dc:date>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>Copyright (c) 2010 Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:identifier>shadow_pin.svg</dc:identifier>
|
||||
<dc:description>$Revision: 1.2 $</dc:description>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-309.93331,-291.01483)">
|
||||
<path
|
||||
style="opacity:0.66115699;fill:#373434;fill-opacity:0.52017942;fill-rule:evenodd;stroke:#4f4f4f;stroke-width:7.35060501;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3286)"
|
||||
d="m 529.41369,322.3882 128.012,0.5673 c 17.06824,0.0757 19.06491,11.56969 3.99332,22.98808 l -113.037,85.63797 c -15.0716,11.4184 -47.21146,22.76115 -64.27972,22.68551 l -34.13654,-0.15128 c -17.06826,-0.0756 -52.23533,26.56729 -78.35299,39.85092 6.20469,-13.37188 35.68233,-40.04002 18.61406,-40.11566 l -34.13653,-0.15128 c -17.06826,-0.0756 -19.06494,-11.56967 -3.99332,-22.98807 l 113.03699,-85.63798 c 15.07158,-11.41838 47.21147,-22.76114 64.27973,-22.68551 z"
|
||||
id="path2387"
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
BIN
resources/public/img/map-pins/unknown-pin.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
149
resources/public/img/map-pins/unknown-pin.svg
Normal file
|
@ -0,0 +1,149 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<!-- Icon created for SceneHere (c) 2010 Simon Brooke $Revision: 1.2 $ -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="240.5"
|
||||
height="317.00851"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="basic_map_pin.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
inkscape:export-filename="/home/simon/workspace/scenehere/src/war/images/icons/basic_map_pin.png"
|
||||
inkscape:export-xdpi="11.98"
|
||||
inkscape:export-ydpi="11.98"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
id="linearGradient3155">
|
||||
<stop
|
||||
style="stop-color:#ffff67;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3157" />
|
||||
<stop
|
||||
id="stop3163"
|
||||
offset="1"
|
||||
style="stop-color:#ffd200;stop-opacity:0.74789917;" />
|
||||
<stop
|
||||
style="stop-color:#ffff67;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3159" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 526.18109 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||
id="perspective10" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3155"
|
||||
id="radialGradient3161"
|
||||
cx="77.050865"
|
||||
cy="429.06537"
|
||||
fx="77.050865"
|
||||
fy="429.06537"
|
||||
r="155.491"
|
||||
gradientTransform="matrix(1,0,0,1.0302596,0,-12.983332)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
gridtolerance="10000"
|
||||
guidetolerance="10"
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98994949"
|
||||
inkscape:cx="-144.01361"
|
||||
inkscape:cy="86.04423"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1031"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2383"
|
||||
originx="-384.75"
|
||||
originy="-548.24148" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Basic pin for SceneHere</dc:title>
|
||||
<dc:date>20100801</dc:date>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>Copyright (c) 2010 Simon Brooke</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:identifier>basic_map_pin.svg</dc:identifier>
|
||||
<dc:description>
|
||||
Basic default map pin
|
||||
$Revision: 1.2 $
|
||||
</dc:description>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-384.75,-187.11218)">
|
||||
<path
|
||||
style="fill:#dddddc;fill-opacity:0.70403586;fill-rule:evenodd;stroke:#4f4f4f;stroke-width:10.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 430,192.36218 150,0 c 20,1e-5 40,20.00001 40,40 l 0,150 c 0,20.00001 -20,40.00001 -40,40 l -40,0 c -20,0 -20,46.66667 -30,70 -13.33333,-23.33333 -20,-70 -40,-70 l -40,0 c -20,10e-6 -40,-19.99999 -40,-40 l 0,-150 c 0,-19.99999 20,-39.99999 40,-40 z"
|
||||
id="path2387"
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="fill:url(#radialGradient3161);fill-opacity:1;stroke:#f4f3f3;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3153"
|
||||
sodipodi:sides="5"
|
||||
sodipodi:cx="90"
|
||||
sodipodi:cy="432.36218"
|
||||
sodipodi:r1="168.77766"
|
||||
sodipodi:r2="56.68261"
|
||||
sodipodi:arg1="0.69157251"
|
||||
sodipodi:arg2="1.2771074"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 220,540 106.40877,486.61778 27.802561,589.26144 43.470446,464.73376 -78.440131,421.69344 44.83438,398.11331 48.095713,268.86928 108.61567,378.82364 232.54186,341.98675 146.67073,433.52241 Z"
|
||||
transform="matrix(0.6026863,0.1441863,-0.1441863,0.6026863,509.16002,39.357112)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.1 KiB |
BIN
resources/public/img/map-pins/unknown-pin.xcf
Normal file
BIN
resources/public/img/threelines.png
Normal file
After Width: | Height: | Size: 266 B |
BIN
resources/public/img/threelines.xcf
Normal file
|
@ -6,9 +6,11 @@
|
|||
[re-frame.core :as rf]))
|
||||
|
||||
(defn local-uri? [{:keys [uri]}]
|
||||
(not (re-find #"^\w+?://" uri)))
|
||||
(js/console.log (str "local-uri?: received `" (str uri) "` (type " (type uri) ") as uri"))
|
||||
(not (re-find #"^\w+?://" (str uri))))
|
||||
|
||||
(defn default-headers [request]
|
||||
(js/console.log (str "default-headers: received `" request "` as request"))
|
||||
(if (local-uri? request)
|
||||
(-> request
|
||||
(update :headers #(merge {"x-csrf-token" js/csrfToken} %)))
|
||||
|
|
|
@ -162,6 +162,11 @@
|
|||
(fn [route _]
|
||||
(-> route :data :name)))
|
||||
|
||||
(rf/reg-sub
|
||||
:view
|
||||
(fn [db _]
|
||||
(:view db)))
|
||||
|
||||
(rf/reg-sub
|
||||
:zoom
|
||||
(fn [db _]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
(:require [ajax.core :refer [GET]]
|
||||
[ajax.json :refer [json-request-format json-response-format]]
|
||||
[cljs.reader :refer [read-string]]
|
||||
[clojure.string :refer [capitalize lower-case]]
|
||||
[clojure.string :as s]
|
||||
[cemerick.url :refer (url url-encode)]
|
||||
[day8.re-frame.http-fx]
|
||||
[re-frame.core :refer [dispatch reg-event-db reg-event-fx subscribe]]))
|
||||
|
@ -51,8 +51,7 @@
|
|||
(do
|
||||
(dispatch [:set-latitude lat])
|
||||
(dispatch [:set-longitude lng])
|
||||
(.panTo view (.latLng js/L lat lng))
|
||||
(locality lat lng))
|
||||
(.panTo view (.latLng js/L lat lng)))
|
||||
(do
|
||||
(js/console.log
|
||||
(if view
|
||||
|
@ -80,12 +79,45 @@
|
|||
(s/replace (s/lower-case (str (:category record))) #"[^a-z0-9]" "-")) "-pin")
|
||||
"unknown-pin"))
|
||||
|
||||
(defn popup-content
|
||||
"Appropriate content for the popup of a map pin for this `record`."
|
||||
[record]
|
||||
(str
|
||||
"<h5>"
|
||||
(:name record)
|
||||
"</h5><dl>"
|
||||
(apply
|
||||
str
|
||||
(map #(str "<dt>" (name %) "</dt><dd>" (record %) "</dd>") (keys record)))
|
||||
"</dl>"))
|
||||
|
||||
(defn popup-table-content
|
||||
"Appropriate content for the popup of a map pin for this `record`, as a
|
||||
table. Obviously this is semantically wrong, but for styling reasons it's
|
||||
worth trying."
|
||||
[record]
|
||||
(str
|
||||
"<h5>"
|
||||
(:name record)
|
||||
"</h5><table>"
|
||||
(apply
|
||||
str
|
||||
(map #(str "<tr><th>" (name %) "</th><td>" (record %) "</td></tr>") (keys record)))
|
||||
"</table>"))
|
||||
|
||||
(defn add-map-pin
|
||||
"Add an appropriate map-pin for this `record` in this map `view`."
|
||||
"Add an appropriate map-pin for this `record` in this map `view`, if it
|
||||
has a valid `:latitude` and `:longitude`."
|
||||
[record index view]
|
||||
(let [lat (:latitude record)
|
||||
lng (:longitude record)
|
||||
pin (.icon js/L
|
||||
lng (:longitude record)]
|
||||
(if
|
||||
(and
|
||||
(number? lat)
|
||||
(number? lng)
|
||||
(not (zero? lat))
|
||||
(not (zero? lng)))
|
||||
(let [pin (.icon js/L
|
||||
(clj->js
|
||||
{:iconAnchor [16 41]
|
||||
:iconSize [32 42]
|
||||
|
@ -98,11 +130,14 @@
|
|||
(.latLng js/L lat lng)
|
||||
(clj->js {:icon pin
|
||||
:title (:name record)}))]
|
||||
(.on
|
||||
(.bindPopup marker (popup-table-content record))
|
||||
(.addTo marker view)
|
||||
"click"
|
||||
(fn [_] (map-pin-click-handler index)))
|
||||
marker))
|
||||
;; (.on
|
||||
;; (.addTo marker view)
|
||||
;; "click"
|
||||
;; (fn [_] (map-pin-click-handler index)))
|
||||
(js/console.log (str "Added `"(:name record)"` in at " lat ", " lng))
|
||||
marker))))
|
||||
|
||||
(defn map-remove-pins
|
||||
"Remove all pins from this map `view`. Side-effecty; liable to be
|
||||
|
@ -120,13 +155,12 @@
|
|||
"Refresh the map pins on the current map. Side-effecty; liable to be
|
||||
problematic."
|
||||
[db]
|
||||
(let [view (map-remove-pins @(re-frame/subscribe [:view]))
|
||||
(let [view (map-remove-pins @(subscribe [:view]))
|
||||
data (:data db)]
|
||||
(if
|
||||
view
|
||||
(do
|
||||
(js/console.log (str "Adding " (count data) " pins"))
|
||||
(doall (map #(add-map-pin %1 %2 view) data (range))))
|
||||
(let [added (remove nil? (map #(add-map-pin %1 %2 view) data (range)))]
|
||||
(js/console.log (str "Adding " (count added) " pins")))
|
||||
(js/console.log "View is not yet ready"))
|
||||
db))
|
||||
|
||||
|
|
|
@ -70,12 +70,12 @@
|
|||
:maxZoom 18}))
|
||||
view)
|
||||
(dispatch-sync [:set-view view])
|
||||
(.on view "moveend"
|
||||
(fn [_] (let [c (.getCenter view)]
|
||||
(js/console.log (str "Moving centre to " c))
|
||||
(dispatch-sync [:set-latitude (.-lat c)])
|
||||
(dispatch-sync [:set-longitude (.-lng c)])
|
||||
(dispatch [:fetch-data]))))
|
||||
;; (.on view "moveend"
|
||||
;; (fn [_] (let [c (.getCenter view)]
|
||||
;; (js/console.log (str "Moving centre to " c))
|
||||
;; (dispatch-sync [:set-latitude (.-lat c)])
|
||||
;; (dispatch-sync [:set-longitude (.-lng c)])
|
||||
;; (dispatch [:fetch-data]))))
|
||||
;; (refresh-map-pins)
|
||||
view))
|
||||
|
||||
|
@ -91,7 +91,7 @@
|
|||
(defn map-render
|
||||
"Render the actual div containing the map."
|
||||
[]
|
||||
[:div#map {:style {:height "500px"}}])
|
||||
[:div#map {:style {:height "500px" :width "800px"}}])
|
||||
|
||||
(defn panel
|
||||
"A reagent class for the map object."
|
||||
|
|