UCL / kapta-mobile

Progressive Web App enabling users to generate maps from WhatsApp chats
Apache License 2.0
0 stars 1 forks source link

Upload/open geojson files #36

Open MarcosMoreu opened 1 month ago

MarcosMoreu commented 1 month ago

Allow users to upload/open geojson files (or .txt files which actually geojson), so any Kapta user can visualise a map data file exported with Kapta without the need of being in the WhatsApp group to export it

acholyn commented 3 weeks ago

do you have a sample file you could share for testing?

acholyn commented 1 week ago

users can upload a .geojson file and it should be parsed correctly, we probably need to add a check for the .txt files to see if they have whatsapp data or just geojson and then direct it to the correct function

tcouch commented 4 days ago

So, maybe wrap JSON.parse(file_contents) in a try block and if it fails assume it's a chat? Probably better to go a step further an write a simple geojson schema validator. Maybe such a thing already exists?