hoàn thành trang about.html
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
function initMap() {
|
||||
var myLatlng = new google.maps.LatLng(10.0152624, 105.7382512);
|
||||
var myOptions = {
|
||||
zoom: 15,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
}
|
||||
var map;
|
||||
var mapElement=document.getElementById("map");
|
||||
|
||||
if (typeof(mapElement) != 'undefined' && mapElement != null)
|
||||
{
|
||||
map = new google.maps.Map(mapElement, myOptions);
|
||||
}
|
||||
var contentString = '<div id="map-info-marker">'+
|
||||
'<h1>Bệnh viện Đột Qụy Tim mạch Cần Thơ</h1>'+
|
||||
'<div>'+
|
||||
"<p>397 NGUYỄN VĂN CỪ STREET, AN BÌNH WARD, NINH KIỀU DISTRICT</p>"+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
content: contentString,
|
||||
maxWidth: 700
|
||||
});
|
||||
|
||||
var companyImage = new google.maps.MarkerImage(path+'pin.png',
|
||||
new google.maps.Size(51,69),
|
||||
new google.maps.Point(0,0)
|
||||
);
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: myLatlng,
|
||||
map: map,
|
||||
icon: companyImage,
|
||||
title: 'Bệnh Viện Đột Qụy Tim Mạch Cần Thơ'
|
||||
});
|
||||
|
||||
marker.addListener('click', function() {
|
||||
infowindow.open(map, marker);
|
||||
});
|
||||
infowindow.open(map, marker);
|
||||
}
|
||||
//google.maps.event.addDomListener(window, "load", initialize);
|
||||
Reference in New Issue
Block a user