字幕组成品列表(Beta)
  • 写在前面
  • Android 平台
    • Game On! 游戏开发系列 - 031
      • Pie Noon - 1503060393
      • The Death of Base Game Activity - 1504030543
      • Surviving OpenGL Context Loss - 1504030546
      • WebP for Game Devs - 1504030547
      • Saved Games In-Depth (Part 1) - 1504070556
      • Saved Games In-Depth (Part 2) - 1504030548
      • Smaller Flipbook Textures with CRABBY - 1504030544
      • Google Tag Manager - 1504030545
      • Flatbuffers - 1505050794
      • Achievement Point Pointers - 1505050796
      • Frequency Scaling - 1505050797
      • Meet the Management APIs - 1501140367
      • Y U Ship Broken Games - 1505050795
    • Android 性能优化 - 088
      • Garbage Collection in Android - 1503170425
      • Performance Cost of Memory Leaks - 1503170424
      • Rendering Performance 101 - 1501130351
      • Understanding Overdraw - 1501130352
      • Understanding VSYNC - 1501130353
      • Tool - Profile GPU Rendering - 1501130354
      • Why 60fps? - 1501130355
      • Android UI and the GPU - 1501130356
      • Invalidations, Layouts, and Performance - 1501130357
      • Overdraw, Cliprect, QuickReject - 1501130358
      • Tool - Memory Monitor - 1501130363
      • Battery Performance 101 - 1501130364
      • Understanding Battery Drain on Android - 1501130365
      • Battery Drain and WakeLocks - 1501130366
      • Memory Performance 101 - 1504170661
    • I/O 2014 Android 开发专题 - 089
      • Activity Transitions - 1504020505
      • Building Apps For Android TV - 1504020520
      • Building great Android media experiences - 1504020510
      • Building a quality app from start to finish - 1504020515
      • App Indexing API - 1504020507
      • What's new in WebView - 1504010484
      • Bluetooth Low Energy - 1504010486
      • Building impressive Android media experiences - 1504010493
      • The next Generation of Authentication - 1504020497
      • Don't Alpha That Pixel! - 1504020523
      • NFC + HCE Your phone in an interactive world - 1504020509
      • Demystifying encodes and decodes of WebM - 1504020521
      • Google Cloud Messaging - 1504020524
      • Getting your Game on the Big Screen - 1504020518
      • I hear you like realtime memes - 1504020511
      • Offerize your App - 1504020506
      • Using the Android Job Scheduler - 1504020504
      • From Holo to Material - 1504020526
      • Under the Hood of Android Auto - 1504020501
      • Isolation for Android App Developers - 1504020498
      • Android Work - 1504010496
      • ExoPlayer: Adaptive video streaming on Android - 1504010489
      • Sample rates and resampling: Why can't we all just agree? - 1504010488
      • Drive Android API - 1504010485
    • Android Studio - 004
      • Layout Editor (Ep 3, Android Studio) - 1503290479
      • Introducing Gradle (Ep 2, Android Studio) - 1503170426
    • I/O 2014 Android 分发主题 - 091
      • Introduction to Google Play - 1504030534
      • Google Play: building your user community - 1504030535
      • Optimizing Apps for Education - 1504030536
      • Succeeding in Education Technology - 1504030530
      • Subscriptions Made Easy with Google Play - 1504030531
      • The world is your playground - go global with Google - 1504030533
      • Maximizing discoverability on Google Play - 1504030538
    • Android Auto - 003
      • Introduction to Android Auto - 1504130615
      • Android Auto Messaging - 1504130617
      • Android Auto Audio - 1504130616
    • Android Wear - 006
      • Designing for Android Wear - 1503210448
      • How We Customized Google Apps for Android Wear - 1503210450
      • Fullscreen apps for Android Wear - 1503210445
      • New Notification Features for Android Wear - 1503210446
      • Building Cloud-powered wearable Apps - 1503210449
      • An Introduction to Android Wear - 1503190435
      • Google I/O 2014 - Android Wear: The developer's perspective - 1503210442
      • Devoxx 2014 Interviews: Android Wear - 1503210440
      • DevBytes: Watch Faces for Android Wear - 1503210439
    • Android TV - 005
      • Using the Leanback library - 1504080588
      • Beach Buggy Racing Multiplayer with Nearby Connections (Play Services) - 1503060387
    • Android for Work - 106
      • Android for Work for Developers - 1503060390
      • App Configurations, Testing and Launchers - 1504110590
    • IO Bytes 2014 - Android - 066
      • Chrome Apps on Android and iOS - 1501080014
      • Perf Primer CPU, GPU and your Android game - 1501080017
  • Chrome 平台
    • IO Bytes 2014 - Chrome and Web - 067
      • Using the PageSpeed API - 1505070815
      • Fabulous Forms for the multi-device web - 1505070816
      • Testing multi-screen web pages - 1505070817
      • Responsive images today - 1505070819
      • Web Performance Testing at YouTube - 1505070828
      • Building sites for the multi-device web - 1505070820
      • Deep dive: Google Cloud Messaging for Chrome - 1505070827
  • Google 创业者资源
    • Coffee with a Googler - 012
      • Chat with Allen Huang of AndroidTV - 1503040384
      • Chat with Fred Chung about developer advocacy - 1503070395
      • Google Fit platform with Michelle Haq - 1503210443
      • Android Auto Product Manager Andrew Brenner - 1501120027
      • Chat with Francis Ma about Google Play services - 1501120028
    • Root Access For Startups - 077
      • What we learned building plug-ins for Android, with startup Magnet - 1503230453
      • How to use crowdfunding to your advantage, with startup Hale Devices - 1503280462
      • How to overcome customer objections when selling tech, with startup Guesswork - 1503280458
    • First Things First - 029
      • Getting started with Android: A crash-course in developing for Android - 1504120601
      • How to ask a question: conducting research for your startup - 1504120603
      • MVP Design Hacks: transform your hot idea into a validated prototype - 1504120602
      • Build something people want: Solving real problems - 1504120605
    • How I - 061
      • Use BigQuery to find my most valuable customers - 1504070573
      • Manage beta testing communities using Google Play - 1504070572
      • Use paper wireframing to build native prototypes - 1504070570
      • Used social media and $0 marketing to get 68 million users - 1504070568
      • Prep to fundraise with four questions - 1504070564
      • Validated my idea in 2 days (with no code) - 1504070562
      • Build open platforms on Android - 1504120596
      • Get cheap, automatic analytics for my business using BigQuery - 1504070571
      • Write press releases to get international media coverage - 1504070569
      • Test beta-product features using Google Apps - 1504070563
      • Use URL builder to measure ROI on social media - 1504070561
      • Use events to build DeadSocial's brand - 1504070557
      • Use BigQuery to visualize streaming data - 1503220452
      • Find, screen, and hire developers - 1503120406
      • Drive engagement with social challenges - 1504070558
  • 设计
    • DesignBytes - 017
      • Paper and Ink: The Materials that Matter - 1505050793
  • 云计算
    • DevBytes: Google Cloud Platform - 021
      • Powering the next killer app with the Google Cloud Platform - 1504210672
      • Introduction to Google Cloud Endpoints - 1504210675
      • The Beauty of Scale with Google Cloud Platform - 1504210678
    • Google Cloud Platform - Big Data - 105
      • GDELT & BigQuery: Understand the world - 1502200379
    • Uncategorized - 999
      • Introducing Google Cloud Platform Resources - 1501190370
  • Google 应用开发
    • Launchpad Online - 072
      • The Setup: Creating new apps using Google APIs - 1503190428
      • Listing your files in Google Drive - 1503190429
      • Customizing Google Analytics for your startup - 1503290473
      • The Launchpad Online series - 1503190427
      • Getting started with Google Analytics - 1503290472
      • Accessing Google Maps from a spreadsheet?!? - 1502220381
      • Change the world in 10 lines of code - 1503080398
    • Google Play Services - 054
      • Google Play services 6.1 - 1503290481
      • Google Play Services 7.0 - 1503200437
      • Google Play Services 6.5 - 1501080015
    • 谷歌地图 iOS SDK - 053
      • Maps Live: New Features in the Google Maps Mobile APIs for Android and iOS - 1504300777
    • Google 移动搜索开发 - 055
      • Is your app in the Google index? - 1504120598
      • Get more engaged users with Google Search for Developers - 1503070397
    • DevBytes: Google Cast - 020
      • Google Cast SDK for Android - 1504180666
      • Media Router Framework - Part 1 - Media Router API - 1504180667
      • Overview for Google Cast Receivers - 1504180664
      • Google Cast SDK for iOS - 1504180663
    • Getting Started with the Google Maps SDK for iOS - 035
      • Getting started with the Google Maps SDK for iOS, Part 1 - 1504270757
    • IO Bytes 2014 - Wearables - 070
      • Voice Driven GDK Glassware - 1505280836
    • Route 85 - 078
      • Introducing Route 85 - 1501120022
      • Quick Tip: Don't Default that Switch! - 1501190371
      • OpenInChrome on iOS, Part 1 - 1501120023
      • OpenInChrome on iOS, Part 2 - 1501120024
      • OpenInChrome on iOS, Part 3 - 1501120025
      • OpenInChrome on iOS, Part 4 - 1501120026
    • DevBytes 2014 - 019
      • Web Components - Template - 1505040789
      • Wearable DataLayer API - 1505050792
      • Using srcset for responsive images - 1505050790
      • The picture element for art direction - 1505050791
    • Uncategorized - 999
      • Sun Surveyor brings augmented reality to photographers using Google Maps APIs - 1504200668
      • Snappy travels with the Roads API - 1503060392
      • Easy Maps Apps in Java and Python - 1501140030
  • Google 广告平台
  • Polymer
    • Polycasts - 076
      • The Awesome Power of Auto-Binding Templates -- Polycasts #08 - 1502220382
      • Content Switcheroo with Core-Pages -- Polycasts #09 - 1502200380
      • Core Iconset -- Polycasts #02 - 1505040788
  • Web 平台
    • HTTP 203 - 062
      • Gotchas - 1501140368
      • Font Rendering - 1501080016
    • Web Components - 081
      • DevBytes: Web Components - Overview - 1504250709
  • 宣传视频
    • Uncategorized - 999
      • Google Developers - 1501150369
      • I/O Extended 2014 - Join me - 1502220383
  • Google 各类开发者会议
    • 2014 Chrome 开发者高峰会议 - 009
      • Keynote - Chrome Dev Summit 2014 (Darin Fisher) - 1503120407
      • TLS All the Things! - Security with Performance(Chris Palmer) - 1503140412
      • Let’s build some apps with Polymer!(Rob Dodson) - 1503150415
      • Day One Closing Remarks(Sundar Pichai) - 1503150417
      • Chrome Leadership panel - 1503160422
      • Fundamentals of Mobile Web Development(Matt Gaunt) - 1503150416
    • 2015 游戏开发者大会中 - 039
      • FlatBuffers - 1504150640
      • Games for Google Cast - 1504150637
      • Top 10 Things Android Game Developers Should Know v 3.0 - 1504150643
      • Automate Publishing for Google Play APIs - 1504150639
      • 3 Game Design Mistakes You're Making - 1504150636
      • Android TV - 1504150638
      • How to Go Viral Without Really Trying - 1504150641
    • Devoxx 2014 Interviews - 024
      • What's new in Android 5.0 Lollipop - 1504260740
      • Android Tools - 1504260743
      • BigQuery and user-defined functions - 1504260744
    • IO Bytes 2014 - 065
      • Dart in Google Cloud - 1505070810
      • Big genomic data on Google Cloud Platform - 1505070811
      • Easy International Checkout with Chrome - 1505070802
      • Google developer tools and APIs for iOS - 1503190436
      • Whet your appetite with IO Bytes - 1501080021
    • PlayTime@Shanghai - 095
      • 主题演讲 Chris Yerga - 1504060549
      • 如何成功地开发你的应用 Ellie Powers - 1504060550
      • 在Google上营利 Brahim Elbouchikhi - 1504060551
      • Playtime Shanghai event sizzle reel - 1504070552
    • Project Google I/O 2015 - 098
      • Project Tango Mobile 3D tracking and perception - 1506120857
      • Democratizing Education - 1506120868
      • Improve your Android app’s accessibility - 1506120864
      • Google Cloud Messaging 3.0 - 1506120844
      • Developers connecting the world through Google Play - 1506120862
  • 开源开放技术
    • Compressor Head - 013
      • The Trailer, Season 2 - 1503060385
      • Behind the Scenes - 1503210441
      • Arithmetic Compression (Ep 5, Compressor Head) Google - 1503070394
      • Introducing Compressor Head - 1502120372
      • Episode 1 (Variable Length Codes) - 1502120373
      • Episode 2 (The LZ77 Compression Family) - 1502120374
      • Episode 3 (Markov Chain Compression) - 1502120375
