Closed michaelchin closed 1 year ago
And after you fetch data from server, save the data into local storage. we can use the data from local storage if network is not available. See the code below.
@michaelchin Which button do those locations belong to? Location widget or create a new button to handle it?
The cities should be one of the vector layers. This layer is different from other layers and need some special treatment. See the code snippets in this Issue.
From: yiyanw @.> Sent: Thursday, 29 September 2022 15:48 To: GPlates/gplates-app @.> Cc: michaelchin @.>; Mention @.> Subject: Re: [GPlates/gplates-app] Add cities (Issue #149)
@michaelchinhttps://github.com/michaelchin Which button do those locations belong to? Location widget or create a new button to handle it?
— Reply to this email directly, view it on GitHubhttps://github.com/GPlates/gplates-app/issues/149#issuecomment-1261797329, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAUQKPF3VNW7TP7DGNT5JKTWAUUSNANCNFSM6AAAAAAQYHS6NY. You are receiving this because you were mentioned.Message ID: @.***>
@michaelchin I checked the URL's data
{ "coords": { "Sydney": [151.2099, -33.8651], "Melbourne": [144.9465, -37.8409], "Perth": [115.8613, -31.9523], "Darwin": [130.8444, -12.4637], "Adelaide": [138.6007, -34.9285] }, "plate-ids": { "SETON2012": [801, 801, 801, 801, 801], "MERDITH2021": [801, 801, 801, 801, 801], "MULLER2019": [801, 801, 801, 801, 801] } }
what do "plate-ids" stand for?
@michaelchin I checked the URL's data
{ "coords": { "Sydney": [151.2099, -33.8651], "Melbourne": [144.9465, -37.8409], "Perth": [115.8613, -31.9523], "Darwin": [130.8444, -12.4637], "Adelaide": [138.6007, -34.9285] }, "plate-ids": { "SETON2012": [801, 801, 801, 801, 801], "MERDITH2021": [801, 801, 801, 801, 801], "MULLER2019": [801, 801, 801, 801, 801] } }
what do "plate-ids" stand for?
See the code below, the function takes coordinates and plate id (pid) as input parameters. You need to find plate ids according to the current model name, such as "MULLER2019".
You also need to fetch the finite rotations for the plate ids before calling the above function. See the code below.
@michaelchin I check the code in LocationWidget, I found that if I add location on "present day" raster map, the point will not move with age changing when we change to timeline-valid raster map. Is that same for cities location?
Btw, Do we need to fly to city's position when we choose it?
This is a bug in LocationWidget. I will fix it. The cities should move when the time changes.
From: yiyanw @.> Sent: Sunday, 2 October 2022 1:27 To: GPlates/gplates-app @.> Cc: michaelchin @.>; Mention @.> Subject: Re: [GPlates/gplates-app] Add cities (Issue #149)
I check the code in LocationWidget, I found that if I add location on "present day" raster map, the point will not move with age changing when we change to timeline-valid raster map. Is that same for cities location?
— Reply to this email directly, view it on GitHubhttps://github.com/GPlates/gplates-app/issues/149#issuecomment-1264398257, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAUQKPE4AEHCYRXEIHFQRWLWBBJ6JANCNFSM6AAAAAAQYHS6NY. You are receiving this because you were mentioned.Message ID: @.***>
@michaelchin ok, I will try to fix it.
@michaelchin cities added:
demo:
This is very similar to the code below.
https://github.com/GPlates/gplates-app/blob/0a4bfaee38f014511d51e1a2f05033684e431bf7/src/functions/presentDayLocations.ts#L23-L49
https://github.com/GPlates/gplates-app/blob/0a4bfaee38f014511d51e1a2f05033684e431bf7/src/components/AddLocationWidget.tsx#L146-L152