record_the_route

URLs

Google map

Location of Fablab Kannai

https://www.google.co.jp/maps/@35.4466742,139.6379968,3a,75y,245.55h,90t/data=!3m6!1e1!3m4!1sALd5BEMfK9u85UQVY1m69Q!2e0!7i16384!8i8192

URL includes Latitude and Longitude

https://www.google.co.jp/maps/@
35.4466742      <- Latitude(緯度)
,
139.6379968     <- Longitude(経度)

,3a,75y,245.55h,90t/data=!3m6!1e1!3m4!1sALd5BEMfK9u85UQVY1m69Q!2e0!7i16384!8i8192

Google Earth (web)

Location of Vancouver

https://earth.google.com/web/@49.02021919,-122.35575111,55.00945624a,332.19906171d,35y,-93.71278808h,75.38975167t,0r
https://earth.google.com/web/@
49.02021919      <- Latitude(緯度)
,
-122.35575111    <- Longitude(経度)
,55.00945624a,332.19906171d,35y,-93.71278808h,75.38975167t,0r

Chrome

Short cut key

command + l //Jump to the address bar
command + c //Copy
command + option + right_arrow //Jump to the previous open tab (spreadsheet)

Get Latitude and Longitude

Google spreadshet

URL NCNC2NC3LatitudeLongitudedate
PASTE URL HERE =REGEXEXTRACT(A2,"(..+?[@])(..+?[,])(..+?[,)])")=SUBSTITUTE(C3,",","")=SUBSTITUTE(D3,",","")2021/06/14
https://earth.google.com/web/@35.5579311,139.77034635,4.43443482a,192.03288883d,35y,-33.48331106h,82.62728443t,-0r https://earth.google.com/web/@35.5579311,139.77034635,35.5579311139.770346352021/06/14

ref Regular Expression Extracts

Spreadsheet: stage3_Vancouver_Calgary(Yamnuska Wolfdog Sanctuary)

Yamnuska Wolfdog Sanctuary

Apps Script: macros

/** @OnlyCurrentDoc */
function update_data(){
  colA_blank_cell();
  copy_row();
  gettoday();
}


function colA_blank_cell() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sh = ss.getActiveSheet();
    var range = sh.getActiveRange();
    var last_row = sh.getRange("A:A").getValues().filter(String).length;
    sh.getRange((last_row + 1), 1).activate();
}


function copy_row() {
  var spreadsheet = SpreadsheetApp.getActive();
  var sheet = spreadsheet.getActiveSheet();
  sheet.getRange(spreadsheet.getCurrentCell().getRow(), 1, 1, sheet.getMaxColumns()).activate();
  sheet = spreadsheet.getActiveSheet();
  sheet.getRange(spreadsheet.getCurrentCell().getRow() - 1, 1, 1, sheet.getMaxColumns()).copyTo(spreadsheet.     getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
  spreadsheet.getCurrentCell().activate();

  //delete copied URL cells
    spreadsheet.getActiveRangeList().clear({contentsOnly: true, skipFilteredRows: true});
};

function gettoday() {
  var spreadsheet = SpreadsheetApp.getActive();
  var date = new Date();
  //Logger.log(Utilities.formatDate( date, 'Asia/Tokyo', 'yyyyMMdd: hhmmss'));
  var yyyy = date.getFullYear();
  var mon = date.getMonth() + 1;
  var dd = date.getDate();
  var now = yyyy+"/"+mon+"/"+dd;
  spreadsheet.getCurrentCell().offset(0, 6).activate();
  spreadsheet.getCurrentCell().setValue(now);
  // back to col-A
  spreadsheet.getCurrentCell().offset(0, -6).activate();
};