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

  • Home
  • SEARCH
  • 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 6328667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:30:02+00:00 2026-05-24T17:30:02+00:00

I am working on one iPhone app which needs latitude and longitude from address.

  • 0

I am working on one iPhone app which needs latitude and longitude from address. I am using Google Map API for Geo coding but I could not able to parse the result returned by it. Result is in Json format and all I want form that result is Latitude and Longitude.
I tried to look over earlier posts and available API but it did not worked out. Can any one help me out here ?

Following is the string returned by the Google Request.

  "results" : [
  {
     "address_components" : [
        {
           "long_name" : "15220",
           "short_name" : "15220",
           "types" : [ "street_number" ]
        },
        {
           "long_name" : "N Western Ave",
           "short_name" : "N Western Ave",
           "types" : [ "route" ]
        },
        {
           "long_name" : "Edmond",
           "short_name" : "Edmond",
           "types" : [ "locality", "political" ]
        },
        {
           "long_name" : "Oklahoma City",
           "short_name" : "Oklahoma City",
           "types" : [ "administrative_area_level_3", "political" ]
        },
        {
           "long_name" : "Oklahoma",
           "short_name" : "Oklahoma",
           "types" : [ "administrative_area_level_2", "political" ]
        },
        {
           "long_name" : "Oklahoma",
           "short_name" : "OK",
           "types" : [ "administrative_area_level_1", "political" ]
        },
        {
           "long_name" : "United States",
           "short_name" : "US",
           "types" : [ "country", "political" ]
        },
        {
           "long_name" : "73013",
           "short_name" : "73013",
           "types" : [ "postal_code" ]
        }
     ],
     "formatted_address" : "15220 N Western Ave, Edmond, OK 73013, USA",
     "geometry" : {
        "bounds" : {
           "northeast" : {
              "lat" : 35.6246310,
              "lng" : -97.53124129999999
           },
           "southwest" : {
              "lat" : 35.62462730,
              "lng" : -97.53126360
           }
        },
        "location" : {
           "lat" : 35.6246310,
           "lng" : -97.53124129999999
        },
        "location_type" : "RANGE_INTERPOLATED",
        "viewport" : {
           "northeast" : {
              "lat" : 35.62597813029150,
              "lng" : -97.52990346970849
           },
           "southwest" : {
              "lat" : 35.62328016970850,
              "lng" : -97.53260143029149
           }
        }
     },
     "types" : [ "street_address" ]
  }
],
"status" : "OK"
}
  • 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-05-24T17:30:03+00:00Added an answer on May 24, 2026 at 5:30 pm

    Use SBJson:

    NSDictionary *partialJsonDict = [[[yourIncomingJsonAsAString JSONValue] objectForKey:@"results"]] objectAtIndex:0];
    NSDictionary *geometryDict = [partialJsonDict objectForKey:@"geometry"];
    Float32 latitude = [[[geometryDict objectForKey:@"location"] objectForKey:@"lat"] floatValue];
    Float32 latitude = [[[geometryDict objectForKey:@"location"] objectForKey:@"lng"] floatValue];
    

    Yes, it really is just that easy! 😉

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

Sidebar

Related Questions

I'm working through an idea for an iphone app. One of the tech requirements
I am working on one real estate website which is Using RETS service to
I'm working on a iPhone app which has a pretty large UITableView with data
I'm working on a largely navigation-based iPhone app that communicates with a REST API
I'm working on a navigation-based iPhone-only app that serves two main purposes: One, to
I'm currently working on an iPhone app and I have a library from a
Im working on an iPhone app, not using IB, and programmatically created a UITabbar
I'm working on a mobile website which is NOT a native iPhone app but
I'm working through the Facebook API for my iPhone app, and have two questions:
I am working on iPhone app development currently (primarily native app using Obj-C and

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.