Hello
You can find marker using below code, you have to include google map js, jquery js.
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script src="../js/jquery-1.4.2.min.js">
</script>
<script>
var map;
var nav = [];
$(document).ready(function(){
init();
$.get("kml.xml", function(data){
html = "";
$(data).find("Placemark").each(function(index, value){
coords = $(this).find("coordinates").text();
place = $(this).find("name").text();
c = coords.split(",")
nav.push({
"place": place,
"lat": c[0],
"lng": c[1]
})
html += "<ul><li>" + place + "</li></ul>";
})
$(".navigation").append(html);
$(".navigation li").bind("click", function(){
panToPoint = new google.maps.LatLng(nav[$(this).index()].lng, nav[$(this).index()].lat)
map.panTo(panToPoint);
})
});
function init(){
var latlng = new google.maps.LatLng(-43.552965, 172.47315);
var myOptions = {
zoom: 10,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map"), myOptions);
}
})
</script>
Html Code
<div id="map" style="width:600px;height: 600px;">
</div>
<ul class="navigation">
</ul>