@ 2018-10-17T04:04:41Z <?php
$json = '{
"Response": {
"MetaInfo": {
"Timestamp": "2018-10-17T03:35:57.353+0000"
},
"View": [
{
"_type": "SearchResultsViewType",
"ViewId": 0,
"Result": [
{
"Relevance": 1,
"MatchLevel": "houseNumber",
"MatchQuality": {
"Country": 1,
"State": 1,
"City": 1,
"Street": [
1
],
"HouseNumber": 1
},
"MatchType": "pointAddress",
"Location": {
"LocationId": "NT_ySMW7zgrnTcVMzktS0t7FC_xkzM",
"LocationType": "point",
"DisplayPosition": {
"Latitude": -23.46615,
"Longitude": -46.42356
},
"NavigationPosition": [
{
"Latitude": -23.4662,
"Longitude": -46.42354
}
],
"MapView": {
"TopLeft": {
"Latitude": -23.4650258,
"Longitude": -46.4247855
},
"BottomRight": {
"Latitude": -23.4672742,
"Longitude": -46.4223345
}
},
"Address": {
"Label": "Rua Canapi, 193, Pimentas, Guarulhos - SP, 07272-060, Brasil",
"Country": "BRA",
"State": "SP",
"City": "Guarulhos",
"District": "Pimentas",
"Street": "Rua Canapi",
"HouseNumber": "193",
"PostalCode": "07272-060",
"AdditionalData": [
{
"value": "Brasil",
"key": "CountryName"
},
{
"value": "São Paulo",
"key": "StateName"
}
]
}
}
}
]
}
]
}
}';
$obj = json_decode($json);
echo "Display Position Latitude: " , $obj->Response->View[0]->Result[0]->Location->DisplayPosition->Latitude;
echo "\nDisplay Position Longitude: " , $obj->Response->View[0]->Result[0]->Location->DisplayPosition->Longitude;
echo "\nNavigation Position Latitude: " , $obj->Response->View[0]->Result[0]->Location->NavigationPosition[0]->Latitude;
echo "\nNavigation Position Longitude: " , $obj->Response->View[0]->Result[0]->Location->NavigationPosition[0]->Longitude;
echo "\nMap View Top Left Latitude: " , $obj->Response->View[0]->Result[0]->Location->MapView->TopLeft->Latitude;
echo "\nMap View Top Left Longitude: " , $obj->Response->View[0]->Result[0]->Location->MapView->TopLeft->Longitude;
echo "\nMap View Bottom Right Latitude: " , $obj->Response->View[0]->Result[0]->Location->MapView->BottomRight->Latitude;
echo "\nMap View Bottom Right Longitude: " , $obj->Response->View[0]->Result[0]->Location->MapView->BottomRight->Longitude;
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.33 , 8.2.0 - 8.2.29 , 8.3.0 - 8.3.26 , 8.4.1 - 8.4.13 Display Position Latitude: -23.46615
Display Position Longitude: -46.42356
Navigation Position Latitude: -23.4662
Navigation Position Longitude: -46.42354
Map View Top Left Latitude: -23.4650258
Map View Top Left Longitude: -46.4247855
Map View Bottom Right Latitude: -23.4672742
Map View Bottom Right Longitude: -46.4223345 preferences:dark mode live preview ace vim emacs key bindings
148.27 ms | 409 KiB | 5 Q