The marker display on TOP position. How can we display in Left Position or Right Position ?
This is my Code, Please check it.
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3&sensor=false"></script>
<script type="text/javascript" src="markerwithlabel.js"></script>
<script type="text/javascript">
function initMap() {
var locations = [
['Manly Beach', -33.800, 151.287, 'BMW-4', 'marker_blue.png'],
['Maroubra Beach', -33.950198, 151.259302, 'BMW-5', 'default_marker.png']
];
var latLng = new google.maps.LatLng(-33.92, 151.25);
var map = new google.maps.Map(document.getElementById('map_canvas'), {
zoom: 12,
center: latLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
for (i = 0; i < locations.length; i++) {
var marker1 = new MarkerWithLabel({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map, labelContent: locations[i][3], labelAnchor: new google.maps.Point(22, 0),
labelClass: "labels", labelStyle: {opacity: 0.75}, icon: locations[i][4]
});
google.maps.event.addListener(marker1, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker1, i));
}
}
</script>