FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
jQuery-tinyMap/jquery.tinyMap.min.js at master · sanketh95/jQuery-tinyMap · GitHub
sanketh95
jQuery-tinyMap
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
jQuery-tinyMap
/
jquery.tinyMap.min.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (33 loc) · 16.1 KB
Breadcrumbs
jQuery-tinyMap
/
jquery.tinyMap.min.js
Copy path
File metadata and controls
33 lines (33 loc) · 16.1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(
function
(
h
,
u
,
A
,
q
)
{
function
g
(
b
,
a
)
{
try
{
return
u
.
hasOwnProperty
?
b
.
hasOwnProperty
(
a
.
toString
(
)
)
:
Object
.
prototype
.
hasOwnProperty
.
call
(
b
,
a
.
toString
(
)
)
}
catch
(
d
)
{
console
.
dir
(
d
)
}
}
function
r
(
b
,
a
)
{
var
d
=
[
]
,
c
=
/
^
[
+
-
]
?
\d
+
(
\.
\d
+
)
?
$
/
,
f
=
{
lat
:
""
,
lng
:
""
}
;
if
(
"string"
===
typeof
b
||
h
.
isArray
(
b
)
)
if
(
d
=
"string"
===
typeof
b
?
b
.
replace
(
/
\s
+
/
,
""
)
.
split
(
","
)
:
b
,
2
===
d
.
length
)
c
.
test
(
d
[
0
]
)
&&
c
.
test
(
d
[
1
]
)
&&
(
f
.
lat
=
d
[
0
]
,
f
.
lng
=
d
[
1
]
)
;
else
return
b
;
else
if
(
"object"
===
typeof
b
)
{
if
(
"function"
===
typeof
b
.
lat
||
"function"
===
typeof
b
.
lng
)
return
b
;
g
(
b
,
"x"
)
&&
g
(
b
,
"y"
)
?
(
f
.
lat
=
b
.
x
,
f
.
lng
=
b
.
y
)
:
g
(
b
,
"lat"
)
&&
g
(
b
,
"lng"
)
&&
(
f
.
lat
=
b
.
lat
,
f
.
lng
=
b
.
lng
)
}
return
q
!==
a
&&
!
0
===
a
?
new
google
.
maps
.
LatLng
(
f
.
lat
,
f
.
lng
)
:
f
}
function
s
(
b
)
{
var
a
=
b
.
css
||
""
;
this
.
setValues
(
b
)
;
this
.
span
=
h
(
"<span/>"
)
.
css
(
{
position
:
"relative"
,
left
:
"-50%"
,
top
:
"0"
,
"white-space"
:
"nowrap"
}
)
.
addClass
(
a
)
;
this
.
div
=
h
(
"<div/>"
)
.
css
(
{
position
:
"absolute"
,
display
:
"none"
}
)
;
this
.
span
.
appendTo
(
this
.
div
)
}
function
v
(
b
,
a
)
{
var
d
=
h
.
extend
(
{
}
,
z
,
a
)
,
c
=
{
}
,
f
=
""
;
if
(
g
(
u
,
"google"
)
)
{
this
.
map
=
null
;
this
.
_markers
=
[
]
;
this
.
_labels
=
[
]
;
this
.
container
=
b
;
this
.
options
=
d
;
this
.
googleMapOptions
=
{
}
;
this
.
interval
=
parseInt
(
this
.
options
.
interval
,
10
)
||
200
;
for
(
f
in
this
.
options
)
g
(
this
.
options
,
f
)
&&
(
c
=
this
.
options
[
f
]
,
/
C
o
n
t
r
o
l
O
p
t
i
o
n
s
/
g
.
test
(
f
)
&&
g
(
c
,
"position"
)
&&
"string"
===
typeof
c
.
position
&&
(
this
.
options
[
f
]
.
position
=
google
.
maps
.
ControlPosition
[
c
.
position
.
toUpperCase
(
)
]
)
)
;
this
.
googleMapOptions
=
this
.
options
;
g
(
d
,
"streetView"
)
&&
(
this
.
googleMapOptions
.
streetViewObj
=
d
.
streetView
,
delete
this
.
googleMapOptions
.
streetView
)
;
this
.
googleMapOptions
.
center
=
r
(
d
.
center
,
!
0
)
;
g
(
d
,
"styles"
)
&&
(
"string"
===
typeof
d
.
styles
?
g
(
w
,
d
.
styles
)
&&
(
this
.
googleMapOptions
.
styles
=
w
[
d
.
styles
]
)
:
h
.
isArray
(
d
.
styles
)
&&
(
this
.
googleMapOptions
.
styles
=
d
.
styles
)
)
;
h
(
this
.
container
)
.
html
(
d
.
loading
)
;
this
.
init
(
)
}
}
var
z
=
{
autoLocation
:
!
1
,
center
:
[
24
,
121
]
,
event
:
null
,
infoWindowAutoClose
:
!
0
,
interval
:
200
,
kml
:
[
]
,
loading
:
"\u8b80\u53d6\u4e2d…"
,
marker
:
[
]
,
markerCluster
:
!
1
,
markerFitBounds
:
!
1
,
notfound
:
"\u627e\u4e0d\u5230\u67e5\u8a62\u7684\u5730\u9ede"
,
polyline
:
[
]
,
zoom
:
8
}
,
x
=
0
,
y
=
0
,
w
=
{
}
,
w
=
{
greyscale
:
[
{
featureType
:
"all"
,
stylers
:
[
{
saturation
:
-
100
}
,
{
gamma
:
.5
}
]
}
]
}
;
s
.
prototype
=
new
google
.
maps
.
OverlayView
;
s
.
prototype
.
onAdd
=
function
(
)
{
this
.
div
.
appendTo
(
h
(
this
.
getPanes
(
)
.
overlayLayer
)
)
;
this
.
listeners
=
[
google
.
maps
.
event
.
addListener
(
this
,
"visible_changed"
,
this
.
onRemove
)
]
}
;
s
.
prototype
.
draw
=
function
(
)
{
var
b
=
this
.
getProjection
(
)
,
a
=
{
}
;
try
{
a
=
b
.
fromLatLngToDivPixel
(
this
.
get
(
"position"
)
)
,
this
.
div
.
css
(
{
left
:
a
.
x
+
"px"
,
top
:
a
.
y
+
"px"
,
display
:
"block"
}
)
,
this
.
text
&&
this
.
span
.
html
(
this
.
text
.
toString
(
)
)
}
catch
(
d
)
{
}
}
;
s
.
prototype
.
onRemove
=
function
(
)
{
h
(
this
.
div
)
.
remove
(
)
}
;
v
.
prototype
=
{
VERSION
:
"2.9.9"
,
_polylines
:
[
]
,
_polygons
:
[
]
,
_circles
:
[
]
,
_kmls
:
[
]
,
_directions
:
[
]
,
_directionsMarkers
:
[
]
,
bounds
:
new
google
.
maps
.
LatLngBounds
,
kml
:
function
(
b
,
a
)
{
var
d
=
{
}
,
c
=
{
preserveViewport
:
!
1
,
suppressInfoWindows
:
!
1
}
,
f
=
0
;
if
(
g
(
a
,
"kml"
)
)
if
(
"string"
===
typeof
a
.
kml
)
d
=
new
google
.
maps
.
KmlLayer
(
a
.
kml
,
c
)
,
d
.
setMap
(
b
)
,
this
.
_kmls
.
push
(
d
)
;
else
if
(
h
.
isArray
(
a
.
kml
)
)
for
(
f
=
0
;
f
<
a
.
kml
.
length
;
f
+=
1
)
"string"
===
typeof
a
.
kml
[
f
]
&&
(
d
=
new
google
.
maps
.
KmlLayer
(
a
.
kml
[
f
]
,
c
)
,
d
.
setMap
(
b
)
,
this
.
_kmls
.
push
(
d
)
)
}
,
direction
:
function
(
b
,
a
)
{
if
(
g
(
a
,
"direction"
)
&&
h
.
isArray
(
a
.
direction
)
)
for
(
var
d
=
0
;
d
<
a
.
direction
.
length
;
d
+=
1
)
this
.
directionService
(
a
.
direction
[
d
]
)
}
,
markers
:
function
(
b
,
a
,
d
)
{
var
c
=
{
}
,
f
=
0
,
e
=
0
,
l
=
c
=
0
,
k
=
[
]
,
m
=
[
]
;
y
=
x
=
0
;
k
=
this
.
_markers
;
if
(
!
d
||
0
===
k
.
length
&&
h
.
isArray
(
a
.
marker
)
)
for
(
e
=
0
,
f
=
a
.
marker
.
length
;
e
<
f
;
e
+=
1
)
c
=
a
.
marker
[
e
]
,
g
(
c
,
"addr"
)
&&
(
c
.
parseAddr
=
r
(
c
.
addr
,
!
0
)
,
"string"
===
typeof
c
.
parseAddr
?
this
.
markerByGeocoder
(
b
,
c
,
a
)
:
this
.
markerDirect
(
b
,
c
,
a
)
)
;
if
(
"modify"
===
d
)
for
(
m
=
this
.
_labels
,
e
=
0
,
f
=
a
.
marker
.
length
;
e
<
f
;
e
+=
1
)
if
(
g
(
a
.
marker
[
e
]
,
"id"
)
)
{
for
(
c
=
0
;
c
<
k
.
length
;
c
+=
1
)
a
.
marker
[
e
]
.
id
===
k
[
c
]
.
id
&&
g
(
a
.
marker
[
e
]
,
"addr"
)
&&
(
k
[
c
]
.
setPosition
(
new
google
.
maps
.
LatLng
(
a
.
marker
[
e
]
.
addr
[
0
]
,
a
.
marker
[
e
]
.
addr
[
1
]
)
)
,
g
(
a
.
marker
[
e
]
,
"text"
)
&&
(
g
(
k
[
c
]
,
"infoWindow"
)
?
"function"
===
typeof
k
[
c
]
.
infoWindow
.
setContent
&&
k
[
c
]
.
infoWindow
.
setContent
(
a
.
marker
[
e
]
.
text
)
:
(
k
[
c
]
.
infoWindow
=
new
google
.
maps
.
InfoWindow
(
{
content
:
a
.
marker
[
e
]
.
text
}
)
,
this
.
bindEvents
(
k
[
c
]
,
a
.
marker
[
e
]
.
event
)
)
)
,
g
(
a
.
marker
[
e
]
,
"icon"
)
&&
k
[
c
]
.
setIcon
(
a
.
marker
[
e
]
.
icon
)
)
;
c
=
0
;
for
(
l
=
m
.
length
;
c
<
l
;
c
+=
1
)
a
.
marker
[
e
]
.
id
===
m
[
c
]
.
id
&&
(
g
(
a
.
marker
[
e
]
,
"label"
)
&&
(
m
[
c
]
.
text
=
a
.
marker
[
e
]
.
label
)
,
m
[
c
]
.
draw
(
)
)
}
else
g
(
a
.
marker
[
e
]
,
"addr"
)
&&
(
a
.
marker
[
e
]
.
parseAddr
=
r
(
a
.
marker
[
e
]
.
addr
,
!
0
)
,
"string"
===
typeof
a
.
marker
[
e
]
.
parseAddr
?
this
.
markerByGeocoder
(
b
,
a
.
marker
[
e
]
)
:
this
.
markerDirect
(
b
,
a
.
marker
[
e
]
)
)
;
if
(
g
(
a
,
"markerCluster"
)
&&
!
0
===
a
.
markerCluster
&&
"function"
===
typeof
MarkerClusterer
)
return
new
MarkerClusterer
(
b
,
this
.
_markers
)
}
,
drawPolyline
:
function
(
b
,
a
)
{
var
d
=
{
}
,
c
=
0
,
f
=
{
}
,
e
=
{
}
,
f
=
{
}
,
l
=
0
,
k
=
0
,
f
=
{
}
,
m
=
[
]
,
f
=
{
}
,
q
=
[
]
,
t
=
{
}
;
if
(
g
(
a
,
"polyline"
)
&&
h
.
isArray
(
a
.
polyline
)
)
for
(
k
=
a
.
polyline
.
length
-
1
;
0
<=
k
;
k
-=
1
)
if
(
e
=
a
.
polyline
[
k
]
,
g
(
e
,
"coords"
)
&&
h
.
isArray
(
e
.
coords
)
)
{
for
(
var
n
=
new
google
.
maps
.
MVCArray
,
c
=
0
;
c
<
e
.
coords
.
length
;
c
+=
1
)
f
=
e
.
coords
[
c
]
,
f
=
r
(
f
,
!
0
)
,
"function"
===
typeof
f
.
lat
&&
n
.
push
(
f
)
;
f
=
h
.
extend
(
{
}
,
{
strokeColor
:
e
.
color
||
"#FF0000"
,
strokeOpacity
:
1
,
strokeWeight
:
e
.
width
||
2
}
,
e
)
;
d
=
new
google
.
maps
.
Polyline
(
f
)
;
this
.
_polylines
.
push
(
d
)
;
if
(
2
<
n
.
getLength
(
)
)
for
(
c
=
0
;
c
<
n
.
length
;
c
+=
1
)
0
<
c
&&
n
.
length
-
1
>
c
&&
q
.
push
(
{
location
:
n
.
getAt
(
c
)
,
stopover
:
!
1
}
)
;
g
(
e
,
"event"
)
&&
self
.
bindEvents
(
d
,
e
.
event
)
;
g
(
e
,
"snap"
)
&&
!
0
===
e
.
snap
?
(
f
=
new
google
.
maps
.
DirectionsService
,
f
.
route
(
{
origin
:
n
.
getAt
(
0
)
,
waypoints
:
q
,
destination
:
n
.
getAt
(
n
.
length
-
1
)
,
travelMode
:
google
.
maps
.
DirectionsTravelMode
.
DRIVING
}
,
function
(
b
,
a
)
{
if
(
a
===
google
.
maps
.
DirectionsStatus
.
OK
)
{
c
=
0
;
for
(
l
=
b
.
routes
[
0
]
.
overview_path
;
c
<
l
.
length
;
c
+=
1
)
m
.
push
(
l
[
c
]
)
;
d
.
setPath
(
m
)
;
"function"
===
typeof
e
.
getDistance
&&
(
t
=
b
.
routes
[
0
]
.
legs
[
0
]
.
distance
,
e
.
getDistance
.
call
(
this
,
t
)
)
}
}
)
)
:
(
d
.
setPath
(
n
)
,
g
(
google
.
maps
,
"geometry"
)
&&
g
(
google
.
maps
.
geometry
,
"spherical"
)
&&
"function"
===
typeof
google
.
maps
.
geometry
.
spherical
.
computeDistanceBetween
&&
(
t
=
google
.
maps
.
geometry
.
spherical
.
computeDistanceBetween
(
n
.
getAt
(
0
)
,
n
.
getAt
(
n
.
length
-
1
)
)
,
"function"
===
typeof
e
.
getDistance
&&
e
.
getDistance
.
call
(
this
,
t
)
)
)
;
d
.
setMap
(
b
)
}
}
,
drawPolygon
:
function
(
b
,
a
)
{
var
d
=
{
}
,
c
=
0
,
d
=
0
,
f
=
{
}
,
f
=
{
}
,
e
=
0
,
d
=
{
}
,
l
=
[
]
;
if
(
g
(
a
,
"polygon"
)
&&
h
.
isArray
(
a
.
polygon
)
)
for
(
e
=
a
.
polygon
.
length
;
c
<
e
;
c
+=
1
)
if
(
g
(
a
.
polygon
[
c
]
,
"coords"
)
)
{
for
(
d
=
0
;
d
<
a
.
polygon
[
c
]
.
coords
.
length
;
d
+=
1
)
f
=
a
.
polygon
[
c
]
.
coords
[
d
]
,
f
=
r
(
f
,
!
0
)
,
"function"
===
typeof
f
.
lat
&&
l
.
push
(
f
)
;
d
=
h
.
extend
(
{
}
,
{
path
:
l
,
strokeColor
:
a
.
polygon
[
c
]
.
color
||
"#FF0000"
,
strokeOpacity
:
1
,
strokeWeight
:
a
.
polygon
[
c
]
.
width
||
2
,
fillColor
:
a
.
polygon
[
c
]
.
fillcolor
||
"#CC0000"
,
fillOpacity
:
.35
}
,
a
.
polygon
[
c
]
)
;
d
=
new
google
.
maps
.
Polygon
(
d
)
;
g
(
a
.
polygon
[
c
]
,
"event"
)
&&
this
.
bindEvents
(
d
,
a
.
polygon
[
c
]
.
event
)
;
this
.
_polygons
.
push
(
d
)
;
d
.
setMap
(
b
)
}
}
,
drawCircle
:
function
(
b
,
a
)
{
var
d
=
0
,
c
=
{
}
,
f
=
{
}
,
e
=
{
}
,
f
=
{
}
;
if
(
g
(
a
,
"circle"
)
&&
h
.
isArray
(
a
.
circle
)
)
for
(
d
=
a
.
circle
.
length
-
1
;
0
<=
d
;
d
-=
1
)
e
=
a
.
circle
[
d
]
,
f
=
h
.
extend
(
{
}
,
{
map
:
b
,
strokeColor
:
e
.
color
||
"#FF0000"
,
strokeOpacity
:
e
.
opacity
||
.8
,
strokeWeight
:
e
.
width
||
2
,
fillColor
:
e
.
fillcolor
||
"#FF0000"
,
fillOpacity
:
e
.
fillopacity
||
.35
,
radius
:
e
.
radius
||
10
,
zIndex
:
100
,
id
:
g
(
e
,
"id"
)
?
e
.
id
:
""
}
,
e
)
,
g
(
e
,
"center"
)
&&
(
c
=
r
(
e
.
center
,
!
0
)
,
f
.
center
=
c
)
,
"function"
===
typeof
c
.
lat
&&
(
f
=
new
google
.
maps
.
Circle
(
f
)
,
this
.
_circles
.
push
(
f
)
,
g
(
e
,
"event"
)
&&
this
.
bindEvents
(
f
,
e
.
event
)
)
}
,
overlay
:
function
(
)
{
var
b
=
this
.
map
,
a
=
this
.
options
;
try
{
this
.
kml
(
b
,
a
)
,
this
.
direction
(
b
,
a
)
,
this
.
markers
(
b
,
a
)
,
this
.
drawPolyline
(
b
,
a
)
,
this
.
drawPolygon
(
b
,
a
)
,
this
.
drawCircle
(
b
,
a
)
,
this
.
streetView
(
b
,
a
)
,
this
.
geoLocation
(
b
,
a
)
}
catch
(
d
)
{
console
.
dir
(
d
)
}
}
,
markerIcon
:
function
(
b
)
{
var
a
=
h
.
extend
(
{
}
,
a
,
b
.
icon
)
;
if
(
g
(
b
,
"icon"
)
)
{
if
(
"string"
===
typeof
b
.
icon
)
return
b
.
icon
;
g
(
b
.
icon
,
"url"
)
&&
(
a
.
url
=
b
.
icon
.
url
)
;
g
(
b
.
icon
,
"size"
)
&&
h
.
isArray
(
b
.
icon
.
size
)
&&
2
===
b
.
icon
.
size
.
length
&&
(
a
.
size
=
new
google
.
maps
.
Size
(
b
.
icon
.
size
[
0
]
,
b
.
icon
.
size
[
1
]
)
)
;
g
(
b
.
icon
,
"scaledSize"
)
&&
h
.
isArray
(
b
.
icon
.
scaledSize
)
&&
2
===
b
.
icon
.
scaledSize
.
length
&&
(
a
.
scaledSize
=
new
google
.
maps
.
Size
(
b
.
icon
.
scaledSize
[
0
]
,
b
.
icon
.
scaledSize
[
1
]
)
)
;
g
(
b
.
icon
,
"anchor"
)
&&
h
.
isArray
(
b
.
icon
.
anchor
)
&&
2
===
b
.
icon
.
anchor
.
length
&&
(
a
.
anchor
=
new
google
.
maps
.
Point
(
b
.
icon
.
anchor
[
0
]
,
b
.
icon
.
anchor
[
1
]
)
)
}
return
a
}
,
markerDirect
:
function
(
b
,
a
)
{
var
d
=
{
}
,
c
=
{
}
,
c
=
{
}
,
c
=
g
(
a
,
"id"
)
?
a
.
id
:
""
,
d
=
g
(
a
,
"title"
)
?
a
.
title
.
toString
(
)
.
replace
(
/
<
(
[
^
>
]
+
)
>
/
g
,
""
)
:
!
1
,
f
=
g
(
a
,
"text"
)
?
a
.
text
.
toString
(
)
:
!
1
,
e
=
h
.
extend
(
{
}
,
{
map
:
b
,
position
:
a
.
parseAddr
,
animation
:
null
,
id
:
c
}
,
a
)
,
l
=
this
.
markerIcon
(
a
)
;
d
&&
(
e
.
title
=
d
)
;
f
&&
(
e
.
text
=
f
,
e
.
infoWindow
=
new
google
.
maps
.
InfoWindow
(
{
content
:
f
}
)
)
;
h
.
isEmptyObject
(
l
)
||
(
e
.
icon
=
l
)
;
g
(
a
,
"animation"
)
&&
"string"
===
typeof
a
.
animation
&&
(
e
.
animation
=
google
.
maps
.
Animation
[
a
.
animation
.
toUpperCase
(
)
]
)
;
d
=
new
google
.
maps
.
Marker
(
e
)
;
this
.
_markers
.
push
(
d
)
;
g
(
d
,
"position"
)
&&
(
"function"
===
typeof
d
.
getPosition
&&
this
.
bounds
.
extend
(
d
.
position
)
,
!
0
===
this
.
options
.
markerFitBounds
&&
this
.
_markers
.
length
===
this
.
options
.
marker
.
length
&&
b
.
fitBounds
(
this
.
bounds
)
)
;
if
(
!
0
===
this
.
options
.
markerCluster
&&
"function"
===
typeof
MarkerClusterer
&&
x
===
this
.
options
.
marker
.
length
)
return
new
MarkerClusterer
(
b
,
this
.
_markers
)
;
c
=
{
map
:
b
,
css
:
g
(
a
,
"css"
)
?
a
.
css
.
toString
(
)
:
""
,
id
:
c
}
;
"string"
===
typeof
a
.
label
&&
0
!==
a
.
label
.
length
&&
(
c
.
text
=
a
.
label
,
c
=
new
s
(
c
)
,
c
.
bindTo
(
"position"
,
d
,
"position"
)
,
c
.
bindTo
(
"text"
,
d
,
"position"
)
,
c
.
bindTo
(
"visible"
,
d
)
,
this
.
_labels
.
push
(
c
)
)
;
this
.
bindEvents
(
d
,
a
.
event
)
}
,
markerByGeocoder
:
function
(
b
,
a
)
{
var
d
=
this
;
(
new
google
.
maps
.
Geocoder
)
.
geocode
(
{
address
:
a
.
parseAddr
}
,
function
(
c
,
f
)
{
if
(
f
===
google
.
maps
.
GeocoderStatus
.
OVER_QUERY_LIMIT
)
u
.
setTimeout
(
function
(
)
{
d
.
markerByGeocoder
(
b
,
a
)
}
,
d
.
interval
)
;
else
if
(
f
===
google
.
maps
.
GeocoderStatus
.
OK
)
{
var
e
=
{
}
,
l
=
{
}
,
l
=
{
}
,
k
=
g
(
a
,
"id"
)
?
a
.
id
:
""
,
e
=
g
(
a
,
"title"
)
?
a
.
title
.
toString
(
)
.
replace
(
/
<
(
[
^
>
]
+
)
>
/
g
,
""
)
:
!
1
,
l
=
g
(
a
,
"text"
)
?
a
.
text
.
toString
(
)
:
!
1
,
k
=
{
map
:
b
,
position
:
c
[
0
]
.
geometry
.
location
,
animation
:
null
,
id
:
k
}
,
m
=
d
.
markerIcon
(
a
)
;
e
&&
(
k
.
title
=
e
)
;
l
&&
(
k
.
text
=
l
,
k
.
infoWindow
=
new
google
.
maps
.
InfoWindow
(
{
content
:
l
}
)
)
;
h
.
isEmptyObject
(
m
)
||
(
k
.
icon
=
m
)
;
g
(
a
,
"animation"
)
&&
"string"
===
typeof
a
.
animation
&&
(
k
.
animation
=
google
.
maps
.
Animation
[
a
.
animation
.
toUpperCase
(
)
]
)
;
k
=
h
.
extend
(
{
}
,
k
,
a
)
;
e
=
new
google
.
maps
.
Marker
(
k
)
;
d
.
_markers
.
push
(
e
)
;
g
(
e
,
"position"
)
&&
(
"function"
===
typeof
e
.
getPosition
&&
d
.
bounds
.
extend
(
e
.
position
)
,
!
0
===
d
.
options
.
markerFitBounds
&&
d
.
_markers
.
length
===
d
.
options
.
marker
.
length
&&
b
.
fitBounds
(
d
.
bounds
)
)
;
if
(
g
(
d
.
options
,
"markerCluster"
)
&&
"function"
===
typeof
MarkerClusterer
&&
y
===
d
.
options
.
marker
.
length
)
return
new
MarkerClusterer
(
b
,
d
.
_markers
)
;
l
=
{
map
:
d
.
map
,
css
:
g
(
a
,
"css"
)
?
a
.
css
.
toString
(
)
:
""
}
;
"string"
===
typeof
a
.
label
&&
0
!==
a
.
label
.
length
&&
(
l
.
text
=
a
.
label
,
l
=
new
s
(
l
)
,
l
.
bindTo
(
"position"
,
e
,
"position"
)
,
l
.
bindTo
(
"text"
,
e
,
"position"
)
,
l
.
bindTo
(
"visible"
,
e
)
,
d
.
_labels
.
push
(
l
)
)
;
d
.
bindEvents
(
e
,
a
.
event
)
}
}
)
}
,
directionService
:
function
(
b
)
{
if
(
g
(
b
,
"from"
)
&&
g
(
b
,
"to"
)
)
{
var
a
=
this
,
d
=
new
google
.
maps
.
DirectionsService
,
c
=
new
google
.
maps
.
DirectionsRenderer
,
f
=
{
travelMode
:
google
.
maps
.
DirectionsTravelMode
.
DRIVING
,
optimizeWaypoints
:
g
(
b
,
"optimize"
)
?
b
.
optimize
:
!
1
}
,
e
=
{
}
,
l
=
{
}
,
k
=
[
]
,
m
=
{
}
,
q
=
[
]
,
t
=
{
}
,
n
=
""
,
p
=
0
,
s
=
0
;
f
.
origin
=
r
(
b
.
from
,
!
0
)
;
f
.
destination
=
r
(
b
.
to
,
!
0
)
;
g
(
b
,
"travel"
)
&&
google
.
maps
.
TravelMode
[
b
.
travel
.
toString
(
)
.
toUpperCase
(
)
]
&&
(
f
.
travelMode
=
google
.
maps
.
TravelMode
[
b
.
travel
.
toString
(
)
.
toUpperCase
(
)
]
)
;
g
(
b
,
"panel"
)
&&
(
e
=
h
(
b
.
panel
)
)
;
if
(
g
(
b
,
"waypoint"
)
&&
h
.
isArray
(
b
.
waypoint
)
)
{
p
=
0
;
for
(
s
=
b
.
waypoint
.
length
;
p
<
s
;
p
+=
1
)
m
=
{
}
,
"string"
===
typeof
b
.
waypoint
[
p
]
||
h
.
isArray
(
b
.
waypoint
[
p
]
)
?
m
=
{
location
:
r
(
b
.
waypoint
[
p
]
,
!
0
)
,
stopover
:
!
0
}
:
(
g
(
b
.
waypoint
[
p
]
,
"location"
)
&&
(
m
.
location
=
r
(
b
.
waypoint
[
p
]
.
location
,
!
0
)
)
,
m
.
stopover
=
g
(
b
.
waypoint
[
p
]
,
"stopover"
)
?
b
.
waypoint
[
p
]
.
stopover
:
!
0
)
,
q
.
push
(
b
.
waypoint
[
p
]
.
text
||
b
.
waypoint
[
p
]
.
toString
(
)
)
,
k
.
push
(
m
)
;
f
.
waypoints
=
k
}
d
.
route
(
f
,
function
(
d
,
f
)
{
var
e
=
0
,
h
=
0
;
if
(
f
===
google
.
maps
.
DirectionsStatus
.
OK
)
{
e
=
d
.
routes
[
0
]
.
legs
;
g
(
b
,
"autoViewport"
)
&&
(
l
.
preserveViewport
=
!
1
===
b
.
autoViewport
?
!
0
:
!
1
)
;
try
{
for
(
g
(
b
,
"fromText"
)
&&
(
e
[
0
]
.
start_address
=
b
.
fromText
)
,
g
(
b
,
"toText"
)
&&
(
1
===
e
.
length
?
e
[
0
]
.
end_address
=
b
.
toText
:
e
[
e
.
length
-
1
]
.
end_address
=
b
.
toText
)
,
1
===
e
.
length
?
(
t
=
e
[
0
]
.
end_location
,
n
=
e
[
0
]
.
end_address
)
:
(
t
=
e
[
e
.
length
-
1
]
.
end_location
,
n
=
e
[
e
.
length
-
1
]
.
end_address
)
,
g
(
b
,
"icon"
)
&&
(
l
.
suppressMarkers
=
!
0
,
g
(
b
.
icon
,
"from"
)
&&
"string"
===
typeof
b
.
icon
.
from
&&
a
.
directionServiceMarker
(
e
[
0
]
.
start_location
,
{
icon
:
b
.
icon
.
from
,
text
:
e
[
0
]
.
start_address
}
)
,
g
(
b
.
icon
,
"to"
)
&&
"string"
===
typeof
b
.
icon
.
to
&&
a
.
directionServiceMarker
(
t
,
{
icon
:
b
.
icon
.
to
,
text
:
n
}
)
)
,
h
=
0
;
h
<
e
.
length
-
1
;
h
+=
1
)
e
[
h
]
.
end_address
=
q
[
h
]
,
g
(
b
,
"icon"
)
&&
g
(
b
.
icon
,
"waypoint"
)
&&
a
.
directionServiceMarker
(
e
[
h
]
.
start_location
,
{
icon
:
b
.
icon
.
waypoint
,
text
:
e
[
h
]
.
start_address
}
)
}
catch
(
k
)
{
}
a
.
bindEvents
(
c
,
b
.
event
)
;
c
.
setOptions
(
l
)
;
c
.
setDirections
(
d
)
}
}
)
;
c
.
setMap
(
a
.
map
)
;
e
.
length
&&
c
.
setPanel
(
e
.
get
(
0
)
)
;
a
.
_directions
.
push
(
c
)
}
}
,
directionServiceMarker
:
function
(
b
,
a
)
{
var
d
=
h
.
extend
(
{
}
,
{
position
:
b
,
map
:
this
.
map
}
,
a
)
,
c
=
{
}
;
g
(
d
,
"text"
)
&&
(
d
.
infoWindow
=
new
google
.
maps
.
InfoWindow
(
{
content
:
d
.
text
}
)
)
;
c
=
new
google
.
maps
.
Marker
(
d
)
;
this
.
_directionsMarkers
.
push
(
c
)
;
this
.
bindEvents
(
c
)
}
,
bindEvents
:
function
(
b
,
a
)
{
var
d
=
this
,
c
=
{
}
;
switch
(
typeof
a
)
{
case
"function"
:
google
.
maps
.
event
.
addListener
(
b
,
"click"
,
a
)
;
break
;
case
"object"
:
for
(
c
in
a
)
"function"
===
typeof
a
[
c
]
?
google
.
maps
.
event
.
addListener
(
b
,
c
,
a
[
c
]
)
:
g
(
a
[
c
]
,
"func"
)
&&
"function"
===
typeof
a
[
c
]
.
func
?
g
(
a
[
c
]
,
"once"
)
&&
!
0
===
a
[
c
]
.
once
?
google
.
maps
.
event
.
addListenerOnce
(
b
,
c
,
a
[
c
]
.
func
)
:
google
.
maps
.
event
.
addListener
(
b
,
c
,
a
[
c
]
.
func
)
:
"function"
===
typeof
a
[
c
]
&&
google
.
maps
.
event
.
addListener
(
b
,
c
,
a
[
c
]
)
}
g
(
b
,
"infoWindow"
)
&&
google
.
maps
.
event
.
addListener
(
b
,
"click"
,
function
(
)
{
var
a
=
0
,
c
=
{
}
;
if
(
g
(
d
.
options
,
"infoWindowAutoClose"
)
&&
!
0
===
d
.
options
.
infoWindowAutoClose
)
for
(
a
=
0
;
a
<
d
.
_markers
.
length
;
a
+=
1
)
c
=
d
.
_markers
[
a
]
,
g
(
c
,
"infoWindow"
)
&&
"function"
===
typeof
c
.
infoWindow
.
close
&&
c
.
infoWindow
.
close
(
)
;
b
.
infoWindow
.
open
(
d
.
map
,
b
)
}
)
}
,
streetView
:
function
(
b
,
a
)
{
var
d
=
{
}
,
c
=
g
(
a
,
"streetViewObj"
)
?
a
.
streetViewObj
:
{
}
,
f
=
{
heading
:
0
,
pitch
:
0
,
zoom
:
1
}
,
e
=
{
}
;
"function"
===
typeof
b
.
getStreetView
&&
g
(
a
,
"streetViewObj"
)
&&
(
d
=
b
.
getStreetView
(
)
,
g
(
c
,
"position"
)
?
(
e
=
r
(
c
.
position
,
!
0
)
,
c
.
position
=
"object"
!==
typeof
e
?
b
.
getCenter
(
)
:
e
)
:
c
.
position
=
b
.
getCenter
(
)
,
g
(
c
,
"pov"
)
&&
(
c
.
pov
=
h
.
extend
(
{
}
,
f
,
c
.
pov
)
)
,
g
(
c
,
"visible"
)
&&
d
.
setVisible
(
c
.
visible
)
,
d
.
setOptions
(
c
)
,
g
(
c
,
"event"
)
&&
this
.
bindEvents
(
d
,
c
.
event
)
)
}
,
panto
:
function
(
b
)
{
var
a
=
{
}
,
d
=
{
}
,
c
=
this
.
map
;
null
!==
c
&&
q
!==
c
&&
(
a
=
r
(
b
,
!
0
)
,
"string"
===
typeof
a
?
(
d
=
new
google
.
maps
.
Geocoder
,
d
.
geocode
(
{
address
:
a
}
,
function
(
b
,
a
)
{
a
===
google
.
maps
.
GeocoderStatus
.
OK
?
"function"
===
typeof
c
.
panTo
&&
b
.
length
&&
c
.
panTo
(
b
[
0
]
.
geometry
.
location
)
:
console
.
error
(
a
)
}
)
)
:
"function"
===
typeof
c
.
panTo
&&
c
.
panTo
(
a
)
)
}
,
clear
:
function
(
b
)
{
for
(
var
a
=
"marker,circle,polygon,polyline,direction,kml"
,
d
=
""
,
c
=
0
,
f
=
0
,
a
=
"string"
===
typeof
b
?
b
.
split
(
","
)
:
h
.
isArray
(
b
)
?
b
:
a
.
split
(
","
)
,
c
=
0
;
c
<
a
.
length
;
c
+=
1
)
{
d
=
"_"
+
h
.
trim
(
a
[
c
]
.
toString
(
)
.
toLowerCase
(
)
)
+
"s"
;
if
(
q
!==
this
[
d
]
&&
this
[
d
]
.
length
)
{
for
(
f
=
0
;
f
<
this
[
d
]
.
length
;
f
+=
1
)
this
.
map
===
this
[
d
]
[
f
]
.
getMap
(
)
&&
(
this
[
d
]
[
f
]
.
set
(
"visible"
,
!
1
)
,
this
[
d
]
[
f
]
.
set
(
"directions"
,
null
)
,
this
[
d
]
[
f
]
.
setMap
(
null
)
)
;
this
[
d
]
.
length
=
0
}
if
(
"direction"
===
a
[
c
]
)
for
(
f
=
0
;
f
<
this
.
_directionsMarkers
.
length
;
f
+=
1
)
this
.
_directionsMarkers
[
f
]
.
setMap
(
null
)
}
}
,
modify
:
function
(
b
)
{
var
a
=
[
]
,
d
=
[
[
"kml"
,
"kml"
]
,
[
"marker"
,
"markers"
]
,
[
"direction"
,
"direction"
]
,
[
"polyline"
,
"drawPolyline"
]
,
[
"polygon"
,
"drawPolygon"
]
,
[
"circle"
,
"drawCircle"
]
,
[
"streetView"
,
"streetView"
]
]
,
c
=
0
,
f
=
this
.
map
;
if
(
q
!==
b
)
{
for
(
c
=
0
;
c
<
d
.
length
;
c
+=
1
)
g
(
b
,
d
[
c
]
[
0
]
)
&&
a
.
push
(
d
[
c
]
[
1
]
)
;
if
(
null
!==
f
)
{
if
(
a
.
length
)
for
(
c
=
0
;
c
<
a
.
length
;
c
+=
1
)
"function"
===
typeof
this
[
a
[
c
]
]
&&
(
"streetView"
===
a
[
c
]
&&
(
b
.
streetViewObj
=
b
.
streetView
,
delete
b
.
streetView
)
,
this
[
a
[
c
]
]
(
f
,
b
,
"modify"
)
)
;
else
f
.
setOptions
(
b
)
;
g
(
b
,
"event"
)
&&
this
.
bindEvents
(
f
,
b
.
event
)
}
}
}
,
destroy
:
function
(
)
{
var
b
=
h
(
this
.
container
)
;
h
.
data
(
b
.
get
(
0
)
,
"tinyMap"
,
null
)
}
,
geoLocation
:
function
(
b
,
a
)
{
var
d
=
navigator
.
geolocation
;
d
&&
!
0
===
a
.
autoLocation
&&
d
.
getCurrentPosition
(
function
(
a
)
{
a
&&
g
(
a
,
"coords"
)
&&
b
.
panTo
(
new
google
.
maps
.
LatLng
(
a
.
coords
.
latitude
,
a
.
coords
.
longitude
)
)
}
,
function
(
a
)
{
console
.
error
(
a
)
}
,
{
maximumAge
:
6E5
,
timeout
:
3E3
,
enableHighAccuracy
:
!
1
}
)
}
,
init
:
function
(
)
{
var
b
=
this
,
a
=
{
}
;
"string"
===
typeof
b
.
options
.
center
?
(
a
=
new
google
.
maps
.
Geocoder
,
a
.
geocode
(
{
address
:
b
.
options
.
center
}
,
function
(
a
,
c
)
{
try
{
c
===
google
.
maps
.
GeocoderStatus
.
OVER_QUERY_LIMIT
?
b
.
init
(
)
:
c
===
google
.
maps
.
GeocoderStatus
.
OK
&&
0
!==
a
.
length
?
q
!==
a
[
0
]
&&
g
(
a
[
0
]
,
"geometry"
)
&&
(
b
.
googleMapOptions
.
center
=
a
[
0
]
.
geometry
.
location
,
b
.
map
=
new
google
.
maps
.
Map
(
b
.
container
,
b
.
googleMapOptions
)
,
google
.
maps
.
event
.
addListenerOnce
(
b
.
map
,
"idle"
,
function
(
)
{
b
.
overlay
(
)
}
)
,
b
.
bindEvents
(
b
.
map
,
b
.
options
.
event
)
)
:
console
.
error
(
c
)
}
catch
(
f
)
{
console
.
error
(
f
)
}
}
)
)
:
(
b
.
map
=
new
google
.
maps
.
Map
(
b
.
container
,
b
.
googleMapOptions
)
,
google
.
maps
.
event
.
addListenerOnce
(
b
.
map
,
"idle"
,
function
(
)
{
b
.
overlay
(
)
}
)
,
b
.
bindEvents
(
b
.
map
,
b
.
options
.
event
)
)
}
}
;
h
.
fn
.
tinyMap
=
function
(
b
)
{
var
a
=
arguments
,
d
=
[
]
,
c
=
{
}
;
return
"string"
===
typeof
b
?
(
this
.
each
(
function
(
)
{
c
=
h
.
data
(
this
,
"tinyMap"
)
;
c
instanceof
v
&&
"function"
===
typeof
c
[
b
]
&&
(
d
=
c
[
b
]
.
apply
(
c
,
Array
.
prototype
.
slice
.
call
(
a
,
1
)
)
)
}
)
,
q
!==
d
?
d
:
this
)
:
this
.
each
(
function
(
)
{
h
.
data
(
this
,
"tinyMap"
)
||
h
.
data
(
this
,
"tinyMap"
,
new
v
(
this
,
b
)
)
}
)
}
}
)
(
jQuery
,
window
,
document
)
;
Back
|
FazBrowse Home
|
New Git URL