Featured Posts

Facebook Connect Facebook Connect ဘယ္လိုလုပ္မလဲ။ အရင္ဆံုး api key ရရိွေအာင္ register လုပ္ဖုိ႕ လိုအပ္ပါတယ္။ http://developers.facebook.com/connect.php မွာ...

Readmore

Read Json with Jquery Jquery မွာ json ဘယ္လို ဖတ္ရမလဲဆိုတာကို ေရးျပထားပါတယ္။ ဒီ code ကို မဖတ္ခင္ json ဆိုတာ ဘာလဲဆိုတာကိုေတာ့...

Readmore

AntiUsbHidden 1.1 အခု version မွာ autorun.inf ကိုပါ ဖ်က္ထားတယ္။ ေနာက္ျပီး coding ပိုင္းကို သပ္သပ္ရပ္ရပ္ျဖစ္ေအာင္...

Readmore

Antiusb Hidden (GUI) Antiusb Hidden ကို console နဲ႕ေရးထားျပီး အခု version က GUI နဲ႕လုပ္ထားပါတယ္။ Drive List ကို ထုတ္ထားတဲ့အဆင့္...

Readmore

Programming ေလ့လာရာဝယ္ ကိုသာသာ ေရးထားတာေလးကို အျခား programmer ေတြ developer ေတြ programming ကို ေလ့လာေနသူေတြ ဖတ္သင့္တယ္ထင္လုိ႕...

Readmore

  • Prev
  • Next

Google Map route

Posted on : 22-10-2009 | By : saturngod | In : javascript

Tags: , ,

0

Screen shot 2009-10-22 at PM 05.06.07

Google Map ကို အသံုးျပဳျပီး ဘယ္လို route လုပ္လို့ရလဲဆိုတာ ေရးထားတာပါ။

<html xmlns="http://www.w3.org/1999/xhtml"  xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>Google Maps JavaScript API Example: Simple Directions</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<script src="jquery.js"></script>
<script src="http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAAx7usLuV6Sad32xMlAFXpHhQJCBv2UIT7jRqait5DVA72by8fFxTgDNiQIRVqhNTcxCLEibS36E-Q2A"
type="text/javascript"></script>
<script type="text/javascript">
// Create a directions object and register a map and DIV to hold the
// resulting computed directions

var map;
var directionsPanel;
var directions;

function initialize() {
map = new GMap2(document.getElementById("map_canvas"));
var geocoder = new GClientGeocoder();

from="Blk 726,#03-346,Clementi West Street 2, Singapore 120729 ";
to="8 Prince George's Park Singapore 118407";

//  map.setCenter(new GLatLng(42.351505,-71.094455), 15);
directionsPanel = document.getElementById("route");
directions = new GDirections(map, directionsPanel);
directions.load("from: "+from+" to: "+to);
}
</script>
</head>

<body >

<div id="map_canvas" style="width: 70%; height: 480px; float:left; border: 1px solid black;"></div>
<div id="route" style="width: 25%; height:480px; float:right; border; 1px solid black;"></div>

<br/>
</body>
</html>

Related Post

  • No Related Post

Write a comment