Skip to Main Content
PhoneGap Build
book

PhoneGap Build

by Bintu Harwani
November 2013
Intermediate to advanced content levelIntermediate to advanced
303 pages
8h 45m
English
Auerbach Publications
Content preview from PhoneGap Build
Using PhoneGap API ◾  207
Displaying Google Maps
Each instance of google.maps.Map class displays a simple Google map on a page. e Map
class accepts the following two parameters:
An HTML element that will contain the map. e preferred HTML element for displaying
a map on a Web page is a <div> element. e code below shows a sample <div> element
that can be used to display a map:
<div id = "map_canvas" style = "width:100%; height:100%"></div>
In the example above, we define a <div> element named map-canvas and set its size to
100%, which will expand it to fit the size on mobile devices.
e second parameter used in the Map class is a google.
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.
Start your free trial

You might also like

Beginning App Development with Parse and Phonegap

Beginning App Development with Parse and Phonegap

Wilkins Fernandez, Stephan Alber
Ajax For Dummies®

Ajax For Dummies®

PhD Steve Holzner

Publisher Resources

ISBN: 9781466589742