OK, this is fucking impressive if I say so myself.
This commit is contained in:
parent
64fd9ffb5b
commit
d001338a49
8 changed files with 154 additions and 57 deletions
|
|
@ -1,10 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>GeoCSV Lite</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||
<link rel="icon" href="https://clojurescript.org/images/cljs-logo-icon-32.png">
|
||||
<link rel="icon" href="favicon.ico">
|
||||
<!-- if you prefer loading libraries from standard hosts, un comment this and
|
||||
comment out the local source -->
|
||||
<!-- link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
|
||||
|
|
@ -13,11 +14,50 @@
|
|||
<link rel="stylesheet" href="vendor/node_modules/leaflet/dist/leaflet.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>GeoCSV Lite</h1>
|
||||
<div id="app">
|
||||
<h2>Figwheel template</h2>
|
||||
<p id="message">Checkout your developer console.</p>
|
||||
<div id="map" style="height: 600px; width: 80%; margin-left: 10%; border: thin solid gray;"></div>
|
||||
<p id="message"></p>
|
||||
<p id="error"></p>
|
||||
<div id="map" style="height: 600px; width: 80%; border: thin solid gray;"></div>
|
||||
</div>
|
||||
<div id="doc">
|
||||
<p>
|
||||
Use this page as a crib for how to use <b>GeoCSV Lite</b> in your projects. In order
|
||||
for it to work, you need:
|
||||
<ol>
|
||||
<li>Javascript dependencies:
|
||||
<ol>
|
||||
<li><a href="">Leaflet</a> (provides mapping);</li>
|
||||
<li><a href="">PapaParse</a> (provides CSV parsing);</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>
|
||||
A line which includes the geocsv_lite library, which should be
|
||||
<em>after</em> those including the dependencies: <br/>
|
||||
<samp><script src="js/compiled/geocsv_lite.js"
|
||||
type="text/javascript"></script></samp>
|
||||
</li>
|
||||
<li>One (or more) <code>div</code> elements to contain your maps. It
|
||||
is a requirement of Leaflet that these must have a fixed pixel width.
|
||||
Each must have a distinct <code>id</code>;</li>
|
||||
<li>
|
||||
For each <code>div</code> which you wish to contain a map view,
|
||||
an invocation of the function
|
||||
<code>geocsv_lite.core.initialise_map_element(id, data-source)</code>: <br/>
|
||||
<samp><script>geocsv_lite.core.initialise_map_element("map", "/data/data.csv");</script></samp>
|
||||
</li>
|
||||
</ol>
|
||||
</p>
|
||||
</div>
|
||||
<footer>
|
||||
<div id="credits">
|
||||
<div>
|
||||
<img height="16" width="16" alt="Clojure" src="img/credits/clojure-icon.gif"/> Powered by <a href="http://clojure.org">Clojure</a> ||
|
||||
<img height="16" width="16" alt="GitHub" src="img/credits/github-logo-transparent.png"/>Find me/fork me on <a href="https://github.com/simon-brooke/geocsv-lite">Github</a> ||
|
||||
<img height="16" width="16" alt="Free Software Foundation" src="img/credits/gnu.small.png"/>Licensed under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License version 2.0</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- if you prefer loading libraries from standard hosts, un comment this and
|
||||
comment out the local source -->
|
||||
<!-- script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"
|
||||
|
|
@ -27,5 +67,8 @@
|
|||
<script src="vendor/node_modules/leaflet/dist/leaflet.js"></script>
|
||||
<script src="vendor/node_modules/papaparse/papaparse.min.js"></script>
|
||||
<script src="js/compiled/geocsv_lite.js" type="text/javascript"></script>
|
||||
<script>
|
||||
geocsv_lite.core.initialise_map_element("map", "/data/data.csv");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue