-
Notifications
You must be signed in to change notification settings - Fork 77
WIP Location json #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e4e8d2e
247293c
68a3db5
1ce4bdf
2329057
3dd789c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
|
|
||
| <!-- import the webpage's stylesheet --> | ||
| <link rel="stylesheet" href="../../style.css" /> | ||
| <link rel="stylesheet" href="./location.css" /> | ||
|
|
||
| <!-- import the leaflet css and script --> | ||
| <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" crossorigin="" | ||
|
|
@@ -41,6 +42,7 @@ | |
| <script src="../../utils/fileHelper.js"></script> | ||
| <script src="../../utils/fileTemplate.js"></script> | ||
| <script src="../../utils/fileHandler.js"></script> | ||
| <script src="./multiLocationsTemplate.js" defer></script> | ||
| <script src="./location.js" defer></script> | ||
| </head> | ||
|
|
||
|
|
@@ -67,24 +69,22 @@ | |
| <p class="lead">1. Pick the location</p> | ||
| <p class="paragraph"> | ||
| Click to drop a pin on the map or enter exact GPS coordinates. You may enter up to 10 locations. | ||
| You can retrieve latitude and longitude from an address using <a target="_blannk" href="https://www.latlong.net/" class="link">this tool</a>. | ||
| You can retrieve latitude and longitude from an address using | ||
| <a target="_blank" href="https://www.latlong.net/" class="link">this tool</a>. | ||
| </p> | ||
| <p> | ||
| <input type="file" id="uploadTpl" accept="application/JSON" hidden onchange="getTplFile(this)" /> | ||
|
|
||
| If you want to place your creation in more than 10 locations, you may upload your own JSON file by clicking | ||
| <span class="clickable" onclick="uploadLocations()">here</span>.<br /> | ||
| If you don't know hwo to set up your own JSON file, you can follow <span class="clickable" onclick="downloadJsonTpl()">this template</span>. | ||
| </p> | ||
| <p id="tpl-error" class="error"></p> | ||
| <div class="coordinates-input-wrapper"> | ||
| <div class="coordinates-input-container"> | ||
| <!-- <div> | ||
| <label for="latitude">Latitude:</label> | ||
| <input class="text-input" type="text" id="latitude" onblur="check_lat_lon()" name="latitude" /> | ||
| </div> | ||
| <div> | ||
| <label for="longitude">Longitude:</label> | ||
| <input class="text-input" type="text" id="longitude" onblur="check_lat_lon()" name="longitude" /> | ||
| </div> --> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
| <div class="pages-content-container"> | ||
| <map-pick-location></map-pick-location> | ||
| </div> | ||
|
|
@@ -95,6 +95,9 @@ | |
| <p class="paragraph"> | ||
| <p>Select the type of content you would like to link to your marker and then upload the file from your | ||
| computer.</p> | ||
| <p class="bold"> | ||
| Please check the file name and remove whitepaces. | ||
| </p> | ||
| <ul> | ||
| <li>3D Object (.gltf, .glb .zip; max size 50MB)</li> | ||
| <li>Image (.jpg, .png, .gif; max size 15MB)</li> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| .clickable { | ||
| color : blue; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| #uploadTpl { | ||
| position: fixed; | ||
| left : -100px; | ||
| filter : alpha(opacity=0); | ||
| opacity : 0; | ||
| width : 0; | ||
| height : 0; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| window.multiLocationsTemplate = `{ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be the one I was looking for. I'm wondering why we are using stringified JSON as a template, wouldn't it be better to have a JSON object instead?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's temporary. you can changed it in object. |
||
| "showDistance": true, // true/false, if true, show distance from origin (distanceMsg property) for every place | ||
| "showName": true, // true/false, if true, show place name for every place | ||
| "heightFromGround": 0, // if true, change Y position for every place | ||
| "places": [ | ||
| { | ||
| "id": 0, | ||
| "name": "Colosseum", | ||
| "latitude": 0.0000, | ||
| "longitude": 0.000 | ||
| }, | ||
| { | ||
| "id": 1, | ||
| "name": "Arco di Traiano", | ||
| "latitude": 0.0000, | ||
| "longitude": 0.000 | ||
| }, | ||
| { | ||
| "id": 2, | ||
| "name": "Stadio Olimpico", | ||
| "latitude": 0.0000, | ||
| "longitude": 0.000 | ||
| } | ||
| // .... | ||
| ] | ||
| }`; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,10 +22,6 @@ | |
| margin-bottom: 2rem; | ||
| } | ||
|
|
||
| .bold { | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .disclaimer-color { | ||
| color: #828282; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.