Powered by GitBook
On this page
  • 译者信息
  • 解说词中文版:

Was this helpful?

  1. Google 应用开发
  2. Launchpad Online - 072

Accessing Google Maps from a spreadsheet?!? - 1502220381

PreviousGetting started with Google Analytics - 1503290472NextChange the world in 10 lines of code - 1503080398

Last updated 5 years ago

Was this helpful?

视频发布时间

2015年2月6日

视频介绍

视频推介语

暂无,待补充。

译者信息

翻译

润稿

终审

原始链接

中文字幕

翻译流水号

加入字幕组

TWL007

韩淼

程路

1502220381

解说词中文版:

嗨 大家好

我是Wesley Chun

欢迎来到另一个Google Apps Script讲座

如果你是第一次接触这个 请暂停

点击下面介绍中的链接

看完其中的视频再来和我们一起继续今天的讲座

好了

现在你也许会好奇

通过表格访问Google Maps

听起来很疯狂 是吧

你会觉得我有些哗众取宠

其实 恰恰相反

在这个视频中 我将教你写代码

而且不仅会告诉你它会显示出什么更会告诉你它用处在哪

这里的小星号意味着我会放一点惊喜在结尾哦

所以好好的提高注意力咯

在这个讲座中 我们要先创建一个新的Goole表格

