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 72 73 74 75 76 77 78 79
| <script type="text/javascript">
// nouveau script
// Define your locations: HTML content for the info window, latitude, longitude
var locations = [ ['<h4 class="fleximaptitle">Zeppelin Museum Friedrichshafen</h4><p>Seestraße 22, 88045 Friedrichshafen, Deutschland</p> <p class="link"><a href="/freizeit-tipps/250" target="">Zeppelin Museum Friedrichshafen</a></p>',47.65051,9.4828]
,['<h4 class="fleximaptitle">Zentrum für Traditionelles Bogenschießen in Kinsau</h4><p>Bahnhofstraße 9, 86981 Kinsau, Deutschland</p> <p class="link"><a href="/freizeit-tipps/77" target="">Zentrum für Traditionelles Bogenschießen in Kinsau</a></p>',47.88052,10.88928]
,['<h4 class="fleximaptitle">Wurzacher Ried mit Erlebnisausstellung MOOR EXTREM</h4><p>Rosengarten 1, 88410 Bad Wurzach, Deutschland</p> <p class="link"><a href="/freizeit-tipps/70" target="">Wurzacher Ried mit Erlebnisausstellung MOOR EXTREM</a></p>',47.90951,9.89909]
,['<h4 class="fleximaptitle">Wildnisschule Allgäu in Rettenberg - Kranzegg</h4><p>Kranzegger Str. 11, 87549 Rettenberg, Deutschland</p> <p class="link"><a href="/freizeit-tipps/75" target="">Wildnisschule Allgäu in Rettenberg - Kranzegg</a></p>',47.5769213,10.3007459]
,['<h4 class="fleximaptitle">Wassertor Museum in Isny</h4><p>Wassertorstraße 52, 88316 Isny im Allgäu, Deutschland</p> <p class="link"><a href="/freizeit-tipps/167" target="">Wassertor Museum in Isny</a></p>',47.6942894,10.041416]
,['<h4 class="fleximaptitle">Wangener Puppentheater</h4><p>Lange G. 43, 88239 Wangen im Allgäu, Deutschland</p> <p class="link"><a href="/freizeit-tipps/90" target="">Wangener Puppentheater</a></p>',47.6858352,9.8358667]
,['<h4 class="fleximaptitle">Walsermuseum in Triesenberg</h4><p>Schlossstrasse 5, 9497 Triesenberg, Liechtenstein</p> <p class="link"><a href="/freizeit-tipps/330" target="">Walsermuseum in Triesenberg</a></p>',47.1184808,9.5429650999999]
,['<h4 class="fleximaptitle">Waldsee Therme</h4><p>Badstraße 16, 88339 Bad Waldsee, Deutschland</p> <p class="link"><a href="/freizeit-tipps/278" target="">Waldsee Therme</a></p>',47.9155778,9.7627785]
,['<h4 class="fleximaptitle">Waldschule Bodensee</h4><p>Fluh 49, 6900 Fluh, Österreich</p> <p class="link"><a href="/freizeit-tipps/162" target="">Waldschule Bodensee</a></p>',47.4924229,9.7910082]
,['<h4 class="fleximaptitle">Walderlebnis-Zentrum Ziegelwies bei Füssen</h4><p>Tiroler Str. 10, 87629 Füssen, Deutschland</p> <p class="link"><a href="/freizeit-tipps/161" target="">Walderlebnis-Zentrum Ziegelwies bei Füssen</a></p>',47.55769,10.69265]
];
var icons = ['images/mod_flexigooglemap/marker/ancient_relic_search_L_8x.png']
var iconsLength = icons.length;
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 10,
center: new google.maps.LatLng(-37.92, 151.25),
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
streetViewControl: false,
panControl: false,
zoomControlOptions: {
position: google.maps.ControlPosition.LEFT_BOTTOM
}
});
var infowindow = new google.maps.InfoWindow({
maxWidth: 160
});
var markers = new Array();
var iconCounter = 0;
// Add the markers and infowindows to the map
for (var i = 0; i < locations.length; i++) {
var marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
icon: icons[iconCounter]
});
markers.push(marker);
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
iconCounter++;
// We only have a limited number of possible icon colors, so we may have to restart the counter
if(iconCounter >= iconsLength) {
iconCounter = 0;
}
}
function autoCenter() {
// Create a new viewpoint bound
var bounds = new google.maps.LatLngBounds();
// Go through each...
for (var i = 0; i < markers.length; i++) {
bounds.extend(markers[i].position);
}
// Fit these bounds to the map
map.fitBounds(bounds);
}
var mcOptions = {gridSize:50, maxZoom:15};
var marker = new MarkerClusterer(map, markers, mcOptions);
autoCenter();
</script> |
Partager