<body onload="loaded()">
    <script>
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    }
    function showPosition(position) {
        console.log("Latitude: " + position.coords.latitude + "Longitude: " + position.coords.longitude);
    }
    function loaded() {
	if (window.opener)
            window.opener.postMessage('done', '*');
    }
    </script>
    <img src="http://127.0.0.1:8080/security/resources/compass.jpg">
</body>