然后把数据存入其中 比如街道地址

之后我们会利用我们

之前存入的数据 就是那个街道地址

让Google Maps生成我们指定的地图

这就是这个视频的所有内容啦

你可以轻松的去构建多于一个地址的情况 是吧

现在问题是如何将每一个地址导入Google Maps

你要在表格和Google Maps间来回不停的切换

对吧

好了 如果我就靠点击表格里的连接就能做到这一切呢

这就是我们将要做的事情

为了完整这个重复的动作

我们要先保存一个指向Google Maps的链接在表格里

就如我早先提到的

我们使用的技术是Google Apps Script

保存在Google Drive中的文档和表格

可以被叫做的Apps Script的JavaScript子集

以编程的方式调用起来

Apps Script不仅可以访问Google Apps的数据

还可以访问其他Google服务

Google Maps只是其中之一

再一次 如果你之前没有看过相关视频

或者你是第一次接触Apps Script 请先去观看介绍视频

链接地址就在地下的视频描述中

自从我们上次提到还没有挪动地方

这主要是为了你方便

前提是你坐在电脑前

里外一个先看接视频的原因是

我们要在他的 Hello World 程序基础上

来构建这个视频的程序

如果你全都准备好了 那就让我们开始吧

好了

在我们开始前 我很鼓励大家跟我一起做

