jpickup / mvoc-iconic-one-theme

Child theme of Iconic One for the MVOC website
0 stars 0 forks source link

Derive distance & map links from what three words? #4

Open IanDitchfield2 opened 1 month ago

IanDitchfield2 commented 1 month ago

Some clubs, BAOC for example, have taken to providing event locations with three words, but not a GPS ref. Therefore going forward it would be a minor convenience if I could fill in the what-three-words and not the GPS co-ordinates, and still have all the function including distance calculation and Google/Streetmap map links working. If it's not easy, don't bother. For take-on from the old calendar, it makes no odds as I did the conversion to create the old map link, which I can now copy.

jpickup commented 1 month ago

I need to explore whats on offer with W3W as presumably it should also be possible to form a W3W address from lat+lon.

jpickup commented 1 month ago

A minor update made which is actually the opposite of what you requested: if you don't supply the w3w string but do include lat & lon then you'll still get a w3w link, so it's no longer necessary to do both.

I still need to see if I can make API calls to W3W for the original requirement, which is to get lat & lon from a w3w string.

IanDitchfield2 commented 1 month ago

I think you'll need the to convert W3W ref to GPS in order to get the Google map link to work. Streetmap on the other hand will take a W3W ref - in fact I normally use Streetmap rather than W3W itself when I want to convert a W3W ref.

jpickup commented 1 month ago

This is annoying! There is a W3W API that's really easy to use, but it costs £7.99/month, see https://accounts.what3words.com/select-plan The free license one can do latlon -> w3w but not the other way around.

IanDitchfield2 commented 1 month ago

Not worth the money for us. Is there a Streetmap API that will do the job?

jpickup commented 1 month ago

I can't find any API on streetmap (only openstreetmap, but that's a different thing altogether)

IanDitchfield2 commented 1 month ago

Ah well, not to worry. It would only have been a minor convenience.