Git Product home page Git Product logo

hackgvl / open-map-data-multi-layers-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spacecowboy326/open_data_gvl

2.0 2.0 2.0 1.27 MB

A bookmarkable map displaying all layers from HackGreenville Labs' Open Map Data

Home Page: https://hackgvl.github.io/open-map-data-multi-layers-demo/

License: MIT License

JavaScript 1.82% HTML 1.49% Vue 31.12% TypeScript 64.91% CSS 0.66%
geojson greenville leaflet leafletjs map vue vuejs3

open-map-data-multi-layers-demo's People

Contributors

alex-grimes avatar allcontributors[bot] avatar allella avatar dependabot[bot] avatar eitan-lich avatar oliviasculley avatar spacecowboy326 avatar thorntonmatthewd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

open-map-data-multi-layers-demo's Issues

Add a built-in mechanism to contribute to map layers

#11 should probably be implemented first since it's more straightforward and this item naturally builds off of it

Our custom map layers are Google spreadsheets that should be easily editable by their maintainer(s). However, there's no easy mechanism to help contribute to keep this data up-to-date (hey! xyz closed down, abc just opened), or volunteer to become a maintainer of a map layer.

On an easy level, this might just mean displaying links to suggestion mode in the backing Google sheet for a map layer, or maybe working more closely with the OpenMap API to automate functions around maintainers once hackgvl/OpenData#27 is implemented

Enable Issues on GitHub

@grinstead this project is a fork and we only had one open issue on the original project.

I've enabled the issues here.

If you find things that need to be updated or contributions, then feel free to share them here.

This repo is hosted on an Apache server and I have it sort of bubble-gum and duck taped in because I have no experience hosting javascript apps. So, I could also try to redeploy updates to the existing site and post the errors or roadblocks I was getting with hosting this demo map.

Determine Where to Continue Hosting the Map Layer Spreadsheets

The map layer spreadsheets were moved recently to an OpenCollective owned Google Workspace that's associated with Code With the Carolinas

These files were previously in a Code For Greenville Google Workspace and Code For America killed that in June 2023 and we agreed to merge into Code For / With the Carolinas as a Shared Drive in the meantime. That Shared Drive is now empty and the files still exist and are shared with some people, but as read-only.

I'm not sure it's worth asking them to setup permissions when could just move these under a RefactorGVL Shared Drive if Code With The Carolinas doesn't see a way those layers fit into things they are doing.

Add more e2e tests

Currently there are no e2e tests for several things:

  • Checking and unchecking a map layer (and having the URL update)
  • Panning/zooming around the map (and having the URL update)
  • Making sure all the tabs render properly

Bonus points if the api's response can be mocked so the tests aren't dependent on the status of the OpenData api!

Bug: Workaround for Breaking Issue When Map Point Features.Properties Are Numeric Values

@oliviasculley I noticed the Recycling layer wasn't rendering on the Demo Map, or in the map preview.

The GeoJSON is fine and the issue, at least with the map preview, is the recycling data has zip codes as one of the key:value pair in map point data features.properties values.

I think we both have custom JS to find and replace underscores and to force URLs in the features.properties into HTML links for the pop-ups when a point is clicked on the map.

The Javascript is seeing the zip code as a numeric type, which was breaking the String.replaceAll() I was using on the map preview.

So, it may be breaking the underscore replace() or URL replace you're using in https://github.com/hackgvl/open-map-data-multi-layers-demo/blob/stable/src/components/MainMap.vue around the onEachFeature section starting around line 123.

I'm not sure if what I did is the most elegant, but forcing the features.properties key and value to a string with toString() fixed it.

ย 
var popuphtml = popuphtml + "<li><strong>" + key.toString().replaceAll('_', ' ').toProperCase() + "</strong>: " + value.toString().replaceAll(urlRegEx, '<a href="$1">$1</a>') + "</li>"

image

image

Nav bar no longer appears on mobile

Screenshot_20231016-233538

For some reason the navbar isn't appearing on mobile devices, however it works in mobile view on desktops.

I've reproduced this issue on Chrome, Brave and Firefox on an Android device. ๐Ÿฅบ

Create a 404 or Default Page

Create a default "catch-all" route for anything that doesn't match up with a view.

Current view of /meow:
Screenshot_2023-10-14_00-24-00

Maybe the default page could just be the map?

Map doesn't navigate between tabs properly

Steps to reproduce:

  1. Open the map
  2. Check some layers
  3. Switch to the "About" tab
  4. Switch back
  5. None of the old pins load, and trying to load more layers breaks :(

Ideal requirements to close this issue:

  1. Adding a test that tests the above scenario to make sure it works in the future
  2. Fixing the issue ๐Ÿ˜‹

Docs: Update About Page /src/views/AboutView.vue, README, and Whatever Else, From CFG to HG Labs

@oliviasculley I'm reminded this demo was under the Code For Greenville domain / GitHub Pages, which is now redirected to Code For The Carolinas.

The new GH Pages URL is working
https://hackgvl.github.io/open-map-data-multi-layers-demo/

I've updated the demo link on the main Maps page, but I suppose we could consider hosting this under the data.openupstate.org domain, or even under the HackGreenville domain. I think I'd prefer the data.openupstate.org unless / until we have a plan for what fits under the HG site and what is best on another domain.

Also, the About page references CFG and the CFG GitHub repo, so we should at least update those to the HG equivalents
https://hackgvl.github.io/open-map-data-multi-layers-demo/about

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.