mkpolyline Questions
3
this is my code for drawing first Line,
for another line with another color how can i do ?????
func mapView(mapView : MKMapView! , rendererForOverlay overlay: MKOverlay!) ->MKOverlayRenderer! ...
Stonebroke asked 20/1, 2015 at 12:20
3
At this moment, I am trying to figure out whether a coordinate on a MKMapView is within a MKPolygon drawn out ahead of time with latitudes/longitudes.
I am using CGPathContainsPoint to determine ...
Demetrius asked 21/8, 2015 at 20:50
3
Solved
I'm trying to get an understanding of how to draw polylines using Swift. I've looked at the documentation, referenced some tutorials, and checked out some other SO posts, but I still can't get the ...
Forbiddance asked 19/12, 2014 at 2:28
2
I have an array of CLLocationCoordinate2D, and need to draw a line connecting from the first index to the last index in the array.
I have seen the answers here and elsewhere, but they are mostly f...
Executor asked 19/9, 2019 at 15:2
1
Solved
I created seven different polylines. However some of them are disappearing when I zoom in closely. Why it is happening? How can I prevent this?
Here is my polyline renderer:
func mapView(_ mapVi...
Dachau asked 11/2, 2019 at 13:33
7
I recently started learning objectiveC and started developing an app in iOS6.
Now, I am trying to convert it for iOS7 and facing issues with MKMap.
In iOS6, I was using viewForOverlay.
In iOS7,...
Indomitability asked 20/9, 2013 at 0:12
3
I've been looking for a solution to zooming a MapView in to fit the boundaries of an MKPolyline in Swift. I have been able to locate example code for Objective-C here on SO, but I'm not at all fami...
Tidings asked 16/4, 2015 at 13:53
8
When displaying directions on the built-in Maps.app on the iPhone you can "select" one of the usually 3 route alternatives that are displayed by tapping on it. I wan't to replicate this functionali...
Midship asked 29/7, 2012 at 23:15
3
Solved
Can any help me with making custom MKPolyline with additional argument Color?
CustomPolyline.swift
import Foundation
import MapKit
class CustomPolyline : MKPolyline {
let coordinates: UnsafeMuta...
Rights asked 24/9, 2014 at 7:26
2
Solved
I can create a line between two points fairly easy with the below code (part of it anyways) How could I make the line dotted instead of solid? Also would it be possible to change the opacity the lo...
Trehala asked 13/12, 2013 at 17:40
1
I have very simple View Controller to demonstrate this strange rendering behavior of MKPolyline. Nothing special just normal api calls.
import UIKit
import MapKit
class ViewController: UIViewCont...
Noach asked 25/10, 2016 at 11:8
6
I am using the iOS 7 MapKit APIs to produce 3D camera movements on a map that displays an MKDirectionsRequest-produced path. The path is rendered by MKOverlayRenderer like so:
-(void)showRoute:(MK...
Zanthoxylum asked 16/12, 2013 at 0:39
2
Solved
How can I interact with functions in swift that used to take sized C arrays?
I read through Interacting with C APIS and still can't figure this out.
The documentation for the coords parameter of ...
Drama asked 29/8, 2014 at 2:17
2
Solved
I have the following code in Swift to add an MKPolyline to a MapView. XCode isn't telling me there's an issue, and as far as I've read, this should be working.
Outlet for the MapView:
@IBOutlet w...
Broadbent asked 26/3, 2015 at 11:55
2
Solved
I am trying to figure out a way to get all the latitude and longitude points from a MKPolyline drawn on a MKMapView on an iOS app.
I know the MKPolyline does not store latitude and longitude point...
Banzai asked 18/2, 2014 at 17:42
1
Solved
How can I detect if an MKPolyline intersects itself? I tried researching this but only found problems that has two or more lines. How can I detect if I only have one line/one stroke? I want to dete...
Petitionary asked 22/11, 2016 at 1:48
1
Solved
What would be the code required to allow the storage of an MKPolyline in CoreData in swift.
So for example if I had one of my core data entities (say "myEntity") for which I wanted to save an MKP...
Fifteenth asked 21/4, 2016 at 6:54
3
Solved
I am getting the following error: initWithPolyline: is deprecated: first deprecated in iOS 7.0
MKPolylineView *lineView = [[MKPolylineView alloc]
initWithPolyline:overlay];
What is the replac...
Deucalion asked 2/2, 2015 at 11:7
3
I have Map in my app in which is moving as per user location.I have successfully drawn a polyline for source and destination.
Using following code
- (MKOverlayView *)mapView:(MKMapView *)mapView vi...
Premolar asked 10/11, 2014 at 14:19
2
Solved
I working around with map app, I want to ask how to change the polyline color without remove and add it again, I found this topic https://stackoverflow.com/questions/24226290/mkpolylinerenderer-cha...
Aquitaine asked 12/5, 2015 at 9:32
1
Solved
I'm developing an app with a map in which the user can draw a polygon area.
My issue is what it's possible drawing polygons with knots (see the image) (I don't know if knot is the right word). I d...
Exemplificative asked 31/3, 2015 at 16:1
0
Is there any better method to update MKPolyline coordinates than removing and adding new overlay to mapView?
var a:[CLLocationCoordinate2D] = []
var testline = MKPolyline()
var coords1 = CLLocati...
Journalize asked 22/9, 2014 at 11:8
0
My app loads the user's past polylines and displays them on the map. Then the app starts tracking and a straight line is drawn from the last updated coordinate to the first, thereby connecting the ...
Switchman asked 15/9, 2014 at 23:8
1
Solved
I want to draw polyline in my Swift app.
Swift code
class MapViewController: UIViewController, MKMapViewDelegate {
@IBOutlet var theMapView: MKMapView
override func viewDidLoad() {
super.vie...
Barroom asked 17/7, 2014 at 8:40
1
Solved
I am developing an application that almost replicates Apple maps application behavior. When i touch a route, i need to change its color to blue and change the other ones colors to gray. Is there an...
Dependence asked 15/6, 2014 at 3:26
1 Next >
© 2022 - 2024 — McMap. All rights reserved.