hackgvl / OpenData

Open data projects, including real-time and reusable data for local tech meetups, events, and map layers.
16 stars 3 forks source link

Create a dynamic map preview script #37

Open allella opened 7 years ago

allella commented 7 years ago

@wmfox3 @ealdthryth @pamelawoodbrowne

We now have a script that will dynamically read the column headings off the master data source and generate pop-up content for the map points.

For the moment it's randomly sourcing data from one of three Google Spreadsheets http://data.openupstate.org/maps/preview.html http://data.openupstate.org/maps/geojson.php

I'll work on getting the data info Drupal and then allowing for requesting the map through this script using the friendly name values. At that point we'd also be able to set the zoom and center points for the corresponding map.

wmfox3 commented 7 years ago

Awesome! Nice work, Jim. Let me know if there's anything else you need me to add or amend on the spreadsheet.

allella commented 6 years ago

The GeoJSON links, like on https://data.openupstate.org/map/co-working-spaces should now be working.

allella commented 5 years ago

@jonahmoore17 here's the issue about consolidating into a single map preview script. Thanks for cleaning up the spreadsheet column headers. Now we can dynamically render those values in the pop-ups on a map layer.

We're pretty darn close now.

We have a REST API endpoint to pull the map layers and/or we can access the data from within Drupal 8 if the preview script gets built as a Drupal MVC route.

allella commented 3 years ago

The static preview map at https://data.openupstate.org/map/preview/schools-higher-education-greenville-county/ now has LeafletJS logic to ignore missing latitude and longitude. This should be done at the syndication / caching layer, but it won't hurt to include this logic to block bad lat/long at the map preview script. Example

allella commented 2 years ago

I made progress on making the maps dynamic.

Upgrading Leaflet or even switching to the Google Sheets API are related issues #33.

The content of the pop-up boxes is the main issue right now.

Also, we likely have some accessibility issues to deal with in either upgrading Leaflet to the latest version or changing to a more accessible map preview tool, as noted in #52 .

allella commented 2 years ago

The map layer preview script is now largely dynamically rendered based on the source GeoJSON file.

There are usability and security tweaks to implement, but the overall idea is now working.

Examples https://data.openupstate.org/map/preview/breweries https://data.openupstate.org/map/preview/after-school-program

allella commented 2 years ago

The GeoJSON files are still partially static, so that's another step to make these layers completely dynamic.