Skip to content

Instantly share code, notes, and snippets.

@geoah
Created June 25, 2015 23:37
Show Gist options
  • Save geoah/6a09db5252981379c42d to your computer and use it in GitHub Desktop.
Save geoah/6a09db5252981379c42d to your computer and use it in GitHub Desktop.
<?php
header("content-type: application/json; charset=UTF-8");
$aFilteredPlaces = array();
foreach($aSearchResults as $iResNum => $aPointDetails)
{
$aPlace = array();
$aPlace['lat'] = (float) $aPointDetails['lat'];
$aPlace['lng'] = (float) $aPointDetails['lon'];
$aPlace['description'] = $aPointDetails['name'];
$aFilteredPlaces[] = $aPlace;
}
javascript_renderData($aFilteredPlaces);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment