Hi,
I modify your code to add a streetview, And I obtain an error on the
method new google.maps.StreetViewPanorama when I defined explicitely
the version of googlemap.
If you do a copy paste, you can see that.
Why I can't define a version correctly?
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /
>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: 3 Maps</title>
<script type="text/javascript" src="
http://maps.google.com/maps/api/js?
v=3.0&sensor=false"></script>
<script type="text/javascript">
var map;
function addMarker(id, center, zoom, markerPosition, map) {
var marker = new google.maps.Marker({
position: markerPosition,
map: map
});
}
function initialize() {
var location = new google.maps.LatLng(57.312139, 25.27173);
var country = new google.maps.LatLng(57.123967, 24.01675);
for (var i = 1; i <= 3; i++) {
if (i == 1) {
map = new
google.maps.Map(document.getElementById("map1"), {
zoom: 1,
center: location,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
//init StreetView
var panoramaOptions = {
addressControl: false,
pov: {
heading: 394,
pitch: -3.333333333333332,
zoom: 1
}
};
panorama = new
google.maps.StreetViewPanorama(document.getElementById("pano"),
panoramaOptions);
map.setStreetView(panorama);
}
addMarker("map1", i == 1 ? country : location, 4 + i * i,
location,map);
}
}
</script>
</head>
<body onload="initialize()">
<div id="map1" style="width:400px; height:250px; margin: 8px;
border: 1pt solid black;"></div>
<div id="map2" style="width:400px; height:250px; margin: 8px;
border: 1pt solid black;"></div>
<div id="map3" style="width:400px; height:250px; margin: 8px;
border: 1pt solid black;"></div>
<div id="pano" style="width: 425px; height: 500px;float:left"></
div>
</body>
</html>