-
Notifications
You must be signed in to change notification settings - Fork 230
Add a page to the website with a map showing the locations of the Java Champions #318
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
base: main
Are you sure you want to change the base?
Conversation
@aalmiray this merge request assumes you'll first merge the previous one for the new podcast page ;-) |
Is there a free map we could use such as OpenstreetMaps? |
Also, you may need to rebase your changes as it brings over the podcast updates as welll. |
@aalmiray found a free API (up to 5000 calls/day). |
Ideally we can generate the map waypoints every time the site is regenerated (commit on main), which happens only a few times a month. Thus, it should be static data, no need to issue that many REST calls a day IMHO |
Indeed, that's why it's integrated in the site.java process. Only runs when the site gets generated. And we don't have 5000 champions yet, so not a problem either ;-) |
@FDelporte podcast PR has been merged. Unfortunately there are a couple of conflicts to be resolved for this PR. |
# Conflicts: # .github/workflows/site.yml # CONTRIBUTING.adoc # resources/site.java # site/templates/menu.ftl
@aalmiray merge conflicts are fixed! Thanks for merging and publishing the podcast page! |
I still need to review the html page and test if it correctly displays the map. That's why I didn't include a menu link to it. But can you please review @aalmiray if this can be set up in the repository with the required API key? |
…enerated with unfound locations.
@aalmiray map has been further implemented, tested, and is working OK. It shows almost all champions. A file gets generated with locations that could not be converted to lat/long. ![]() ![]() ![]() ![]() |
Thanks! What should we do for those entries for which lat/long can not be computed? Should we select the capital city of the given country of nomination? If so, said city should come from a different data file or API call. |
resources/site.java
Outdated
import org.json.JSONObject; | ||
import org.json.JSONArray; | ||
|
||
import javax.print.attribute.Attribute; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these 2 imports needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
org.json is used to parse the result from geo-api
All members now get a location thanks to:
When we publish this, we could request all members (via Slack?) to fill in or update their city and residence country to generate an up-to-date map. |
This proposal would generate a world map showing the locations. The new page has not yet been added to the menu bar as it needs further testing. Sorry, I can't run JBake on my system.
Preconditions needed:
GEO_API_KEY
The JBang script will generate a new page
map.adoc
with a data list in this format: