I am currently doing a Google Map as of the moment. I don't have any PhP file, all I have is my HTML Java Script My problem is, When I click or hover my marker there will be a Pop out message there the InforMessage, What really need to do is, I want to make a PHP file so and the inside of the php file will be transfer to that InfoMessage on the marker. And the inside of the php file is 1 or 2 Image then the following description. Here is my PHP and Java Scrip Codes:
you can edit it, sorry in advance I am just getting to used PHP JS :)
=HTML=
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jav.js"></script>
</head>
<body>
<div id="map"></div>
<!--<script src="https://maps.googleapis.com/maps/api/js"
async defer></script>-->
<script src="https://maps.googleapis.com/maps/api/js?callback=initMap"
async defer></script>
</body>
</html>
=Javascript=
function initMap() {
var myLatLng = {lat: 18.2050, lng: 120.7920};
var laoagLatLng = {lat: 18.196257 , lng: 120.593041};
var locations = [
{name:"Bangui", lat:18.509124, lng:120.748283},
{name:"Batac", lat: 18.045672, lng:120.592285},
{name:"Burgos", lat:18.474150, lng:120.615543},
{name:"Laoag City", lat: 18.196379, lng: 120.594239},
{name:"Marcos", lat:18.032340, lng:120.709952},
{name:"Pagudpud", lat:18.563691, lng:120.872484},
{name:"Paoay", lat:18.074607, lng:120.516002},
{name:"Pasuquin", lat:18.409917, lng:120.619044},
];
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: myLatLng,
});
for (i = 0; i < locations.length; i++) {
var marker = new google.maps.Marker({
position: locations[i],
icon: 'img/muni.png',
map: map,
title: locations[i].name
});
marker.setMap(myLatLng);
}
}
Thanks you in advance