ho risolto dichiarando un altra variabile dentro la funzione di generazione delle coordinate lgn e ltn vi posto la soluzione:
codice:
function initialize() {
var mapOptions = {
zoom: 6,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map_canvas'),
mapOptions);
// Try HTML5 geolocation
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var pos = new google.maps.LatLng(position.coords.latitude,
position.coords.longitude);
window.location.href = "myphpfile.php?latitudine=" + position.coords.latitude + "&long=" +position.coords.longitude ;
var infowindow = new google.maps.InfoWindow({
map: map,
position: pos,
content: 'Posizione Rilevata Tramite IP.'
});
MODIFICO IN RISOLTO.
Grazie mille sei servito come linea guida!