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 8389861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:50:10+00:00 2026-06-09T18:50:10+00:00

I am using yahoo’s placemaker to extract location names from text. From this I

  • 0

I am using yahoo’s placemaker to extract location names from text. From this I get a callback function which gives me 2 different types of arrays.

this is the code am using but I CANT ANY of the values I want.

  Placemaker.getPlaces(text,function(o){
  if (typeof o.match!=='undefined' && o.match.length==1){
   latitude=o.match.place.centroid.latitude, longitude=o.match.place.centroid.longitude; 
   console.log(latitude,longitude);}

  if(typeof o.match !=='undefined'&& o.match.length==2){
    latitude=o[match].place.centroid.latitude,
    longitude=o[match].place.centroid.longitude;
   console.log(latitude,longitude);
      }

The first array looks like this

({
    match: {
        place: {
            woeId: "29007292",
            type: "Town",
            name: "Jubila, West Bengal, IN",
            centroid: {
                latitude: "23.1626",
                longitude: "87.7889"
            }
        },
        reference: [{
            woeIds: "29007292",
            placeReferenceId: "2",
            placeIds: "1",
            start: "14",
            end: "20",
            isPlaintextMarker: "1",
            text: "jubila",
            type: "plaintext",
            xpath: null
        }, {
            woeIds: "29007292",
            placeReferenceId: "3",
            placeIds: "1",
            start: "82",
            end: "88",
            isPlaintextMarker: "1",
            text: "jubila",
            type: "plaintext",
            xpath: null
        }]
    }
})

and the other one like this

({
    match: [{
        place: {
            woeId: "23424950",
            type: "Country",
            name: "Spain",
            centroid: {
                latitude: "39.8949",
                longitude: "-2.98831"
            }
        },
        reference: {
            woeIds: "23424950",
            placeReferenceId: "1",
            placeIds: "1",
            start: "64",
            end: "70",
            isPlaintextMarker: "1",
            text: "Espa\xF1a",
            type: "plaintext",
            xpath: null
        }
    }, {
        place: {
            woeId: "24865675",
            type: "Continent",
            name: "Europe",
            centroid: {
                latitude: "52.9762",
                longitude: "7.85784"
            }
        },
        reference: {
            woeIds: "24865675",
            placeReferenceId: "2",
            placeIds: "2",
            start: "93",
            end: "99",
            isPlaintextMarker: "1",
            text: "Europa",
            type: "plaintext",
            xpath: null
        }
    }]
})
  • 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-09T18:50:11+00:00Added an answer on June 9, 2026 at 6:50 pm

    change

    if (typeof o.match!=='undefined' && o.match.length==1){
    

    to

    if (typeof o.match!=='undefined'){
    

    For second:

    for(var i in o.match) {
     console.log(o.match[i].place.centroid.latitude); //wil show all lat's in loop
    }
    

    or if you want first lattitude only:

    console.log(o.match[0].place.centroid.latitude); //will show only first lat
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using YAHOO.util.Connect.asyncRequest to get data from database, here is the code : function
I'm using Yahoo Placemaker API which gives different structure of json depending on input.
I'm attempting to get order data from a Yahoo store. I'm using the docs
I'm currently using Yahoo Pipes which provides me with a JSON file from an
I want to extract the number 1129 from 10px;> 1129 using Yahoo pipes regex.
Using Yahoo Pipes, is it possible to poll this url http://feedproxy.google.com/~r/Techcrunch/~3/P-_qWQXyAPU/ and get the
I am using yahoo pipes to get content matching a certian category from my
I am getting news from Yahoo using an RSS feed, using: XML.load(http://finance.yahoo.com/rss/topstories) Yea this
I'm using Yahoo Finance API like this: http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=l1 That gives me the current rates
I am using Yahoo Answers API to build a c# desktop application which goes

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.