I'm trying to develop a web page that finds the users position and displays it on a map. I can find the position, but for some reason I always get the same error.

06-04 14:04:19.186: E/Web Console(6630): Uncaught TypeError: Cannot read property 'LatLng' of undefined at file:///android_asset/www/GPSTraker.html:44
function initialize()
	x = document.getElementById("trackLocs");
	latlng = new google.maps.LatLng(0.0, 0.0);
	if (navigator.geolocation)
		x.innerHTML="Geolocation is not supported by this browser.";

function showPosition(position)
	x.innerHTML="Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude;
	latlng = new google.map.LatLng( position.coords.latitude,  position.coords.longitude);
	return latlng;

function loadMap(latlng)
	var mapProp = { center:latlng, zoom:5,  mapTypeId:google.maps.MapTypeId.ROADMAP };		
	var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);	
	var marker = new google.maps.Marker({
    				position: latlng, 
   					map: map,
    				title:"Your Location"
What I want to do is return the value of latlng, but instead I get the above error. Any ideas? Also Line 44 is the line in bold.