Skip to content
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

Unearthing PVD map layers planning issue #448

Open
3 of 13 tasks
jywarren opened this issue Mar 24, 2020 · 5 comments
Open
3 of 13 tasks

Unearthing PVD map layers planning issue #448

jywarren opened this issue Mar 24, 2020 · 5 comments

Comments

@jywarren
Copy link
Member

jywarren commented Mar 24, 2020

@tmarlow - hi, just touching base about the map layers you're looking to add. cc @emilyashley 👋

My list includes:

  • adding a search box (we just merged this!) in Add search control to LEL's basic usage #369 Commit  #404 so after testing we'll:
  • publish new search box to PublicLab.org
  • adjust icon display: my understanding is you'd like the black markers that indicate "posts" to not overwhelm the smaller blue dots that indicate an industrial site, is that right? More discussion on this below.
  • bounding modifications: let's try this through in-page customization, using Leaflet's map.setMaxBounds() (see below)
  • adding laundromat/playground data, ideally by cloning the UnearthingPVD layer (see below)

Icon size discussion

If the above problem statement is right, we could:

  1. make the black droplet markers smaller -- like half size
  2. make the blue dots bigger (although this makes them harder to read when many are shown)
  3. other ideas?

Cloning layers

The original layer we're looking at is here: https://github.com/publiclab/leaflet-environmental-layers/blob/master/src/unearthing.js so we'll copy it as many times as we need.

Change checklist:

However, after copying and modifying that file, we also need to change these files and lines to include the new layer:

  • "Unearthing": {
    "name": "Unearthing Providence",
    "url": "https://publiclab.org/unearthing-pvd",
    "api_url": "",
    "data": {
    "type": "Historical data",
    "disclaimer": "Social scientists and computer scientists at Brown University have assembled a unique database that contains information on every manufacturing facility that operated in Rhode Island since the early 1950s. The database also contains information on other environmentally risky land uses such as gas stations, dry cleaners, and auto repair shops as far back as 1936. We have also collected information on “green” land uses such as urban parks, playgrounds, schools and community gardens dating back to 1915."
    },
    "description": "A platform for historical data-driven analyses of industrial land use, story-mapping, and community organizing.",
    "layer_desc": "Industrial land use, story-mapping, and community organizing",
    "icon": "#4f4fff",
    "extents": {
    "bounds": [
    [42.2102, -72.0204],
    [41.2272, -70.9618]
    ],
    "minZoom": 6,
    "maxZoom": 18
    }
    },
    (format below)
  • https://github.com/publiclab/leaflet-environmental-layers/blob/master/src/AllLayers.js#L12

For the info.json file above, we need these fields updated for the new layers; if you can add that in a comment here:

    "name": "Unearthing Providence",
    "url": "https://publiclab.org/unearthing-pvd",
    "api_url": "",
    "data": {
      "type": "Historical data",
      "disclaimer": "Social scientists and computer scientists at Brown University have assembled a unique database that contains information on every manufacturing facility that operated in Rhode Island since the early 1950s. The database also contains information on other environmentally risky land uses such as gas stations, dry cleaners, and auto repair shops as far back as 1936. We have also collected information on “green” land uses such as urban parks, playgrounds, schools and community gardens dating back to 1915."
    },
    "description": "A platform for historical data-driven analyses of industrial land use, story-mapping, and community organizing.",
    "layer_desc": "Industrial land use, story-mapping, and community organizing",

Once you do the above steps, please open a pull request with your work! Or, if you'd like, point us (in a comment here) to your branch and we can open it for you. Thanks Tom!!!

We can break this out into different issues as needed. Thanks!

@jywarren
Copy link
Member Author

A quick update: i was able to get the bounding customization working by including this script into the page:

// find map object and limit bounds/zoom
window[Object.keys(window).find(key => key.substr(0,3) === "map")]
  .setMaxBounds([
    [42.2102, -72.0204],
    [41.2272, -70.9618]
  ]).setMinZoom(9)

It's working now at https://publiclab.org/wiki/unearthing-pvd

@jywarren
Copy link
Member Author

jywarren commented Apr 7, 2020

Hi @tmarlow - i'd like to make some progress on the marker styling issue. My understanding was that the larger black markers seem to "overwhelm" the smaller blue markers.

I'm cautious about making the blue markers larger because they are so crowded already.

Could one possible solution be to override the marker display for this page and make the black markers smaller? Do you prefer another set of colors? Thanks!

@tmarlow
Copy link

tmarlow commented Apr 8, 2020 via email

@jywarren
Copy link
Member Author

No problem, and a lot of small but important things (like search) are coming together finally and i hope will go live today. Good luck with your work and stay safe!

@jywarren
Copy link
Member Author

image

Search is now live on https://publiclab.org/map !

And on the unearthing pvd page! https://publiclab.org/wiki/unearthing-pvd

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants