বুধবার, ১২ জুন, ২০১৩

<body onload="initializeMaps()">
<div style="background-color:#FFFFFF;" >

<script>
function initializeMaps() {

map = new google.maps.Map(document.getElementById("googleMap"), {
center: new google.maps.LatLng(0,0),
zoom:8,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR
},
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
});


addMarker('.$map["Latitude"].','.$map["Longatude"].',"<div>'.$map["City"].'</br>Instractor: Place Function</div>","./theme/default/images/lightgreen.png");

center = bounds.getCenter();

map.fitBounds(bounds);
}

var center = null;
var map = null;
var currentPopup;

var bounds = new google.maps.LatLngBounds();

function addMarker(lat, lng, info, icon_param) {
var icon = new google.maps.MarkerImage(
icon_param,
new google.maps.Size(40, 40),
new google.maps.Point(0, 0),
new google.maps.Point(16, 32)
);
var pt = new google.maps.LatLng(lat, lng);
bounds.extend(pt);
var marker = new google.maps.Marker({
position: pt,
icon: icon,
map: map
});

var popup = new google.maps.InfoWindow({
content: info,
maxWidth: 1000
});
google.maps.event.addListener(marker, "click", function() {
if (currentPopup != null) {
currentPopup.close();
currentPopup = null;
}
popup.open(map, marker);
currentPopup = popup;
});
google.maps.event.addListener(popup, "closeclick", function() {
map.panTo(center);
currentPopup = null;
});
}
</script>

<div id="googleMap" style="width:90%;height:340px;"></div>
</div><!--end of map-->
</body>
<body onload="initializeMaps()">
<div style="background-color:#FFFFFF;" >

<script>
function initializeMaps() {

map = new google.maps.Map(document.getElementById("googleMap"), {
center: new google.maps.LatLng(0,0),
zoom:8,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR
},
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
});


addMarker('.$map["Latitude"].','.$map["Longatude"].',"<div>'.$map["City"].'</br>Instractor: Place Function</div>","./theme/default/images/lightgreen.png");

center = bounds.getCenter();

map.fitBounds(bounds);
}

var center = null;
var map = null;
var currentPopup;

var bounds = new google.maps.LatLngBounds();

function addMarker(lat, lng, info, icon_param) {
var icon = new google.maps.MarkerImage(
icon_param,
new google.maps.Size(40, 40),
new google.maps.Point(0, 0),
new google.maps.Point(16, 32)
);
var pt = new google.maps.LatLng(lat, lng);
bounds.extend(pt);
var marker = new google.maps.Marker({
position: pt,
icon: icon,
map: map
});

var popup = new google.maps.InfoWindow({
content: info,
maxWidth: 1000
});
google.maps.event.addListener(marker, "click", function() {
if (currentPopup != null) {
currentPopup.close();
currentPopup = null;
}
popup.open(map, marker);
currentPopup = popup;
});
google.maps.event.addListener(popup, "closeclick", function() {
map.panTo(center);
currentPopup = null;
});
}
</script>

<div id="googleMap" style="width:90%;height:340px;"></div>
</div><!--end of map-->
</body>