7. Client
Loca5on
¢Add
another
external
javascript
library
or
use
another
sample
from
“Code
Samples”
— src="h`p://www.google.com/jsapi"
¢Get
client
loca5on
from
google.loader
and
center
map
to
there.
¢DEMO:
h`p://goo.gl/NIVU
7
12年4月17日星
9. Event
¢Concept:
— Closure
— Func5onal
Programming
¢Sample:
place
a
marker
on
client
loca5on
— h`p://mirlab.org/users/ronald.hsu/
web_course_demo/clientMarker.html
9
12年4月17日星
10. JS
Advanced
Concept
¢Closure
— Wikipedia:
In
computer
science,
a
closure
(also
lexical
closure
or
func5on
closure)
is
a
func5on
together
with
a
referencing
environment
for
the
non-‐local
variables
of
that
func5on.
[1]
A
closure
allows
a
func5on
to
access
variables
outside
its
immediate
lexical
scope.
¢Func5onal
Programming
— Extended
Reading:
h`p://www.slideshare.net/
ihower/fp-‐osdc2012v2
10
12年4月17日星