alecramsay / pg

Explores the tradeoffs for redistricting inherent in states' political geography
MIT License
0 stars 0 forks source link

Find a better screenshot solution #52

Open alecramsay opened 11 months ago

alecramsay commented 11 months ago

that correctly renders the map image.

In order, try:

A tracking issue--this is not blocking me, as I can get the end-to-end workflow working with what we have, wrapped up so it's easy to replace with a better solution.

alecramsay commented 10 months ago

I'm not sure it's possible to get a better screenshot solution than the one Steve Marx created.

I'm attaching a zip file with 3 solutions:

All 3 produce the same result -- so both puppeteer and Selenium and Chrome and Firefox.

I think this must be related to Mac's and Retina displays.

It seems like there should be a way to set the correct Device/Display Scale Factor, but none of the straightforward setting of properties that I found seem to do that. Morever, none of the workarounds others claimed to work seemed to work for me.

I'm not sure it's worth investing more time on this, but it seems very odd that there's no simple & obvious solution to this. We can't be the only ones trying to do this.

Archive.zip

alecramsay commented 10 months ago

Is this the answer to why nothing seems to work? i.e., it's a MacBook hardware/display issue and not a puppeteer, Selenium, Chrome, or Firefox issue.

alecramsay commented 10 months ago

And these are the desired & actual results ... desired_map_intersections desired_map map_intersections map

alecramsay commented 10 months ago

https://docs.mapbox.com/style-spec/reference/layers/