      positions.push(position);
                x.innerHTML = positions.map(function(position) {
                    return showPosition(position);
                }).join("\n\n");

            })
        } else {
            console.log("navigator.geolocation not available");
        }


        function showPosition(position) {
            return "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude;
        }

        function showMap(position) {
            var latlon =