<div class="amds-map">

    <div id="map_canvas" class="mapping"></div>

</div>
<script>
    function initialize() {
        var map;
        var bounds = new google.maps.LatLngBounds();
        var mapOptions = {
            mapTypeId: 'roadmap',
            disableDefaultUI: true
        };

        // Display a map on the page
        map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
        map.setTilt(45);

        // Multiple Markers
        var markers = [
            ['Krumpholz Kunststofftechnik', 50.1777179, 11.2343184],
            ['Krumpholz Formenbau', 50.24206, 11.33433],

        ];

        var infoWindowContent = [
            ['<div class="info_content brand-red"><h4>Kunststofftechnik</h4><a href="https://maps.google.com/maps?ll=50.177707,11.23422&z=21&t=m&hl=de-DE&gl=US&mapclient=apiv3&cid=15841944448714009285">Route planen</a></div>'],
            ['<div class="info_content brand-blue"><h4>Formenbau</h4><a href="https://maps.google.com/maps?ll=50.241755,11.334223&z=19&t=m&hl=de-DE&gl=US&mapclient=apiv3&cid=6663813665544054858">Route planen</a></div>'],

        ];

        // Display multiple markers on a map
        var infoWindow = new google.maps.InfoWindow(), marker, i;

        // Loop through our array of markers & place each one on the map
        for (i = 0; i < markers.length; i++) {
            var position = new google.maps.LatLng(markers[i][1], markers[i][2]);
            bounds.extend(position);
            marker = new google.maps.Marker({
                position: position,
                map: map,
                title: markers[i][0]

            });

            // Allow each marker to have an info window
            google.maps.event.addListener(marker, 'click', (function (marker, i) {
                return function () {
                    infoWindow.setContent(infoWindowContent[i][0]);
                    infoWindow.open(map, marker);
    }
    })(marker, i));

    // Automatically center the map fitting all markers on the screen
    map.fitBounds(bounds);
    }

        // Override our map zoom level once our fitBounds function runs (Make sure it only runs once)
        var boundsListener = google.maps.event.addListener((map), 'bounds_changed', function (event) {
            this.setZoom(11);
            google.maps.event.removeListener(boundsListener);
        });

    }
</script>
<script src="//maps.googleapis.com/maps/api/js?key=AIzaSyBHBd2NWtehLQZIterKEGMrV9KzpUrXoW0&sensor=false&callback=initialize"></script>
