Advertisement
yuch4n

逆ジオコーディング (Tasker)

Aug 7th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var loc=global('LOC');
  2. var lat=loc.split(',')[0];
  3. var lon=loc.split(',')[1];
  4. $.ajax({
  5.   type:'GET',
  6.   dataType:'jsonp',
  7.   jsonpCallback:'caller',
  8.   url:"https://www.finds.jp/ws/rgeocode.php?jsonp=caller&lat="+lat+"&lon="+lon,
  9.   success:function(data,status,xhr)
  10.     {
  11.       var r=data.result
  12.       flash(
  13.         r.prefecture.pname+
  14.         r.municipality.mname+
  15.         r.local[0].section+
  16.         r.local[0].homenumber
  17.       )
  18.   },
  19.   error:function(xhr,stat,err){flash('error',err)},
  20.   complete:function(){exit()}
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement