-
Notifications
You must be signed in to change notification settings - Fork 163
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
Show this index on a map #79
Comments
@jbelien suggested also turning this into a website. Basically, if you go to https://NICE-WEBSITE/north-america/us you get a pretty webpage that shows you the resources for the US resources.
|
Here are some screenshots ! Feel free to already made some comments about it ! http://localhost:8080/resources/europe/be : http://localhost:8080/resources/europe/be/fr (translation enabled) : http://localhost:8080/features/europe/be : Translation is of course available for I also added an |
That's great @jbelien ! We can merge this and serve it on the github page for this project 👍 |
Thanks for the good words ! 😄 You can play with it here : https://community.osm.be/ Unfortunately, it won't be possible to host it on GitHub Pages because it's developed using PHP. |
Code is (finally) released : https://github.com/jbelien/oci-viewer |
At the moment i'm the maintainer of https://github.com/fossgis/usergroups-bot aka http://usergroups.openstreetmap.de. A few weeks ago i switched it from an old OL2 to a new Leaflet. How i generate the (one) geojson file: walk through all features > for each feature walk through all corresponding country resources > load the json > compare the featureId (because there isn't any filename convention between resource and feature) > if true add resource to feature.properties Have a look at http://usergroups.openstreetmap.de/community.html Because there isn't any hierarchy in the features some inner outlines are overlapped by the country outline and so the click event for the popup shows the wrong information. But for Leaflet.geojson the sorting (hierarchy) is important, first the country outlines (admin=2), then regions (admin=4), then administrations (admin=6) on top and so on. Have i overlooked something? |
Hey @osmtools ! On iD side, we bundle the index directly into iD. I think we should add some better "how to use this index" info to the README with examples.
Oh yeah I see what you mean - you definitely want to sort the smallest areas on top of the larger areas. In iD I use d3.polygonArea but something like turf/area would work too. Maybe we should just calculate the areas in this project and include them with each entry? It would help out downstream projects.. |
but there, there isn't any merge of the two files/types. I generate one big geojson file while i merge resources to feature.properties so leaflet could load this one and only geojson file once at all.
Yeah, would be very nice. Otherwise i have to calculate the features with a/in my python script and order my big geojson file ... all this because i don't want to much calculation and processing on the client javascript side |
Would it be OK to start linking https://community.osm.be/ from the readme? |
Sure 👍 |
(useful for putting these things on a map, re: #79)
Quick update on this - as of v0.11.0 we're now publishing a If you want to use this file, you can get it from the Or even better - use something like the unpkg CDN to fetch the latest published version of the file: |
Interesting! 🎉 I'll try to add that to https://community.osm.be/ to display a global map ! 👍 |
Mikel made a quick map: https://mikelmaron.github.io/map-demos/osm-community-index/ |
This is great! Thanks @mikelmaron for putting this together. |
Map deployed on https://community.osm.be/ 🎉 |
I've built a new version of my OSM Community Index viewer : https://oci-viewer.netlify.app/ (temporary URL ; it will still use https://community.osm.be/ when released). Interface has been improved and the website is now static (using Sapper) and could be hosted using GitHub Pages (see #79 (comment)) ! Feedback is welcome :) |
Kind of similar to how editor-layer-index has a basic live preview - this index should have a map too.
The text was updated successfully, but these errors were encountered: