Buildings Map

by Max Shu

HTML

<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<div id='hse_buildings'></div>

CSS

#hse_buildings {
    height:500px;
    width:100%;
}

.gm-style-iw h4, .gm-style-iw p {
    margin: 0;
    padding: 0;
}

.pseudo_link, a.pseudo_link {
  border-bottom: 1px dashed;
  cursor: pointer;
  text-decoration: none;
}

JavaScript

function init() {
		var mapOptions = {
			center: new google.maps.LatLng(55.753277,37.58181),
			zoom: 10,
			zoomControl: true,
			zoomControlOptions: {
				style: google.maps.ZoomControlStyle.DEFAULT,
			},
			disableDoubleClickZoom: true,
			mapTypeControl: false,
			scaleControl: true,
			scrollwheel: true,
			panControl: true,
			streetViewControl: true,
			draggable : true,
			overviewMapControl: true,
			overviewMapControlOptions: {
				opened: false,
			},
			mapTypeId: google.maps.MapTypeId.ROADMAP,
			styles: [ { "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 } ] } ],
		}
		var mapElement = document.getElementById('hse_buildings');
		var map = new google.maps.Map(mapElement, mapOptions);
		var blue = 'https://hse.ru/data/2016/03/28/1127836268/pointer_blue.png'
		var gray = '/data/2016/03/28/1127834010/pointer_gray.png'
		var orange = 'https://hse.ru/data/2016/03/28/1127833920/pointer_orange.png'
		var locations = [
['ул. Мясницкая, д. 11', '#A', 55.76126972162633, 37.63201728028719, blue],
['ул. Мясницкая, д. 18', '#AB', 55.761160821805944, 37.63251630000002, blue],
['ул. Мясницкая, д. 20', '#AC', 55.76140198374939, 37.633131808598364, blue],
['ул. Мясницкая, д. 22, стр. 1', '#AD', 55.7615911, 37.63356490000001, blue],
['ул. Мясницкая,...