<p id="KUL_DENE">KULLANICI KONUMU:</p>
<button onclick="getuserLocation()"> KONUM KONTROL</button>
<div id="HAR_DENE"></div>
var x=document.getElementById("KUL_DENE");
function getuserLocation(){
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showuserPosition,showbrowserError);
x.innerHTML="TARAYICI GEOLOCATION I DESTEKLEMIYOR";
function showuserPosition(position) {
var latlon=position.coords.latitude+","+position.coords.longitude;
var img_url="http://maps.googleapis.com/maps/api/staticmap?center="
+latlon+"&zoom=14&size=400x300&sensor=false";
document.getElementById("HAR_DENE").innerHTML="<img src='"+img_url+"'>";
function showbrowserError(error){
case error.PERMISSION_DENIED:
x.innerHTML="KULLANICI GEOLOCATION TALEBINI REDDETTI"
case error.POSITION_UNAVAILABLE:
x.innerHTML="KONUM BILGISI YOK"
x.innerHTML="ZAMAN ASIMI"
case error.UNKNOWN_ERROR:
x.innerHTML="BILINMEYEN HATA"