dr. martin zhao sept 4, 2015. topics html and related tutorials on w3schools.com related html tags...

8
Google Maps API Dr. Martin Zhao Sept 4, 2015

Upload: raymond-fowler

Post on 05-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

Google Maps APIDr. Martin Zhao

Sept 4, 2015

Page 2: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

Topics HTML and related tutorials on

w3schools.com Related HTML tagsAdding interesting features using JavaScriptWhat is Google Maps API?Application mashup using Google Maps APIJSON: JavaScript Object Notation

Page 3: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

Elements of HTML: Tags Found in (almost) all HTML

<head> <body>

Block level elements<p> <div>

Embedding programs<script>

Page 4: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

JavaScript: What Can You Do With It?JavaScript is the programming language of HTML

and the Web JavaScript Can Change HTML ContentJavaScript Can Validate DataJavaScript Can Change Images

Page 5: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

How to Mark Places on a Map?You have options:

Make you map with place marked and include it in your HTML

Include a map with a <canvas> tag (available in HTML5) and use JavaScript to draw markers on it

Using Google Maps APIPros and Cons

Page 6: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

What is API?Application Programming Interface

What does each word mean?

Your progra

m

Reusable

Program Library

API

Page 7: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

How to Use the Maps API?Load the Google API: it’s for JavaScript

<script src="http://maps.googleapis.com/maps/api/js"></script>

Set Map PropertiesCreate a Map Container: a <div> elementCreate a Map ObjectAdd an Event Listener to Load the Map

Page 8: Dr. Martin Zhao Sept 4, 2015. Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is

Passing Data to a Mashup AppMOM: mercury concentration contour

overlayhttp://theochem.mercer.edu/mapvis

JSON: JavaScript Object NotationDatabase accessibility