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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:57:39+00:00 2026-05-31T15:57:39+00:00

I have a table in the SQLite database with 4,000 locations, including latitude and

  • 0

I have a table in the SQLite database with 4,000 locations, including latitude and longitude. Based on information from the region provided by MKCoordinateRegion class, how can I get the places that are located in this region from the map? Is It Possible?

First I tried using Haversine formula, but what I did was just sort the places closest to the center of the map. But I want places that are located in a region of the map. Or am I wrong?

Thanks in advance.

  • 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-31T15:57:41+00:00Added an answer on May 31, 2026 at 3:57 pm

    You can get the max/min values for latitude and longitude from your MKMapView by accessing the region attribute:

    MKCoordinateRegion *mapRegion = myMap.region;
    

    You can then access the maximum and minimum values as follows:

    maxLatitude = mapRegion.center.latitude + mapRegion.span.latitudeDelta/2;
    minLatitude = mapRegion.center.latitude - mapRegion.span.latitudeDelta/2;
    
    maxLongitude = mapRegion.center.longitude+ mapRegion.span.longitudeDelta/2;
    minLongitude = mapRegion.center.longitude- mapRegion.span.longitudeDelta/2;
    

    Hope this helps! If you’re storing your data in Core Data, an NSSet, or an NSArray, you can then use an NSPredicate to filter out the results that meet the above criteria.

    Here’s the documentation for your MKMapView and an MKCoordinateRegion.

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

Sidebar

Related Questions

I have a data table in my SQLite database with information about longitude, latitude
I have two table views displaying the data from a Sqlite database. I can
I have a table view which is populated from data from an SQLite database.
I have a DataTable which I want to save to a SQLite Database Table.
I have a SQLite database with with just over 6,000 rows of addresses in
I' m using sqlite on iphone. I have table with 200 000 records. It'
I have one problem with Android SQLite database. I have one table which contains
How to count the number of rows in an SQLite database table? I have
I have implemented a custom SQLite database helper. I have a table containing sms
I have an events app which gets events data from sqlite database and displays

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.