你自己动手去做

比你只看视频有意义的多

你可以随你需要暂停或者后退

因为我一直在这里 嘤嘤嘤嘤

我们将使用在第一次Apps Script讲座中学习到的程序

并由此开始

允许你的表格访问Google Maps

就像上次我们做的一样

在Google Drive中新建一个Google表格

当你做完这一切 请回来继续跟我们一起往下做

好了

让我们开始吧

将接到地址存入第一个单元格

比如 纽约的76 9th Avenue

根据你的需要来拉长表格

如果你需要拉宽表格以便于看到所有的东西

当然这个随你啦

这就是咯

终于到了写代码的时候了

从上面的菜单栏中选择工具

之后下拉选择Script Editor

就像前一个讲座做的那样

我们创建一个空白项目

因为我们并不是真的打算

写很多行的代码

准确说 就四行

然后就像上一个讲座一样

我们需要获取到当前表格内容

所以我们准备使用

Spreadsheet App和它的Get Active Sheet方法

来获取当前表格内容

让我们将他保存成一个基于变量命名的表格

因为我们要用到它很多次

命名是有意义的 是吧

好了

上次 我们使用了Get Range方法

来得到第一个单元格的内容 就是A1 大家还有印象么

这次我们要做一些类似的事情

我们准备再一次调用Get Range方法

