Flickr and Google Maps Notes
Flickr and Google Maps Notes
Flickr and Google Maps Notes
<!--Linking to the
jQuery library.-->
<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);