You nailed it.
I might be wrong, but from my observations, displayName is just the one of the localeN fields (where N=1..4) taken from the 1st subsection (or viceversa). I have in front of my eyes the source page of TWC from when the adminDistrict from the 1st subsection was null:jsmorley wrote: ↑February 20th, 2020, 2:10 pmdisplayName is just one thing and is ALWAYS there. After that adminDistrict is the "state or region", and that will presumably always be a logical match with displayName, and will presumably always be there. Same is true for country. I don't get, and don't trust, city in this case. I feel that displayName logically replaces and is better than that. So really it's just latitude / longitude that is the sticking point.
Code: Select all
"Location": {
"language:en-GB:locationType:locid:locid:ROXX4613:1:RO": {
"loading":false,
"loaded":true,
"data": {
"location": {
"latitude":47.95,
"longitude":26.4,
"city":null,
"locale": {
"locale1": null, "locale2": "Dorohoi", "locale3": null, "locale4": null
}
,
"neighborhood":null,
"adminDistrict":null,
"adminDistrictCode":null,
"postalCode":"715200",
"postalKey":"715200:RO",
"country":"Romania",
"countryCode":"RO",
"ianaTimeZone":"Europe\u002FBucharest",
"displayName":"Dorohoi",
"dstEnd":"2019-10-27T04:00:00+0200",
"dstStart":"2020-03-29T03:00:00+0300",
"dmaCd":null,
"placeId":"308812117dc37d5579836cb12451d875f7d56d0f6110b0039d6f7dd92ca06004",
"disputedArea":false,
"canonicalCityId":"de6a0e21dc1d414329278dfa9961435380b25b76a2cfeb7b7b6156364e9afcbb",
"countyId":null,
"locId":"47.950\u002F26.400:29:RO",
"locationCategory":null,
"pollenId":null,
"pwsId":null,
"regionalSatellite":"eur",
"tideId":null,
"type":"locid",
"zoneId":"RO005"
}
}
,
"ttl":86400,
"date":1580559384000
}
,
"canonicalCityId:de6a0e21dc1d414329278dfa9961435380b25b76a2cfeb7b7b6156364e9afcbb:language:en-GB": {
"loading":false,
"loaded":true,
"data": {
"location": {
"latitude":47.96,
"longitude":26.4,
"city":"Dorohoi",
"locale": {
"locale1": null, "locale2": "Dorohoi", "locale3": null, "locale4": null
}
,
"neighborhood":null,
"adminDistrict":"Botoșani County",
"adminDistrictCode":null,
"postalCode":"715200",
"postalKey":"715200:RO",
"country":"Romania",
"countryCode":"RO",
"ianaTimeZone":"Europe\u002FBucharest",
"displayName":"Dorohoi",
"dstEnd":"2019-10-27T04:00:00+0200",
"dstStart":"2020-03-29T03:00:00+0300",
"dmaCd":null,
"placeId":"15bc0d7380e2eb48a62bf7775bf74c3d5e7239934fd863d0827a029a5433f320",
"disputedArea":false,
"canonicalCityId":"de6a0e21dc1d414329278dfa9961435380b25b76a2cfeb7b7b6156364e9afcbb",
"countyId":null,
"locId":null,
"locationCategory":null,
"pollenId":null,
"pwsId":null,
"regionalSatellite":"eur",
"tideId":null,
"type":"city",
"zoneId":"RO005"
}
}
,
"ttl":86400,
"date":1580559385000
}
}
,
Code: Select all
<h1 class="h4 today_nowcard-location" className="h4 today_nowcard-location">Dorohoi, Romania<span ...
By the way, when adminDistrict was missing from the 1st subsection, I was using the "old" ROXX4613:1:RO code, while for instances that adminDistrict was present in the 1st subsection, I used the "new" long 15bc0d7380e2eb48a62bf7775bf74c3d5e7239934fd863d0827a029a5433f320 code. I don't know if that's a rule, but worth mentioning anyway.