geolocation api
とりあえずchromeとiPhoneとAndroidでjsから位置とれた
$(function(){ log('start'); start(); }); var wid = null; function start(){ if(wid != null) return; wid = navigator.geolocation.watchPosition(function(e){ var map_link = $('<a>').attr('href','http://maps.google.com/?ie=UTF8&ll='+e.coords.latitude+','+e.coords.longitude+'&z=16').html('google mapsで見る'); log($('<span>').append(e.coords.latitude+', '+e.coords.longitude+', '+e.coords.accuracy+', ').append(map_link)); }); }; function stop(){ navigator.geolocation.clearWatch(wid); wid = null; }; function log(message){ $('ol#log').append($('<li>').append(message)); };