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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:27:31+00:00 2026-05-23T02:27:31+00:00

I have an iPhone application with a number of views, each view represented a

  • 0

I have an iPhone application with a number of views, each view represented a part of the world. When my user taps the button to take them to that view, I want to show a map with a preset location…i.e. when the tap to go to New York it shows a map of New York

Is this possible to do? Specify a latitude and longitude coordinate? or by some other method?

I have the following code so far which takes my users current location and displays the map of that, and i can choose between hybrid, normal or satellite through a segmented control.

-(IBAction)getLocation {
    creteMapView.showsUserLocation = YES;
}

-(IBAction)setMap:(id)sender {

    switch (((UISegmentedControl *)sender).selectedSegmentIndex)
    {
        case 0:
        {
            creteMapView.mapType = MKMapTypeStandard;
            break;
        }
        case 1:
        {
            creteMapView.mapType = MKMapTypeSatellite;
            break;
        }
        case 2:
        {
            creteMapView.mapType = MKMapTypeHybrid;
            break;
        }
    }
}

That all works perfectly, but instead of the current location I want to just set a already defined one. Any ideas?

Thanks

  • 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-23T02:27:32+00:00Added an answer on May 23, 2026 at 2:27 am

    add class that implement MKAnnotation protocol like : http://trac.ilesansfil.org/browser/branches/ilesansfil_iphone_app/STABLE_1.3/Models/LocationAnnotation.h

    http://trac.ilesansfil.org/browser/branches/ilesansfil_iphone_app/STABLE_1.3/Models/LocationAnnotation.m

    import header file
    and try

    CLLocationCoordinate2D coordinate1;
        coordinate1.longitude = 3.35;
        coordinate1.latitude = 44.85;
        LocationAnnotation *loc1 = [[LocationAnnotation alloc] initWithCoordinate:coordinate1];
        [creteMapView addAnnotation:loc1];
    

    this will add a pin to your map

    You can also remove user location if you want with :

    creteMapView.showsUserLocation = NO;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one application in iphone sdk. i have already taken user credit
I have an iPhone application in which a number of domain objects are populated
I have an iPhone tabbar application with n number tabs. I'd like to have
I currently have a number of special flavors of an iPhone application that I
I am writing an iPhone application. In one of my views the user will
I have an iPhone application that will save number of images in it. I
I have an iphone application which has about 4 tabs. How do I force
I have an iPhone application that adds new contacts via the Address Book Framework.
I have an iPhone application that reads RSS feeds from a YouTube channel. However,
I have an iPhone application which basically is getting information from an API (in

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.