SCODEMeetup / hubs

Visualizing the smart mobility hubs that will be linked with COTA systems to provide transit information with real-time arrival and departure times to passengers.
https://scodemeetup.github.io/hubs/
Creative Commons Attribution Share Alike 4.0 International
0 stars 1 forks source link

Hubs JavaScript File #12

Closed MathematicsCLtd closed 5 years ago

MathematicsCLtd commented 5 years ago

Describe the bug The hubs.geojson data will not load with the JavaScript commands given. Presently adding each marker individually. This solution will not scale.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'hubs.js'
  2. Remove comment tags form '$.getJSON'
  3. Comment out all 'L.marker'
  4. Locations will not load.

Expected behavior Markers should load for six locations

Screenshots N/A

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context See MathematicsCLtd with any questions.

vitaluha commented 5 years ago

Don't include slim version of jquery. I think you need to include full one (https://code.jquery.com/jquery-3.1.1.min.js) Also, you can't json request to a local file. This is 'cross-origin' - look it up. I think you need to run this from a web server, not just like static .html file

MathematicsCLtd commented 5 years ago

Thanks for the info! I'll look it up and try to fix later this week.

MathematicsCLtd commented 5 years ago

Included minified version of jQuery that @vitaluha suggested. Closing issue with reference to PR #18