Skip to content

Commit

Permalink
hacky bullshit but having two geojson files for now until i can figur…
Browse files Browse the repository at this point in the history
…e this shit out
  • Loading branch information
JBad committed Jul 4, 2021
1 parent 5661894 commit bfb6f80
Show file tree
Hide file tree
Showing 7 changed files with 17,180 additions and 5 deletions.
2 changes: 1 addition & 1 deletion map/_posts/2018-02-05-choque.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_toke
},
},
elevationControl: {
url: "https://jbad.github.io/map/res/choque.geojson",
url: "https://jbad.github.io/map/res/choque1.geojson",
options: {
theme: "lime-theme",
collapsed: false,
Expand Down
2 changes: 1 addition & 1 deletion map/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>{{ page.title }}</h1>
<li>
<a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}<br>
<script id="{{post.title}}" type="text/javascript" src="/{{post.geo}}"></script>
<script> maplist.push({"data":"{{post.title}}","link":"{{ post.url}}","description":"{{post.description}}"})</script>
<script> maplist.push({"data":{{post.title}},"link":"{{ post.url}}","description":"{{post.description}}"})</script>
</a><br></li>
{% endfor %}

Expand Down
3 changes: 2 additions & 1 deletion map/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ function load() {
map.on('load', function () {
for (let i = 0; i < maplist.length; i++) {
//var mydata = JSON.parse(document.getElementById(maplist[i].data).textContent)
var mydata = JSON.parse($.get('res/' + maplist[i].data + '.geojson').responseText.replace(/\s/g, ''));
//var mydata = JSON.parse($.get('res/' + maplist[i].data + '.geojson').responseText.replace(/\s/g, ''));
var mydata = maplist[i].data;
map.addSource('route' + i, {
'type': 'geojson',
'data': mydata
Expand Down
Binary file added map/res/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion map/res/choque.geojson
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
choque = {
"type": "FeatureCollection",
"features": [
{
Expand Down
17,174 changes: 17,174 additions & 0 deletions map/res/choque1.geojson

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion map/res/rosengarten.geojson
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
rosengarten = {
    "type": "FeatureCollection",
    "features": [
        {
Expand Down

0 comments on commit bfb6f80

Please sign in to comment.