예제 #1
0
<?php

ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);
require 'lib/foursquare.php';
//echo Foursquare::getVenueByLatLng(29.671354,-95.320244);
$str = file_get_contents('foursquare3.json');
$json = json_decode($str, true);
$venues = array();
foreach ($json as $data) {
    $venue = Foursquare::getCitgoVenue($data["lat"], $data["lon"], $data["id"], $data["name"]);
    array_push($venues, $venue);
}
echo json_encode($venues);
<?php

session_start();
require_once 'connection.php';
require_once 'foursquare.php';
$data_foursq = new Foursquare();
?>
<!DOCTYPE html>
<head>
<script
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCqt0V2s8VlZHYEjC2k1k_rWhcSDVFxwfg">
</script>

<script>

var address1= "152, ethel road, edison, nj 08817, usa";
var address2= "16 Brotherhood St Piscataway Township, New Jersey";
//var address2= "170, ethel road, edison, nj 08817, usa";
var markers = new Array();
var bounds = new google.maps.LatLngBounds();
//console.log("bounds" + bounds);
function initialize()
{

	var myCenter =new google.maps.LatLng(55.508742,-0.120850);
	var myCenter1 ;//=new google.maps.LatLng(55.508742,-0.120850);

	var myCenter2 ;//=new google.maps.LatLng(51.508742,-0.120850);
	
var mapProp = {
  center:myCenter,
예제 #3
0
 public function populateItemTemplate(&$item)
 {
     return parent::populateItemTemplate($item) + array('link' => sprintf('http://foursquare.com/venue/%s', $item->venue->id), 'venue_image' => $item->venue->iconurl, 'venue_name' => $item->venue->name, 'venue_shout' => $item->shout, 'venue_time' => $item->created);
 }
예제 #4
0
 public static function search($params = array())
 {
     return Foursquare::retrieve('venues/search', $params);
 }