title: Get Custom Attributes values from a .kml file using google map api
body: <p>I am using google map API to display .kml file  as map.I want to get all elements value that we assigned into the .kml file as an alert. I am trying the following way , </p>
  
  <pre><code>  kmlLayer.addListener('click', function(event) {
  
        alert(event.featureData.pid); 
        map.setCenter(event.latLng);
        map.setZoom(20);   
        var content = event.featureData.infoWindowHtml;
        var testimonial = document.getElementById('capture');
        testimonial.innerHTML = content;
         $('#myModal').modal('show');
  
      });
  </code></pre>
  
  <p>But i am getting the alert as "Undefined" . Here pid is the element which i specified in that .kml file. That means , </p>
  
  <pre><code>&lt;Placemark id="ID_00000"&gt;
   **&lt;pid&gt;2&lt;/pid&gt;**
   &lt;name&gt;PARK&lt;/name&gt;
   &lt;description&gt;This is Sample Description&lt;/description&gt;
   &lt;coordinates&gt; ..... &lt;/coordinates&gt; .......
  </code></pre>
  
  <p>Please help me to solve  this issues.</p>