并且我们也将使用参数A1

让我们将快速浏览表格来确认

我们输入的地址在哪里

好了 这就是了

不同于上次调用Set Value方法来写入 Hello World 到单元格

我们准备使用Get Value方法来取得单元格中的地址

并将它保存到基于变量命名的地址中

再提醒一次 请使用恰当的变量名

搞定

让我们见证奇迹的一刻吧

Spreadsheet App是Apps Script访问

Google表格的一个节点

现在为了传递参数到Google Maps

我们需要一个相同的对象

这个就是Maps了

如你所看到的 Maps对象有很多方法

但是我们只关心New Static Map方法

接下来我们要做什么

我们准备创建一个新的Google Maps

我们也希望在第一列的地址上

有一个标记

你需要做的是将地址传到Ad Marker方法

如你所看见

现在让我们把地图保存到叫 that 的变量中

再说一次 给你的变量起个合适的名字

最后一步是

保存链接到表格中邻近保存地址的单元格的单元格中

我们准备再次调用Get Range方法

还有参数A1

我们之前所见靠近地址的表格是B1

所以这次我们准备调用Set Value方法为了

将地图链接写入其中

并且你可以使用Maps对象中的Get Map URL方法来获取链接

这就是了

噢

如果你还没有给你的脚本起名

你将会被提示 就像之前一样

在你保存或者运行之前起名

我们就叫它Google Maps demo吧 想不到什么好名字了

现在我们再一次运行它

你会看见你需要使用OAuth授权

来授权这个脚本使其可以访问我们的表格数据

当你选择加入并成功运行它

当上访的黄色提示条消失的时候你可以确定它执行完毕了

如果一切都照计划执行

当我们回到表格的时候

你将会看到地图链接已经在B1了

这就是了

如果你点击它

你将会看到我们要求Google Maps生成的地图

一个图钉出现在上面

这个很神奇 不是么

好了

这就是我们要做的

我们只需要一个四行的JavaScript脚本来

链接一个表格到Google Maps

希望你喜欢这个demo 更重要的是

仅仅通过几行代码就可以学会

你可以去做到你认为

很有意义的事情

这就是这个视频所有的内容了么

这仅仅是一个简单的把戏么

你如何使用它并把它变成

真正有用的东西

好了 这有很多可能性

假设你拿到了纽约本市所有客户的地址

