Created
July 29, 2013 18:21
-
-
Save Avidid/6106420 to your computer and use it in GitHub Desktop.
Display Nominatim search results in a table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if (!$results->error && $results->total != '0'): ?> | |
| <h3>Parks</h3> | |
| <div id="parkData"> | |
| <?php $counter = 1 ;?> | |
| <table> | |
| <tr><td><b>#</b></td><td width="150px"><b>Name</b></td><td width="175px"><b>Address</b></td><td width="100px"><b>Distance</b></td></tr> | |
| <?php foreach ($results as &$result): ?> | |
| <tr> | |
| <td><?php echo $counter++ ;?></td> | |
| <td><?php echo $result->address->park;?></td> | |
| <td><?php echo $result->address->road;?></td> | |
| <td><span id="<?php echo $counter++;?>distance" class="ellipsis"></span> Miles</td> | |
| </tr> | |
| <?php endforeach; ?> | |
| <?php unset($result); ?> | |
| </table> | |
| </div> | |
| <?php endif; ?> | |
| <p style="font-size:10px; text-align:right">Nominatim Search Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png"></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment