Skip to Content
MOBILE WEB程式設計--第二版
book

MOBILE WEB程式設計--第二版

by Maximiliano Firtman
December 2013
Intermediate to advanced
752 pages
16h
Chinese
GoTop Information, Inc.
Content preview from MOBILE WEB程式設計--第二版
地理定位與地圖
|
523
載入 API 之後,
google.loader.ClientLocation
會被填入一些屬性,如:
latitude
longitude
address.city
address.country
address.country_code
address.region
這項技術只能在相容的設備上發揮作用,且只能與 Ajax API 之一同時使
用(Ajax SearchMapsAjax FeedsEarthDataVisualization
Friend Connect、或 Ajax Language)。
地圖∕導航 App 整合
在某些平台上,例如 iOSWindows Phone,與 Android 都有獨立於瀏覽器的原生地圖
應用程式,我們可以在某些情況下打開它們,例如啟用轉向導航程序。若要在網站上與
這個 App 通訊,我們會直接使用標準的 URI,在第十五章將會提到。
Android Google Maps
若要呼叫 Android 設備上的 Google Maps 應用程式,我們可以直接指向
maps.google.com
並按照基本格式選擇傳送任何想要加入的參數
http://maps.google.com/?
<attributes>
。這些
屬性應該使用 URL 格式,如
attribute1=value1&attribute2=value2
。可用的屬性包括:
q
查詢參數;它可以是以逗號分隔的座標,並前置
loc:
loc:
lat
,
long ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

成為卓越程式設計師的38項必修法則

成為卓越程式設計師的38項必修法則

Pete Goodliffe
精實企業|高績效組織如何達成創新規模化

精實企業|高績效組織如何達成創新規模化

Jez Humble, Joanne Molesky, Barry O'Reilly

Publisher Resources

ISBN: 9789862769522