coregis / cbf-programs-map-2023

Rebranding and other updates to the Raise Your Hand Texas Programs Map
GNU General Public License v3.0
0 stars 0 forks source link

UI Revisions and Map Design Changes per CBF Review #17

Closed coregis closed 9 months ago

coregis commented 9 months ago
coregis commented 9 months ago

Thanks for making those changes and explaining what you did in the PR!! I just added a couple more things. Also it looks like you found the RYHT in the lower right attribution, where was that little bugger?! @nein09

eldang commented 9 months ago

Hahaha, @coregis while you were writing this, @nein09 and I were talking about how neither of us knew where to look for that. So I don't think it was anything either of us did.

I'm also not sure we have fully resolved that issue. When I load the map in its current state, I see "RYHT | © Mapbox © OpenStreetMap" flash up, and then the "RYHT |" disappears by the time the point layers have finished loading. It goes away fast enough that I'm having trouble screenshotting it, but slowly enough that some people will notice.

Weirdly, I can not find either the string "RYHT" or any reference to an AttributionControl or map.customAttribution in this project's code. I'm wondering if there could be something associated with the Mapbox style.

One thing I did notice on that front is that we're still loading the school_house_senate_districts_UNION hidden layer from the CoreGIS Mapbox account instead of the new CBF one. Could it be that there's an old attribution associated with that layer / tileset? It would load much faster than RBL points layer, so it could be that whichever has finished loading most recently overwrites the previous attribution. I am clutching at straws a bit though - not at all confident in this guess, just trying to think about places it could be set that I wouldn't find by searching the text of this project's files.

eldang commented 9 months ago

Aha! I just realised that the "RYHT |" attribution toggles on and off with the school district boundaries layer. So the reason it flashes on during loading is that the layer gets rendered invisibly first so we can populate the dropdown menu from its contents, before then being deactivated. I bet the attribution is set somewhere in the tileset itself, and Mapbox just displays the superset of all custom attributions associated with currently-active layers.

coregis commented 9 months ago

Aha! I just realised that the "RYHT |" attribution toggles on and off with the school district boundaries layer. So the reason it flashes on during loading is that the layer gets rendered invisibly first so we can populate the dropdown menu from its contents, before then being deactivated. I bet the attribution is set somewhere in the tileset itself, and Mapbox just displays the superset of all custom attributions associated with currently-active layers.

Oh that totally makes sense, thank you for the GIS forensics! I will delve into this when I have a moment, either later this afternoon or this evening.

nein09 commented 9 months ago

@eldang what a find! I would never have figured that one out.

eldang commented 9 months ago

I don't think I would have made the connection either, if I hadn't recently been tinkering with that invisible render to get the district names.

coregis commented 9 months ago

I FOUND THE LITTLE BUGGER! It is indeed embedded in the mbtiles: image