Cov txheej txheem:

Yooj Yim Ntxiv Google Maps rau Koj Cov Ntawv Google Tau Txais thiab dawb: 6 Kauj Ruam
Yooj Yim Ntxiv Google Maps rau Koj Cov Ntawv Google Tau Txais thiab dawb: 6 Kauj Ruam

Video: Yooj Yim Ntxiv Google Maps rau Koj Cov Ntawv Google Tau Txais thiab dawb: 6 Kauj Ruam

Video: Yooj Yim Ntxiv Google Maps rau Koj Cov Ntawv Google Tau Txais thiab dawb: 6 Kauj Ruam
Video: Kuv Hmoov Phem Los Koj Siab Phem-LOKY(Official MV ) 2024, Kaum ib hlis
Anonim
Yooj Yim Ntxiv Google Maps rau Koj Cov Ntawv Google Tau Txais thiab dawb
Yooj Yim Ntxiv Google Maps rau Koj Cov Ntawv Google Tau Txais thiab dawb

Ib yam li ntau Tus Tsim, Kuv tau tsim ob peb txoj haujlwm GPS tracker. Hnub no, peb yuav tuaj yeem pom sai sai GPS cov ntsiab lus ncaj qha hauv Google Cov Ntawv uas tsis siv lwm lub vev xaib lossis API.

Qhov zoo tshaj plaws, nws yog DAWB!

Kauj Ruam 1: Tsim Daim Npav Npaum Npaum

Tsim ib daim ntawv dawb paug
Tsim ib daim ntawv dawb paug
Tsim ib daim ntawv dawb paug
Tsim ib daim ntawv dawb paug

Mus rau nplooj ntawv google.com.com lossis docs.google.com/spreadsheets los tsim daim ntawv nthuav dav. Yog tias koj tsis tau tsim daim ntawv nthuav tawm hauv Google ua ntej, koj tuaj yeem pib sai sai los ntawm kev saib cov vis dis aus no.

Kuv lub npe kuv daim ntawv teev npe MapsChallenge, tab sis koj tuaj yeem siv txhua lub npe koj nyiam.

Kauj ruam 2: Ntxiv Koj Cov Ntaub Ntawv GPS

Ntxiv Koj Cov Ntaub Ntawv GPS
Ntxiv Koj Cov Ntaub Ntawv GPS

Thawj kab yuav tsum tau tshwj tseg rau kab ntawv kab. Pib ntawm kab thib ob, nkag mus rau cov ntsiab lus GPS. Koj yuav xav tau peb kab thiab lawv yuav tsum muaj raws li hauv qab no:

Sijhawm

Latitude

Ntev ntev

Nov yog qee qhov GPS ntsiab lus los ntawm kev mus nrawm ntawm lub tsev so thiab tsev noj mov hauv Houston, Texas:

Lub Sijhawm Latitude Longitude

11:55:33 PM 29.7384 -95.4722

11:55:43 PM 29.7391 -95.4704

11:55:53 PM 29.7398 -95.4686

11:56:03 PM 29.7403 -95.4669

11:56:13 PM 29.7405 -95.4654

11:56:33 PM 29.7406 -95.4639

11:56:43 PM 29.7407 -95.4622

11:56:53 PM 29.7408 -95.461

11:57:03 PM 29.7412 -95.4607

11:57:13 PM 29.7421 -95.4608

11:57:23 PM 29.7432 -95.4608

11:57:33 PM 29.7443 -95.4608

11:57:43 PM 29.7451 -95.4608

11:57:53 PM 29.7452 -95.4608

11:58:03 PM 29.746 -95.4608

Kauj ruam 3: Ntxiv Automation

Ntxiv Automation
Ntxiv Automation
Ntxiv Automation
Ntxiv Automation

