ตั้งใจว่าเขียนโปรแกรมแล้วอธิบายแต่ละขั้นลงในเว็บ เพื่อที่จะได้เวลามีเด็กทำ senior project แล้วควรจะได้โปรแกรมที่ทำอะไรได้เยอะกว่านี้ จะสร้างโปรแกรมสุ่มร้านข้าว ชื่อโปรแกรมว่า กินอะไรดี(GinarraiD) โดยที่โปรแกรมจะมีการสุ่มโดยการเขย่ามือถือเพื่อเลือกร้านข้าวจากฐานข้อมูลแล้วแสดงบน google maps พร้อมบอกเส้นทางที่จะไป
สนใจว่าจะเรียกใช้แผนที่ของ Google Maps
เราต้องการที่จะนำค่าพิกัดของ GPS มาใช้งานกับ Google Maps เราต้องไปขอใช้งานแผนที่จาก Google ก่อน โดยเราจะไปสร้าง key ของ Google Maps API จากนั้นค่อยนำมาใช้กับโปรแกรมของเรา
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-canvas { height: 100% }
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=API_KEY&sensor=SET_TO_TRUE_OR_FALSE"></script>
<script type="text/javascript">
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8
};
var map = new google.maps.Map(document.getElementById("map-canvas"),
mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"/>
</body>
</html>