//this file is used to display a single property
var oMap;

function MappingGoogle_OnLoad(){
	if ( GBrowserIsCompatible() ){
	
		var ipropertylatitude = HttpManager.Document.GetObject("txtproperty_latitude").value;
		var ipropertylongitude = HttpManager.Document.GetObject("txtproperty_longitude").value;
	
		oMap = new GMap(HttpManager.Document.GetObject("pnlGoogleMap"));
		oMap.addControl(new GSmallMapControl());
		oMap.addControl(new GMapTypeControl());
		oMap.centerAndZoom(new GPoint(-2.0015, 53.4967),11);
		
		var oPropertyIcon = new GIcon();
		oPropertyIcon.image = "images/icons/map_house.gif";
		oPropertyIcon.iconSize = new GSize(30,30);
		oPropertyIcon.iconAnchor = new GPoint(1,1);
		oPropertyIcon.iconWindowAnchor = new GPoint(5,1);
		//append the icon to the map
		var oPropertyPoint = new GPoint(ipropertylongitude, ipropertylatitude);
		
		var oMarker = new GMarker(oPropertyPoint);
		oMap.addOverlay( oMarker );
		
		//var response = GoogleMappingSearchResults.GetPointerBriefDetails(HttpManager.Request.QueryString("id"));
		//oMarker.openInfoWindowHtml( response.value );
		
		oMap.setCenter(new GLatLng(ipropertylatitude, ipropertylongitude),15);
		
	}
}