你想把他们标记在Google Map上

来帮助你计划如何在一天只能可以拜访完他们

你刚完成的脚本代码仅仅是一个起点

或者 这是一个按月的用户组

亦或是一个俱乐部会议

对么

好吧 你也许不会去手动的将他们的数据一个一个输入表格

而是利用Google表格

从中拉取会员信息

现在你可以猜到了

Apps Script赋予你让那些看起来普通的,令人生厌的表格数据转变为程序

处理和管理会员信息

以及会面地点的能力

为了获取更多如何利用Apps Script来

调用Google Maps的信息

访问这里第一个链接

当然 Apps Script赋予你的不仅仅是访问Google Maps

当然也包括其他的Google Services的能力

为了或许那些你可以利用的服务的信息

访问第二个链接

最后 底部的资源

会带领你获取更多这个系列以及其他开发者系列的讲座视频

你可以订阅他们

来获取最新的讲座

这就是目前的全部了

当然如你所想的一般 这对你仅仅是个开始

请随时关注未来的讲座

我们将会利用Apps Script来用地图 表格

以及其他Google Services实现更多的功能

我是来自Google的Wesley Chun 让我们下次再见

什么 你 你还在这里

已经完事了

快回去搬砖

好吧

那这样

看来在你学到更多的东西前你是不会走了

好了

让我们坐回到电脑前

让我们回到上次离开的那个地方

并点击了地址单元格旁边的链接

我们可以看见Google Maps帮我们

生成的地图

让我们回到代码 重新审视第四行和最后一行

的代码

的确 这是一个展示你可以写入数据到表格中

比如地图链接的一个好的技术demo

但是我们可以实现的功能不仅仅于此 不是么

跟着我修改这行代码的头一部分

尤其是这里这块

叫做MailApp对象的Send Email方法

哦 顺便说一句 选择需要三个参数的

第二个方法

我们将用你朋友的邮件地址作为收件人地址

输入一个主题

选择一些东西 呃 不知道选啥 map怎么样

并且最后再一次使用地图链接作为内容部分

就是最后一个参数

搞定

猜猜这是要用来做什么

暗示一下 这个将会调用Gmail

是的 跟你想的一样

与其将链接写入表格

你不觉将这个链接

发送给你朋友更酷么

在这个demo中 我准备把它发送给我自己

但是你可以把它想成是你的朋友咩

这就完事了

保存 运行

你注意到你在这里需要一个新的OAuth授权了么

这一次 你授权Script可以

代表你来发送邮件

噢

顺便再说一下 确保你的程序发送的信息不会违反

Gmail服务协议

以及计划政策

但是这个是显而易见的 不是么

让我们继续 接受这个

当执行完毕的时候 让我们检查一下Gmail

这有个消息

嘣

如果你朋友点击收到消息中的链接

就会看见你之前所见的自动生成的地图

之后就可以去参加Party了

庆祝你出色的编程技能啦

哇哦

我们完成了什么

这个四行脚本现在交织了

这四行脚本现在交织了

Google Sheets Google Maps和Gmail

Google Sheets Google Maps and Gmail。

仅仅四行 就这样而已

我得说这个强化功能比我们在

第一个视频中所建的更加有用和神奇

我们邀请你想象一下

看看你能借助Apps Script的力量实现何种功能

希望你能实现

因为接下来你要回去搬砖 我也得准备闪人了

享受编码的快乐 我们会很快在另一个讲座中再见的

Connecting to Google Maps from a spreadsheet? Sounds intriguing doesn't it? The best part is that this is no parlor trick. In this follow-up Google Apps Script episode (watch first one first: ), developers will create a Google Map from an address stored in a Google Sheet! We'll also present some scenarios of when this may be useful, and perhaps we'll have a special surprise waiting for you at the end!

http://goo.gl/1sXeuD
Youtube
Youtube
加入 GDG 字幕组
video_screenshot