I want to get clicked point's coordinates. However I get "undefined" string.
The code is below
kmlLayer.addListener("click", (kmlEvent) => {
const text = kmlEvent.featureData.coordinates;
window.alert(text);
});
And my .kml file sample:
<Placemark>
<name>AYRANCI MAHALLESİ</name>
<description>DİKMEN CAD. UÇARLI SOKAK CEMAL SÜREYA PARKI 2 ADET GERİ DÖNÜŞÜM KUMBARASI</description>
<styleUrl>#icon-165</styleUrl>
<Point>
<coordinates>
32.8466184,39.9044488,0
</coordinates>
</Point>
</Placemark>
I can get the description of placemark but could not get the coordinates.