Flickr and Google Maps Notes

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 1

Google maps api connect to Flickr CDN in jquery

<!--Linking to the
jQuery library.-->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>

<!--Linking to the Google Maps API-->

<script type="text/javascript"

src="https://maps.googleapis.com/maps/api/js?key=YOUR_GOOGLE_MAPS_API_KEY&sensor=true">

</script>

<script type="text/javascript">

var lat = 0;

var long = 0;

$(document).ready(function(){

//Connects to the Flickr API and reads the results of the query into a JSON array. This query uses the 'flickr.photos.search'
method to access all the photos in a particular person's user account. It also uses arguments to read in the latitude and
longitude of each picture. It passes the resultant JSON array to the 'displayImages3' function below.

$.getJSON("http://api.flickr.com/services/rest/?
method=flickr.photos.search&api_key=YOUR_FLICKR_API_KEY_HERE&user_id=YOUR_FLICKR_ID_HERE&has_geo=1&extras=
geo&format=json&jsoncallback=?", displayImages3);

You might also like