gmaps.init.js
1.04 KB
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
34
35
36
37
38
39
40
41
42
$(
function() {
function initMap() {
var newLat = window.lat;
var lng = window.lon;
var styles = [{
stylers: [
{ saturation: -100 }
]
}];
map = new GMaps({
el: '#map',
lat: newLat,
lng: lng,
zoomControl: true,
zoomControlOpt: {
style: 'SMALL',
position: 'TOP_LEFT'
},
panControl: false,
streetViewControl: false,
mapTypeControl: false,
overviewMapControl: false,
scrollwheel: false,
draggable: false,
styles: styles,
zoom: 14
});
var image = '/img/marker2.png';
map.addMarker({
lat: newLat,
lng: lng,
icon: image
});
}
window.initMap = initMap();
}
);