Skip to content

Allow import from Google Takeout JSON#338

Merged
tacruc merged 12 commits into
nextcloud:masterfrom
simonspa:import_json
May 12, 2020
Merged

Allow import from Google Takeout JSON#338
tacruc merged 12 commits into
nextcloud:masterfrom
simonspa:import_json

Conversation

@simonspa

Copy link
Copy Markdown
Contributor

This PR allows to import favorites from a JSON file generated by Google Maps Takeout (Saved Places) and is a first step towards solving #66.

I'd be happy to receive some feedback and advice, especially on how to treat error conditions.

Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Simon Spannagel added 4 commits March 21, 2020 17:59
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
Signed-off-by: Simon Spannagel <simonspa@kth.se>
@jancborchardt

Copy link
Copy Markdown
Member

@smihael @HollowedEmpire @ph00lt0 @walley @Thovi98 since you were active on "Import Google Takeout Saved places #66", could you review this pull request and test if it works? Thanks a lot! :)

@Thovi98

Thovi98 commented May 2, 2020

Copy link
Copy Markdown

@smihael @HollowedEmpire @ph00lt0 @walley @Thovi98 since you were active on "Import Google Takeout Saved places #66", could you review this pull request and test if it works? Thanks a lot! :)

Thank you for your great work ! I’d be glad to help you, but I don’t know how to proceed to do this (I’m on Nextcloud on Yunohost, so path files are different).
And in my way to put Google out of my life, I’ve deleted all my maps saved places and history, so I could not help you for this point anymore :(

But thank you a lot for everything you do day by day to improve this - already incredible - app !
I will try to help you to test other PR when I have a better comprehension of this.

@ph00lt0

ph00lt0 commented May 2, 2020

Copy link
Copy Markdown

I have installed the changes, but I am not able to select the json.

@simonspa

simonspa commented May 2, 2020

Copy link
Copy Markdown
Contributor Author

Have you recompiled the JavaScript?

@ph00lt0

ph00lt0 commented May 2, 2020

Copy link
Copy Markdown

Yeah I did execute the make command, however that did not help. I fully deleted the app and reinstalled it and then it worked.
Update: i just saw that the counter is on 255 locations. However I imported 253 locations in total.

@ph00lt0 ph00lt0 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will approve it, since I think that the issue i had might be due to my setup. The locations seem to be imported correctly. Although I am still wondering what did add 2 more locations.

@simonspa

simonspa commented May 3, 2020

Copy link
Copy Markdown
Contributor Author

Hm, that's odd looking at the code I have no idea where counting could go wrong. Are you sure you only had 253 locations in your JSON? Would you mind sharing it (privately) with me?

@ph00lt0

ph00lt0 commented May 3, 2020

Copy link
Copy Markdown

I also couldnt not find any evidence that this would be cause by your contribution. I am not willing share the file as this includes to much information.

@simonspa

simonspa commented May 3, 2020

Copy link
Copy Markdown
Contributor Author

Sure, that's what I presumed - it's why we want to move it away from Google in the first place, no? :)

@ph00lt0

ph00lt0 commented May 3, 2020

Copy link
Copy Markdown

Yep, well I did leave google behind some time ago. I still hoped for a import function in Nextcloud of my data export. So thanks a lot for your effort.

@jancborchardt

Copy link
Copy Markdown
Member

@simonspa I hope to test this soon (although I have no Google Takeout content so I can only test the interface), any screenshots would help a lot to review the design quicker. :)

@simonspa

simonspa commented May 3, 2020

Copy link
Copy Markdown
Contributor Author

Hi @jancborchardt

here you go:

image

image

image

A JSON file with reference data as returned by Google Takeout can be found in the linked issue.

@ph00lt0

ph00lt0 commented May 3, 2020

Copy link
Copy Markdown

The json data looks like this @jancborchardt

{ "type" : "FeatureCollection", "features" : [ { "geometry" : { "coordinates" : [ 4.895168, 52.370216 ], "type" : "Point" }, "properties" : { "Google Maps URL" : "http://maps.google.com/?q=Amsterdam,+Nederland&ftid=0x47c63fb5949a7755:0x6600fd4cb7c0af8d", "Location" : { "Latitude" : "52.370216", "Longitude" : "4.895168" }, "Published" : "2018-02-01T12:00:51Z", "Title" : "Amsterdam, Nederland", "Updated" : "2018-02-01T12:00:51Z" }, "type" : "Feature" } ] }

@jancborchardt

Copy link
Copy Markdown
Member

Ah perfect! Only 1 thing: Could you adjust the title to clarify GeoJSON like: GeoJSON (Google Maps), then it’s clear we can also import from Google Maps. :)

Signed-off-by: Simon Spannagel <simonspa@kth.se>
@simonspa

simonspa commented May 3, 2020

Copy link
Copy Markdown
Contributor Author

Updated:

image

@jancborchardt jancborchardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 design-wise! :)

Yes the title of the modal looks very crowded now, but at least gives all info and I’m not sure how to do this better at the moment.

@jancborchardt

Copy link
Copy Markdown
Member

Btw @simonspa @ph00lt0 we have a Maps team channel on our Nextcloud Talk instance – I can add you there with guest accounts if you like? It makes communication much easier. :)

@ph00lt0

ph00lt0 commented May 6, 2020

Copy link
Copy Markdown

@jancborchardt sure fine with me.

@simonspa

simonspa commented May 7, 2020

Copy link
Copy Markdown
Contributor Author

@jancborchardt yes, please do so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import Google Takeout Saved places

5 participants