Maps4HTML / HTML-Map-Element-UseCases-Requirements

Use cases and requirements for Maps on the Web
https://maps4html.org/HTML-Map-Element-UseCases-Requirements/
Other
22 stars 12 forks source link

Initial working D3 examples and other examples #198

Closed NickFitz closed 4 years ago

NickFitz commented 4 years ago

This includes working d3-geo examples for three use-cases. There are others, but one thing that needs to be considered is the relative size and complexity of the GeoJSON files required for any complex interactive mapping, such as exported OSM data.

I’ve included example GeoJSON files derived from OSM data in the /examples/data/geojson directory as examples of what I mean - the ones showing the area around CERN. These files have been reduced in size by a filtering tool I’ve implemented that removes irrelevant data, but are still quite large. So I’ll try to restrict the addition of any more files of this size and complexity for now, in favour of simpler files that still allow the concept embodied in the example to which the file relates to be shown.

I’ll add more d3 examples to this PR shortly if it hasn’t been merged, or create a new PR for them if it seems better to merge this one now.

Malvoz commented 4 years ago

LGTM.

Edit: I'll add styles for responsiveness once this is merged. Alternatively, if you can add me as a collaborator to your repo I could push to your branch, I suppose?

I’ll try to restrict the addition of any more files of this size and complexity for now, in favour of simpler files that still allow the concept embodied in the example to which the file relates to be shown.

Additionally, re-using the same geojson files across multiple example pages where it'd make sense should be fine too.

NickFitz commented 4 years ago

Updated the title as some non-d3 examples also needed work.

AmeliaBR commented 4 years ago

re-using the same geojson files across multiple example pages where it'd make sense should be fine too.

Agree that this is a good strategy. Or just keep examples as simple as possible. We're trying to show the defaults for each framework as well as a little bit of what they make possible — but that's tricky with D3, where there are very few defaults, and anything is possible but not necessarily easy!

I think going forward, we might want to come up with a rule — if a capability is possible, but it would be 100% custom code, and all relevant UI / API would be up to the website author, maybe we can just make a note of that in the example page instead of spending the time coding up a working version. I don't think we need to recreate every single interesting Google Maps or Leaflet capability in D3!

AmeliaBR commented 4 years ago

PS @Malvoz If you do have time to tidy it up the responsiveness behavior, that would be great. Otherwise, I'll do a clean-up pass at some point. Still wanted to get this live.