J'essaie d'analyser une géolocalisation inversée à l'aide de Bing Maps.JSON Analyse syntaxique Bing Maps Réponse
http://www.microsoft.com/maps/isdk/ajax/ trouver des informations> Inverse Trouver
Si vous regardez le code, lorsque vous regardez une adresse, vous obtenez ce retour
function _f1300044038369() {
return {
"d": {
"__type": "Microsoft.VirtualEarth.Engines.Core.Geocoding.ReverseGeocodeResponse",
"Results": [{
"Name": "SW 35th Ave, Tualatin, OR 97062",
"Type": 0,
"BestLocation": {
"Precision": 0,
"Coordinates": {
"Latitude": 45.378872752189636,
"Longitude": -122.71288096904755
}
},
"Locations": [{
"Precision": 0,
"Coordinates": {
"Latitude": 45.378872752189636,
"Longitude": -122.71288096904755
}
}],
"BestView": {
"NorthEastCorner": {
"Latitude": 45.382735469760313,
"Longitude": -122.70554921472814
},
"SouthWestCorner": {
"Latitude": 45.37501003461896,
"Longitude": -122.72021272336696
},
"Type": 0,
"Center": {
"Latitude": 45.378872884129805,
"Longitude": -122.71288096904755
}
},
"Shape": null,
"Address": {
"AddressLine": "SW 35th Ave",
"Locality": "Tualatin",
"PostalTown": "",
"District": "",
"AdminDistrict": "OR",
"PostalCode": "97062",
"CountryRegion": "United States",
"FormattedAddress": "SW 35th Ave, Tualatin, OR 97062"
},
"CountryRegion": 244,
"MatchConfidence": 1,
"MatchCode": 1
}],
"ResponseSummary": {
"Copyright": "Copyright © 2011 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
"StatusCode": 0,
"AuthResultCode": 0,
"ErrorMessage": null,
"TraceId": "dc1c3b20-6345-484c-9662-4df504d8977e|SN1M001054"
}
}
}.d;
}
if (typeof closeDependency !== 'undefined') {
closeDependency('1300044038369');
}
Le code que j'utilise actuellement parse le « Nom » dans ses sections afin que je puisse l'utiliser ailleurs. Je veux changer le code ci-dessus pour utiliser la section qui a déjà la ligne d'adresse, l'emplacement, le post-poste, etc.
Obtenir les valeurs NULL – BlindingDawn
appelez-vous comme 'GetResults (_f1300044038369())'? Si oui, vous devez faire 'GetResults (_f1300044038369(). Résultats)'. Si vous faites cela, ce n'est pas indéfini - voir ce violon si vous devez http://jsfiddle.net/idbentley/G2Pkk/ – idbentley
Je l'appelais comme Microsoft l'a dans le lien ci-dessus. http://www.microsoft.com/maps/isdk/ajax/ Rechercher des informations> Inverser Rechercher – BlindingDawn