theCrag / website

theCrag.com: Add your voice and help guide the development of the world's largest collaborative rock climbing & bouldering platform
https://www.thecrag.com/
109 stars 8 forks source link

Maps rebuild over arching task list #2767

Open brendanheywood opened 7 years ago

brendanheywood commented 7 years ago

Ok lets recap the high level requirements that lots of people have asked for:

1) ability as consumer to swap from google maps to openstreet map / bing / etc 2) ability as guide editor to set preferred map as default for that crag 3) ability as guide editor to add points of interest to the map, in particular car parks and the walking track from the car park to the crag 4) as a user on a map be able to easily see a breakdown of gear style, and ideally but lower priority difficulty 5) as a user be able to search for stuff and have the map zoom out and find things just like google maps does

And on the technical side a variety of bugs / improvements: 6) change the algorithm for selecting what node we are 'in' given a bounding box 7) change the algorithm for selecting the label attachment point to fix bugs with 'banana' shaped crags where the label is outside the shape 8) we have the maps tab, we have the embedded map in list view, and we have the map editing page. All 3 are completely different code bases and have different pros and cons. At minimum we want the list view and the maps tab to be consistent, but ideally all 3

Going through each of these:

1) requires a generic map library, eg leaflet or openlayers 2) this is mostly on our side, but is dependent on 1) 3) we need new datamodels and api's for this. Isn't dependent on 1) but the editing tools are critical here so dependent on 8) 4) the main thing we need here is to be able to have full control over the labels and clusters we show on the map. I'm currently using an open source library for google maps for the clustering. This has a soft dependency on 1) as whatever framework we use, if we use one, need to give us this control 5) this is agnostic of js library. But we probably want to search not only our crag database but also search a generic location database such as the google maps reverse geosearch api 6) this is purely on our side, specced out and ready to go 7) specced out and ready to go. Doesn't matter what lib we use, as long as it gives us the fine grained control over the labels 8) mostly on our side

So I see this as a few stages which can be released separately:

STAGE 1: rebuild

URL routing:

API

Clusters

Shapes & Labels (eg gara gorge)

At this point we are now at 'viewing' feature parity with the current maps minus a host of bugs. We haven't touched the editing side at all, but we can ship this.

STAGE 2: New view features

STAGE 3: Editing

Now past editing feature parity.

STAGE 4: New Points of interest

STAGE 5: New tracks and shapes

This would probably be done with stage 4, but we could ship here with just the car park poi for a good win.

STAGE 6: Extended shapes, boulders, cliffs, lakes

scd commented 7 years ago

This is a great spec and starting point.

brendanheywood commented 7 years ago

Just throwing another idea out there. We've previously talked about using leaflet so we can throw different tile engines at is more easily. It occurs to me that we should probably be able to declare map layers themselves in the db attached to certain nodes rather than in code.

The first example which springs to mind is SixMAPs which is the NSW gov's mapping service which is freely available and they even have a page showing you how to integrate it into a variety of mapping tools including leaflet. Adding it as a layer is a 1 liner and a generic ArchGIS leaflet plugin:

L.esri.tiledMapLayer("http://maps.six.nsw.gov.au/arcgis/rest/services/public/NSW_Imagery/MapServer", {}).addTo(map);

The data itself is released under Creative commons attribution which is awesome, I'm not entirely sure the details for commercial use and sla's etc.

See also: http://spatialservices.finance.nsw.gov.au/mapping_and_imagery/lpi_web_services/advancedguide http://spatialservices.finance.nsw.gov.au/mapping_and_imagery/lpi_web_services/terms_and_conditions

Now this is just NSW, but I imagine there would be a large number of local / state / national government services that we could hook into which are higher quality / more accurate tiles. As we find these we'd want to be able to easily add more on the fly. Even if this is just a few lines of hacky hard coded stuff based on the ancestor nodes that's ok as it's not too much effort to hot fix. But for me the real killer feature is not just for the climber to be able to select these better tiles when viewing, but for the coordinator to be able to select these as the preferred / default tile layer.

I haven't had an exhaustive look, nor checked licensing details, but here are a couple similar services from other states which, like six maps, also have better data than google maps or bing. I think it's safe that there would be a bunch of these around the world.

https://qldglobe.information.qld.gov.au/

http://maps.thelist.tas.gov.au/listmap/app/list/map

http://location.sa.gov.au/viewer/

brendanheywood commented 6 years ago

So I've gone through and made sure we have specs for either apis or algorithms in place for review for the first couple stages to kick off:

brendanheywood commented 5 years ago

+1 via https://github.com/theCrag/website/issues/3465

dmucli commented 2 years ago

This ticket seems to have been abandonned. Is it still on the cards to add POIs and tracks to maps?

scd commented 2 years ago

Sure it is still on our TODO list. We are way under resourced so some things take a long time to get to.

For example we have not done Stage 3 but really need to still do it because it is creating some significant issues.