Yog tias koj paub nrog macros hauv cov ntawv thov xws li Microsoft Excel koj yuav pom lub tswv yim no paub. Cov cai peb yuav sau ntawm no tsis ua haujlwm hauv zos thiab nws yog JavaScript (ish) tsis yog VBA. Nyem Cov cuab yeej ntawv qhia zaub mov ces xaiv Script editor. Kuv npe kuv tsab ntawv MapsChallenge ib yam.

Kauj Ruam 4: Siv Kuv Cov Cai

Siv Kuv Cov Cai
Siv Kuv Cov Cai

Rho tawm cov ntsiab lus ntawm Code.gs tom qab ntawv ntxiv cov cai hauv qab no thiab nyem Txuag:

var Daim ntawv no;

daim duab qhia chaw;

var ThisRow;

var LastPointTime;

var ThisPointTime;

// Khiav ib zaug ntawv qhib

muaj nuj nqi onOpen () {

Qhov no = 2;

// Hloov qhov dav dav

ThisSheet = SpreadsheetApp.getActiveSheet (). SetColumnWidths (1, 4, 85);

// Tshem tawm txhua daim duab qhia chaw

ThisSheet.getImages (). ForEach (muaj nuj nqi (i) {i.remove ()});

// Khaws cov ntawv hauv hlwb

ThisSheet.getRange ('A: D'). SetWrapStrategy (SpreadsheetApp. WrapStrategy. CLIP);

var Seq = 1;

ThisPointTime = ThisSheet.getRange (ThisRow, 1).getValue ();

thaum (ThisPointTime! = '') {

// Pib daim duab qhia chaw

ThisSheet.getRange (((Seq-1)*30) +27, 5).setValue ('Pib ntawm kab'+ThisRow);

// Tsim daim duab qhia chaw

daim ntawv qhia = Maps.newStaticMap ();

// Thawj tus cim

PlaceMarker (Maps. StaticMap. MarkerSize. SMALL, "0x00FF00", 'Ntsuab');

// Qhov sib txawv ntawm cov ntsiab lus no thiab qhov kawg yog tsawg dua 10 feeb

thaum (ThisPointTime - LastPointTime <600000) {

// Puas muaj tus cim tom ntej lossis tus kawg?

(ThisSheet.getRange (ThisRow+1, 1).getValue () - LastPointTime <600000)? PlaceMarker (Maps. StaticMap. MarkerSize. TINY, "0x0000FF", 'Blue'): PlaceMarker (Maps. StaticMap. MarkerSize. SMALL, "0xFF0000", 'Liab');

}

// Ntxiv GPS khiav duab rau daim ntawv

ThisSheet.insertImage (Utilities.newBlob (map.getMapImage (), 'image/png', Seq), 5, ((Seq-1)*30) +2);

// Xaus daim duab kab lus

ThisSheet.getRange (((Seq-1)*30) +27, 5).setValue (ThisSheet.getRange (((Seq-1)*30) +27, 5).getValue () +'xaus ntawm kab' + (ThisRow-1)). SetFontWeight ("bold");

Se ++;

}

}

muaj nuj nqi PlaceMarker (a, b, c) {

map.setMarkerStyle (a, b, c);

map.addMarker (ThisSheet.getRange (ThisRow, 2).getValue (), ThisSheet.getRange (ThisRow, 3).getValue ());

LastPointTime = ThisPointTime;

Qhov no ++;

ThisPointTime = ThisSheet.getRange (ThisRow, 1).getValue ();

}

Kauj Ruam 5: Kaw Tom Qab Rov Qhib Koj Daim Ntawv Npe

Kaw Tom Qab Rov Qhib Koj Daim Ntawv Npe
Kaw Tom Qab Rov Qhib Koj Daim Ntawv Npe

Kev siv lub tshuab peb tsim yuav tshwm sim tsuas yog los ntawm Spreadsheet qhib qhov kev tshwm sim. Tom qab kaw Spreadsheet, mus rau drive.google.com thiab qhib koj daim Spreadsheet.

Pom zoo: