Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I often use the <a href="http://msdn.microsoft.com/en-us/library/ff701714.aspx" rel="nofollow">Bing Maps Rest APIs</a>. You can geo-code using requests like the following:</p> <pre><code>http://dev.virtualearth.net/REST/v1/Locations/CA/adminDistrict/postalCode/locality/addressLine?includeNeighborhood=includeNeighborhood&amp;key=BingMapsKey </code></pre> <p>You can see it in use in a <a href="http://www.codeproject.com/KB/silverlight/ExploringRx.aspx#pushing" rel="nofollow">codeproject article I wrote on reactive extensions</a>.</p> <p>For example, your address: </p> <pre><code>http://dev.virtualearth.net/REST/v1/Locations/US/1125%20E.%20102nd%20Street,%20Los%20Angeles,%20CA?key=Ai9-KNy6Al-r_ueyLuLXFYB_GlPl-c-_iYtu16byW86qBx9uGbsdJpwvrP4ZUdgD </code></pre> <p>Gives the following response:</p> <pre><code>{ "authenticationResultCode":"ValidCredentials", "brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png", "copyright":"Copyright © 2012 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.", "resourceSets":[ { "estimatedTotal":1, "resources":[ { "__type":"Location:http:\/\/schemas.microsoft.com\/search\/local\/ws\/rest\/v1", "bbox":[ 33.940492293415652, -118.26180800227225, 33.948217728557005, -118.24939194889963 ], "name":"1125 E 102ND St, Los Angeles, CA 90002", "point":{ "type":"Point", "coordinates":[ 33.944355010986328, -118.25559997558594 ] }, "address":{ "addressLine":"1125 E 102ND St", "adminDistrict":"CA", "adminDistrict2":"Los Angeles Co.", "countryRegion":"United States", "formattedAddress":"1125 E 102ND St, Los Angeles, CA 90002", "locality":"Los Angeles", "postalCode":"90002" }, "confidence":"High", "entityType":"Address", "geocodePoints":[ { "type":"Point", "coordinates":[ 33.944355010986328, -118.25559997558594 ], "calculationMethod":"Parcel", "usageTypes":[ "Display" ] }, { "type":"Point", "coordinates":[ 33.944118499755859, -118.25559997558594 ], "calculationMethod":"Interpolation", "usageTypes":[ "Route" ] } ], "matchCodes":[ "Good" ] } ] } ], "statusCode":200, "statusDescription":"OK", "traceId":"81518ba504a3494bb0b62bdb6aa4b291|LTSM002104|02.00.83.500|LTSMSNVM001473, LTSMSNVM001463, LTSMSNVM001452, LTSMSNVM001851, LTSMSNVM001458, LTSMSNVM001462" } </code></pre> <p>Or ... for XML data, add <code>o=xml</code>:</p> <pre><code>http://dev.virtualearth.net/REST/v1/Locations/US/1125%20E.%20102nd%20Street,%20Los%20Angeles,%20CA?o=xml&amp;key=Ai9-KNy6Al-r_ueyLuLXFYB_GlPl-c-_iYtu16byW86qBx9uGbsdJpwvrP4ZUdgD </code></pre> <p>Which gives:</p> <pre><code>&lt;Response&gt; &lt;Copyright&gt;Copyright ? 2012 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.&lt;/Copyright&gt; &lt;BrandLogoUri&gt;http://dev.virtualearth.net/Branding/logo_powered_by.png&lt;/BrandLogoUri&gt; &lt;StatusCode&gt;200&lt;/StatusCode&gt; &lt;StatusDescription&gt;OK&lt;/StatusDescription&gt; &lt;AuthenticationResultCode&gt;ValidCredentials&lt;/AuthenticationResultCode&gt; &lt;TraceId&gt;b9af8a6b058b455ca9c368b9e32142fe|LTSM002102|02.00.83.500|LTSMSNVM002001, LTSMSNVM001464, LTSMSNVM001451, LTSMSNVM001452, LTSMSNVM001457, LTSMSNVM002052, LTSMSNVM001461&lt;/TraceId&gt; &lt;ResourceSets&gt; &lt;ResourceSet&gt; &lt;EstimatedTotal&gt;1&lt;/EstimatedTotal&gt; &lt;Resources&gt; &lt;Location&gt; &lt;Name&gt;1125 E 102ND St, Los Angeles, CA 90002&lt;/Name&gt; &lt;Point&gt; &lt;Latitude&gt;33.944355010986328&lt;/Latitude&gt; &lt;Longitude&gt;-118.25559997558594&lt;/Longitude&gt; &lt;/Point&gt; &lt;BoundingBox&gt; &lt;SouthLatitude&gt;33.940492293415652&lt;/SouthLatitude&gt; &lt;WestLongitude&gt;-118.26180800227225&lt;/WestLongitude&gt; &lt;NorthLatitude&gt;33.948217728557005&lt;/NorthLatitude&gt; &lt;EastLongitude&gt;-118.24939194889963&lt;/EastLongitude&gt; &lt;/BoundingBox&gt; &lt;EntityType&gt;Address&lt;/EntityType&gt; &lt;Address&gt; &lt;AddressLine&gt;1125 E 102ND St&lt;/AddressLine&gt; &lt;AdminDistrict&gt;CA&lt;/AdminDistrict&gt; &lt;AdminDistrict2&gt;Los Angeles Co.&lt;/AdminDistrict2&gt; &lt;CountryRegion&gt;United States&lt;/CountryRegion&gt; &lt;FormattedAddress&gt;1125 E 102ND St, Los Angeles, CA 90002&lt;/FormattedAddress&gt; &lt;Locality&gt;Los Angeles&lt;/Locality&gt; &lt;PostalCode&gt;90002&lt;/PostalCode&gt; &lt;/Address&gt; &lt;Confidence&gt;High&lt;/Confidence&gt; &lt;MatchCode&gt;Good&lt;/MatchCode&gt; &lt;GeocodePoint&gt; &lt;Latitude&gt;33.944355010986328&lt;/Latitude&gt; &lt;Longitude&gt;-118.25559997558594&lt;/Longitude&gt; &lt;CalculationMethod&gt;Parcel&lt;/CalculationMethod&gt; &lt;UsageType&gt;Display&lt;/UsageType&gt; &lt;/GeocodePoint&gt; &lt;GeocodePoint&gt; &lt;Latitude&gt;33.944118499755859&lt;/Latitude&gt; &lt;Longitude&gt;-118.25559997558594&lt;/Longitude&gt; &lt;CalculationMethod&gt;Interpolation&lt;/CalculationMethod&gt; &lt;UsageType&gt;Route&lt;/UsageType&gt; &lt;/GeocodePoint&gt; &lt;/Location&gt; &lt;/Resources&gt; &lt;/ResourceSet&gt; &lt;/ResourceSets&gt; &lt;/Response&gt; </code></pre> <p>So the lat / long for your given address is (33.9, -118.2)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload