まず、GoogleMapsAPIを含めます。
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=YOUR_KEY" type="text/javascript"></script>
今
<script type="text/javascript">
var map = null;
function initialize()
{
if (GBrowserIsCompatible())
{
map = new GMap2(document.getElementById("googleMap"));
map.setUIToDefault();
}
}
// your code:
function get_location()
{
navigator.geolocation.getCurrentPosition(map);
}
function show_map(position)
{
var latitude=position.coords.latitude;
var longitude=position.coords.longitude;
map.setCenter(new GLatLng(latitude, longitude), 13);
}
</script>