Skip to content

Load venue details dynamically when a map pin is clicked#593

Open
stuartlangridge wants to merge 3 commits intoNerdyDayTrips:mainfrom
stuartlangridge:dynamically-load-bubble-text
Open

Load venue details dynamically when a map pin is clicked#593
stuartlangridge wants to merge 3 commits intoNerdyDayTrips:mainfrom
stuartlangridge:dynamically-load-bubble-text

Conversation

@stuartlangridge
Copy link
Contributor

Generate a JSON version of each venue alongside the HTML, and then remove full data from the main json file; when a venue map pin is clicked, dynamically load the full details for the venue at that point from the new individual JSON file at that point

…move full data from the main json file; when a venue map pin is clicked, dynamically load the full details for the venue at that point from the new individual JSON file at that point
@stuartlangridge
Copy link
Contributor Author

This prooooooooobably is enough to sort out #37 since this PR moves all the detail (except permalink and latlon) out of the main JSON file, making it smaller. (It was 424K for 1360 venues; it's now 177K, or ~128 bytes per item; it won't hit 1MB of JSON now until there are about 8000 venues, which at least gives some breathing room before trying to split up the One Big JSON File into smaller JSON files dependent on map zoom/boundingboxes to avoid loading it all.

stuartlangridge added a commit to stuartlangridge/website-1 that referenced this pull request Jun 11, 2025
A succession of little JS functions each try to shorten the address displayed in the map popup bubble.
The reason for this approach is that it's easy to add new functions to the SHORTENERS list as and when we think of them.
This does not change the data stored in the markdown files; it only changes the address displayed in the popup bubbles on the map.
Note that this depends on and includes the dynamically-load-bubble-text PR at NerdyDayTrips#593
This should hopefully alleviate the problems that motivated NerdyDayTrips#558
@popey popey self-requested a review June 17, 2025 11:01
@popey popey added the enhancement New feature or request label Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants