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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:26:38+00:00 2026-06-13T20:26:38+00:00

My application gets data in the following coverage area. I would like to use

  • 0

My application gets data in the following coverage area. I would like to use these boundary values to draw rectangle on the map. Do you have any idea? Thanks in advance

Left Upper Boundary: 30.439217,-95.899668;

Right Upper Boundary: 30.443953,-94.685679;

Left Buttom boundary: 28.930662,-95.908595;

Right Buttom Boundary: 28.930061,-94.690486;

  • 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-13T20:26:39+00:00Added an answer on June 13, 2026 at 8:26 pm

    if you wanna draw something basic with lines u can use this MKPolyline

    Try the code below, Make sure your delegate is connected with your mapview object

    - (void) drawRect
    {
    
        CLLocation *coordinates1 =  [[CLLocation alloc] initWithLatitude:30.439217 longitude:-95.899668];
    
        CLLocation *coordinates2 =  [[CLLocation alloc] initWithLatitude:30.443953 longitude:-94.685679];
    
        CLLocation *coordinates3 =  [[CLLocation alloc] initWithLatitude:28.930061 longitude:-94.690486];
    
        CLLocation *coordinates4 =  [[CLLocation alloc] initWithLatitude:28.930662 longitude:-95.908595];
    
    
        NSMutableArray *locationCoordinates = [[NSMutableArray alloc] initWithObjects:coordinates1,coordinates2,coordinates3,coordinates4,coordinates1, nil];
    
        int numberOfCoordinates = [locationCoordinates count];
    
        CLLocationCoordinate2D coordinates[numberOfCoordinates];
    
    
        for (NSInteger i = 0; i < [locationCoordinates count]; i++) {
    
            CLLocation *location = [locationCoordinates objectAtIndex:i];
            CLLocationCoordinate2D coordinate = location.coordinate;
    
            coordinates[i] = coordinate;
        }
    
        MKPolyline *polyLine = [MKPolyline polylineWithCoordinates:coordinates count:numberOfCoordinates];
        [self.myMapView addOverlay:polyLine];
    
    
    }
    
    - (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay {
    
        MKPolylineView *polylineView = [[MKPolylineView alloc] initWithPolyline:overlay];
        polylineView.strokeColor = [UIColor redColor];
        polylineView.lineWidth = 1.0;
    
        return polylineView;
    }
    

    UPDATE: Here’s the swift version of the drawRect function

    func drawRect() {
        let coordinates1 = CLLocation(latitude: 30.439217, longitude: -95.899668)
        let coordinates2 = CLLocation(latitude: 30.443953, longitude: -94.685679)
        let coordinates3 = CLLocation(latitude: 28.930061, longitude: -94.690486)
        let coordinates4 = CLLocation(latitude: 28.930662, longitude: -95.908595)
        let locationCoordinates = [coordinates1,coordinates2,coordinates3,coordinates4,coordinates1]
    
        let coordinates = locationCoordinates.map { $0.coordinate }
    
        let polyLine = MKPolyline(coordinates: coordinates, count: coordinates.count)
        mapView.addOver(polyLine)
    }
    

    replace the

    - (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay (deprecated)
    

    with

    func mapView(mapView: MKMapView, rendererForOverlay overlay: MKOverlay) -> MKOverlayRenderer
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an Android application that requires the following: Data from RSS feed gets
I have an application which gets some data from a remote database. I use
I have a Silverlight 4 application which gets data from a silverlight enabled WCF
We have a web application that gets its data from a certain database. The
Assume I have a application that stores data,gets data and processes data and stores
I have a Visual Studio 2005/ C# ClickOnce application that gets all its data from a
I'm writing a bunch of data out from a java application that gets consumed
My application gets configured via a lot of key/values (let's say 30.000 for instance)
We have a WPF application which gets data from an Analysis Services Cube. The
I have a Silverlight application that needs to scroll some data (like stock information)

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.