I have an info-card that needs to be populated with an address, date, and time. This should happen when user selects an address from the options drop down menu. As it is now, I am using PHP 5.4 to grab records from MySql, and display address as values for select options. I have the date and time showing up as content in info-window (Google map), however I also need address, date, and time to show up (one at a time, based on user selection) in info-card area (please see webstie–yardsalendipity.com
I’ve given a small snippet here to give an idea of how I have things set up. I can give more on request if that’s ok.
Code samples:
Select options
<select id="end" onchange="calcRoute();" class="form-control">
<option value="select" id="option-style">please select destination </option>
<?php foreach($data as $full_address) { ?>
<option value="<?php echo $full_address['full_address']; ?>"><?php echo $full_address['full_address']; ?></option>
<?php } ?>
</select>
(function(i, marker)
{
google.maps.event.addListener(marker, 'click', function()
{
var infowindow = new google.maps.InfoWindow({
content : coords[i].full_address + '<br>' + coords[i].start_date + " " + "THRU" + " " + coords[i].end_date + "<br>" + coords[i].start_time + " " + "TO" + " " + coords[i].end_time
});
infowindow.open(map, marker);
});
})(i, marker);
Really appreciate any time given to look at this,
Thanks