รายละเอียดของการตอบ ::
ดูแล้วค่าที่รับมากถูกต้องค่ะ แต่ไม่เข้าใจว่าทำไมเวลาที่ใส่ Response.Write(myDr("Latitude")) เข้าไปจะไม่แสดงจุดที่ mark แต่ถ้าใส่เป็นตัวเลข เช่น 7.040712200000000 จะแสดงผลถูกต้องค่ะ
โค้ดที่ดูจากหน้าเว็บออกมาแบบนี้ค้ะ
Code
<script type="text/javascript">
var locations = [
['<div class="font_map"><img src=images/2.png width=75 height=75 class="img_left" alt="ตลาดหนองครก" />สวนสาธารณะเทศบาลนครหาดใหญ่<br>ต.คอหงส์ อ.หาดใหญ่ จ.สงขลา ', 7.040712200000000, 100.505005499999920, 'images/Map-Marker-Pink48.png', 1],
];
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 13,
center: new google.maps.LatLng(15.105355046221582, 104.31570053100586),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
var marker, i; for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
icon: locations[i][3]
});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})
(marker, i));
}
</script>