Note that there are some explanatory texts on larger screens.

plurals
  1. POError in getting Xml data from GoogleMapsAPI with Jquery
    primarykey
    data
    text
    <p><strong>Check this code</strong> </p> <p>//using the url: <a href="http://maps.googleapis.com/maps/api/geocode/xml?address=chennai&amp;sensor=false" rel="nofollow">which fetches the xml data find the link here</a></p> <p>−</p> <pre><code>&lt;GeocodeResponse&gt; &lt;status&gt;OK&lt;/status&gt; − &lt;result&gt; &lt;type&gt;locality&lt;/type&gt; &lt;type&gt;political&lt;/type&gt; &lt;formatted_address&gt;Chennai, Tamil Nadu, India&lt;/formatted_address&gt; − &lt;address_component&gt; &lt;long_name&gt;Chennai&lt;/long_name&gt; &lt;short_name&gt;Chennai&lt;/short_name&gt; &lt;type&gt;locality&lt;/type&gt; &lt;type&gt;political&lt;/type&gt; &lt;/address_component&gt; − &lt;address_component&gt; &lt;long_name&gt;Chennai&lt;/long_name&gt; &lt;short_name&gt;Chennai&lt;/short_name&gt; &lt;type&gt;administrative_area_level_2&lt;/type&gt; &lt;type&gt;political&lt;/type&gt; &lt;/address_component&gt; − &lt;address_component&gt; &lt;long_name&gt;Tamil Nadu&lt;/long_name&gt; &lt;short_name&gt;TN&lt;/short_name&gt; &lt;type&gt;administrative_area_level_1&lt;/type&gt; &lt;type&gt;political&lt;/type&gt; &lt;/address_component&gt; − &lt;address_component&gt; &lt;long_name&gt;India&lt;/long_name&gt; &lt;short_name&gt;IN&lt;/short_name&gt; &lt;type&gt;country&lt;/type&gt; &lt;type&gt;political&lt;/type&gt; &lt;/address_component&gt; − &lt;geometry&gt; − &lt;location&gt; &lt;lat&gt;13.0604220&lt;/lat&gt; &lt;lng&gt;80.2495830&lt;/lng&gt; &lt;/location&gt; &lt;location_type&gt;APPROXIMATE&lt;/location_type&gt; − &lt;viewport&gt; − &lt;southwest&gt; &lt;lat&gt;12.9734519&lt;/lat&gt; &lt;lng&gt;80.1215236&lt;/lng&gt; &lt;/southwest&gt; − &lt;northeast&gt; &lt;lat&gt;13.1473615&lt;/lat&gt; &lt;lng&gt;80.3776424&lt;/lng&gt; &lt;/northeast&gt; &lt;/viewport&gt; − &lt;bounds&gt; − &lt;southwest&gt; &lt;lat&gt;12.9459267&lt;/lat&gt; &lt;lng&gt;80.1487827&lt;/lng&gt; &lt;/southwest&gt; − &lt;northeast&gt; &lt;lat&gt;13.2340851&lt;/lat&gt; &lt;lng&gt;80.3322913&lt;/lng&gt; &lt;/northeast&gt; &lt;/bounds&gt; &lt;/geometry&gt; &lt;/result&gt; &lt;/GeocodeResponse&gt; </code></pre> <p>*<em>In this following code ,unable to get the total no of nodes from google map, Can you please fetch the results *</em></p> <pre><code>$.ajax({ type: "post", url: "http://maps.googleapis.com/maps/api/geocode/xml?address=chennai&amp;sensor=false", dataType: "xml", success : function(xmlData){ var totalNodes = $('*',xmlData).length; // count XML nodes alert("This XML file has " + totalNodes); }, error : function(){ alert("Could not retrieve XML file."); } }); </code></pre> <p>//the output will be This XML file has 20 or more nodes</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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