How to Display GPS Coordinate in Listing Page of phpMyDirectory

If you are using phpMyDirectory and would like to display GPS Coordinate in listing page, this is the modification required.

To do this, 2 files have to be modified,

  1. listing.php -> located in the root of phpMyDirectory installation
  2. listing_default.tpl -> located in template directory


Search following code,


Add the following codes directly below


and save it.


Search following code,

<?php echo $map; ?>

Add the following codes directly above it,

<h2>GPS Coordinate, Location and Map</h2>
<strong>Latitude : </strong><?php echo $latitude; ?><br />
<strong>Longitude : </strong><?php echo $longitude; ?><br /><br />

and save it.