Note that there are some explanatory texts on larger screens.

plurals
  1. POtrouble getting all the tweets shown on the google map using javascript
    primarykey
    data
    text
    <p>Hello am trying to put some tweets on the google map by firstly extracting the location from text of the tweet using the js-placemaker, yahoo's web service for geolocating texts from any type of data.</p> <p>The problem is that am placing the different markers on the map but am getting only the last tweet from twitter resutlts callback and am seeing the same profile_img_url on every marker on the map.I also cant get the infowindows to work. </p> <pre><code> function codeAddress(){ var geocoder = new google.maps.Geocoder();; var mapOptions = { center: new google.maps.LatLng(35.74651,-39.46289), zoom: 2, mapTypeId: google.maps.MapTypeId.ROADMAP }; // added this var bounds = new google.maps.LatLngBounds(); // create the map var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); $.getJSON("http://search.twitter.com/search.json?q=%23euronews&amp;rpp=10&amp;include_entities=true&amp;result_type=mixed&amp;callback=?", function (data) { $.each(data.results, function (i, item) { var screen_name = item.screen_name; var contentString=screen_name; var img = item.profile_image_url; var text=item.text; var profile_img=item.profile_image_url; var url=(item.entities.urls.length &gt; 0 ? item.entities.urls[0].url : ''); // var latitude,longitude; Placemaker.getPlaces(text, function(o){ console.log(o); var latitude=o.match.place.centroid.latitude, longitude=o.match.place.centroid.longitude; var myLatLng = new google.maps.LatLng(latitude, longitude); var marker = new google.maps.Marker({ icon: img, title: screen_name, map: map, position: myLatLng }); var infowindow = new google.maps.InfoWindow({ content: contentString }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); bounds.extend(myLatLng); }); }); // map.fitBounds(bounds); }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload