我试图在opencart中找到我可以在我的网站中插入Google地图的文件。 谁知道我可以在哪个文件中插入此代码? (我知道有模块,但我想尝试这种方式)
** ---->这些是coords
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Maps Multiple Markers</title>
<script src="http://maps.google.com/maps/api/js?sensor=false"
type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 600px; height: 400px;"></div>
<script type="text/javascript">
var locations = [
['Vlachiotis 230 55, Greece', **********,*************, 7],
['5is Maiou, Skala 230 51, Greece', **********,*************, 6],
['Thales Koutoupi, Skala 230 51, Greece', **********,*************, 4],
['EO Spartis Githiou, Githio 232 00, Greece', **********,*************, 5],
['Vasileos Georgiou 47, Githio 232 00, Greece', **********,*************, 3],
['Petrompei Mavromichali, Githio 232 00, Greece', **********,*************, 2],
['Mavrovouni 232 00, Greece', **********,*************, 1]
];
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: new google.maps.LatLng(36.82, 22.61),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
var marker, i;
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
}
</script>
</body>
</html>