Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8377871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:47:03+00:00 2026-06-09T15:47:03+00:00

Hello am trying to put some tweets on the google map by firstly extracting

  • 0

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.

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.

    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&rpp=10&include_entities=true&result_type=mixed&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 > 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);
    });
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:47:04+00:00Added an answer on June 9, 2026 at 3:47 pm

    Same root problem as this similar question. Can be solved with appropriate use of function closures on the asynchronous callbacks.

    Your issue with the infowindow is that there is no content (screen_name and contentString are undefined).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I've been trying to put some objects in an ASP.NET list box
hello i am trying to load a list of filenames from a folder into
Hello I was trying to remove objects from object array that I have and
Hello I'm trying something .. I was reading Jquery traversing documentations some forums, this
Greeting, I'm trying to put some Beanshell script in my Ant build.xml file. I've
In the code below I'm trying to take some text and wrap a html
I am trying to express what I understood from reading some articles about dom0
i am trying to put some word in tempfile via commandline temp file creat
hello i am trying to load images from files in the start of my
Hello I'm a newbie trying to use django to register some users, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.