282 lines
6.4 KiB
JavaScript
282 lines
6.4 KiB
JavaScript
// Front page map
|
|
var map, map2;
|
|
var centerPos = new google.maps.LatLng(51.512161,-0.088721);
|
|
|
|
var style =
|
|
[
|
|
[ // mapStyle 0
|
|
{
|
|
"featureType": "landscape",
|
|
"elementType": "labels",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "transit",
|
|
"elementType": "labels",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "poi",
|
|
"elementType": "labels",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "water",
|
|
"elementType": "labels",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road",
|
|
"elementType": "labels.icon",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"stylers": [
|
|
{
|
|
"hue": "#00aaff"
|
|
},
|
|
{
|
|
"saturation": -100
|
|
},
|
|
{
|
|
"gamma": 2.15
|
|
},
|
|
{
|
|
"lightness": 12
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road",
|
|
"elementType": "labels.text.fill",
|
|
"stylers": [
|
|
{
|
|
"visibility": "on"
|
|
},
|
|
{
|
|
"lightness": 24
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road",
|
|
"elementType": "geometry",
|
|
"stylers": [
|
|
{
|
|
"lightness": 57
|
|
}
|
|
]
|
|
}
|
|
],
|
|
[ // mapStyle 1
|
|
{
|
|
"featureType": "water",
|
|
"elementType": "geometry",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 17
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "landscape",
|
|
"elementType": "geometry",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 20
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road.highway",
|
|
"elementType": "geometry.fill",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 17
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road.highway",
|
|
"elementType": "geometry.stroke",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 29
|
|
},
|
|
{
|
|
"weight": 0.2
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road.arterial",
|
|
"elementType": "geometry",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 18
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "road.local",
|
|
"elementType": "geometry",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 16
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "poi",
|
|
"elementType": "geometry",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 21
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"elementType": "labels.text.stroke",
|
|
"stylers": [
|
|
{
|
|
"visibility": "on"
|
|
},
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 16
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"elementType": "labels.text.fill",
|
|
"stylers": [
|
|
{
|
|
"saturation": 36
|
|
},
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 30
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"elementType": "labels.icon",
|
|
"stylers": [
|
|
{
|
|
"visibility": "off"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "transit",
|
|
"elementType": "geometry",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 19
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "administrative",
|
|
"elementType": "geometry.fill",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 20
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"featureType": "administrative",
|
|
"elementType": "geometry.stroke",
|
|
"stylers": [
|
|
{
|
|
"color": "#000000"
|
|
},
|
|
{
|
|
"lightness": 17
|
|
},
|
|
{
|
|
"weight": 1.2
|
|
}
|
|
]
|
|
}
|
|
]
|
|
];
|
|
|
|
var mapStyle = $('#map').attr('data-mapStyle'),
|
|
options = {
|
|
center: centerPos,
|
|
zoom: 11,
|
|
zoomControl: true,
|
|
zoomControlOptions: {
|
|
style: google.maps.ZoomControlStyle.SMALL,
|
|
},
|
|
disableDoubleClickZoom: true,
|
|
mapTypeControl: false,
|
|
scaleControl: false,
|
|
scrollwheel: false,
|
|
panControl: false,
|
|
streetViewControl: false,
|
|
draggable : true,
|
|
overviewMapControl: false,
|
|
overviewMapControlOptions: {
|
|
opened: false,
|
|
},
|
|
mapTypeId: google.maps.MapTypeId.ROADMAP
|
|
};
|
|
|
|
// map = new google.maps.Map($('#map')[0], options);
|
|
// map.setOptions({
|
|
// styles: style[mapStyle]
|
|
// });
|