Question - place pegman behind markers
HTML
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false"></script>
<body onload="initialize()">
<div id="map_canvas"
style="position: absolute; top: 10%; left: 0; right: 0;
height:45%;"></div>
<div id="pano"
style="position: absolute; bottom: 0; left: 0; right: 0;
height:45%;"></div>
<div id="listener"
style="position: absolute; top:0; left: 0; right: 0; height:10%;"></div>
</body>
JavaScript
var map;
var panorama;
var streetView;
function initialize() {
map = new google.maps.Map(
document.getElementById("map_canvas"), {
zoom: 14,
center: new google.maps.LatLng(54.976, -2.021),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
panorama = new google.maps.StreetViewPanorama(
document.getElementById("pano")
);
map.setStreetView(panorama);
streetView = map.getStreetView();
streetView.setPosition( new google.maps.LatLng(54.976, -2.021) );
var marker1 = new google.maps.Marker({
position: new google.maps.LatLng(54.975, -2.020),
map: map,
zIndex: google.maps.Marker.MAX_ZINDEX + 1,
optimized: false,
draggable:true
});
google.maps.event.addListener(
marker1,
'dragend',
function(event){
var dragPosition =
new google.maps.LatLng(event.latLng.lat(), event.latLng.lng());
self_.currentLable = dragPosition;
map = new google.maps.Map(
document.getElementById("map_canvas"), {
zoom: 14,
center: new google.maps.LatLng(54.976, -2.021),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
});
}