Google Driving Simulator to SS2 Murni

29 06 2009

Google Earth: Driving Simulator to SS2 Murni

Google’s map has one of the most detailed maps for Malaysia. Therefore, it is natural for most developers here to choose Google maps for creating Geographical Information Systems (GIS).

Last week, I had the chance to play around with the Google Driving Simulator API. The result of this is a simple driving simulator to SS2 Murni, a famous hangout spot at night at Petaling Jaya SS2 for special mamak food and drinks. By using this API, I could now direct people without GPS devices on how to get to anywhere I would like to point them to easily, with visual driving guidance as well.

Using this API will just require some basic knowledge in HTML and Javascript.You can get the entire set of script here from my Skydrive page and modify as you wish. I have already modified this page from the original code to make it easier for you to use.

To modify the destination, just go to the MurniDirection.htm file and change the value of the input tag at the bottom of the file from:

<input id="to" type="hidden" value="3° 7'12.40&#148N, 101°37'20.49&#148E"/>


<input id="to" type="hidden" value="Your destination" />

3° 7’12.40”N, 101°37’20.49”E” represents Murni’s coordinate in GPS latitude and longitude, so do not get confused. You may also put in any GPS coordinates that you like but please ensure that you replace the character with &#148.

If you would like to use this sample on your website, you must first register for an API key from Google which is available at All clients must have the Google Earth plug-in, which you will be prompted to install if you do not have it before viewing the simulation.

To run my sample, just key in your location in name under the Directions section, e.g. Bangsar, Section 17 Petaling Jaya, Kuala Lumpur KLCC and press on the “Go!” button to get the directions. Once you are done, simply click on the “Start” button under the Simulator section to start the driving simulation. You should then see a car driving from your typed location to SS2 Murni Restaurant both on the satellite map in 3D and the 2D map.

Directions from KLCC, Kuala Lumpur to Murni, SS2 Petaling Jaya

Directions from KLCC, Kuala Lumpur to Murni, SS2 Petaling Jaya

That was pretty simple and cool eh? I managed to finish everything including the modification within 20 minutes only, so I guess it shouldn’t be too complex for anyone to use. Start developing your own driving simulator today!

Source code – (61kb)