-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparallaxchild-map.js
71 lines (66 loc) · 1.84 KB
/
parallaxchild-map.js
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
* This file is for any custom JavaScript.
*
* @author SunlitStudio
* @link https://sunlitstud.io
* @version 1.1.0
* @license GPL-2.0+
*/
'use strict';
/* Create grayscale map */
var znetMap = (function() {
return {
init: function() {
var stylez = [{
featureType: "all",
elementType: "all",
stylers: [{
saturation: -100
} // <-- THIS
]
}];
var mapCanvas = document.getElementById('map_canvas'),
contentString = '<div id="content">' +
'<div id="siteNotice">' +
'</div>' +
'<h1 id="firstHeading" class="firstHeading">Xenon Headquarters</h1>' +
'<div id="bodyContent"' +
'<p>Irvine, CA</p>' +
'</div>' +
'</div>',
myLatlng = new google.maps.LatLng(33.695030, -117.835692),
mapCenter = new google.maps.LatLng(33.695030, -117.835692),
mapOptions = {
center: mapCenter,
zoom: 13,
scrollwheel: false,
draggable: true,
disableDefaultUI: true,
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.ROADMAP, "tehgrayz"]
}
},
map = new google.maps.Map(mapCanvas, mapOptions),
infowindow = new google.maps.InfoWindow({
content: contentString,
maxWidth: 300
}),
marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Xenon (California)'
}),
mapType = new google.maps.StyledMapType(stylez, {
name: "Grayscale"
});
map.mapTypes.set("tehgrayz", mapType);
map.setMapTypeId("tehgrayz");
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map, marker);
});
}
};
}());
jQuery(document).ready(function($) {
znetMap.init();
});