I'm looking for a way to display the transit/subway lines in a MapKit view. I'd basically like the same view as the "Transit" view in the Maps application. I can't find the right overlay or map type. Thanks!
Transit map type is not available yet. You might have to customize your own mapView.
Related
Is it possible to have an map view in xamarin ios with an image view overlaying it, so you cannot see the actual map, but on top of the image view are Annotations and custom pins, if it is possible can someone help me or provide references?
I am working on an app based on the Map View, and I wanted to implement something like Foursquare : in front of the map that you can scroll and that is linked with the pins.
I tried with the Collection View but without success.. Does anyone know how to do it or have an idea?
Thanks a lot.
You can achieve this by adding UICollectionView above MapView (use addSubview method or add in storyboard) and set background color of collection view to UIColor.clearColor. By this the collection view cell will look floating above the map view.
I have UITableViewController and inside my cell i need to display map with multiple annotations.
I need to show map on my tableview cell and plot multiple annotation in that map also.
Something like this Screenshot
I searched in google and couldnt get that much help.
If you don't need interaction with the map (scroll, zoom etc) you can use MKMapSnapshotter. It generates a snapshot image of the map and requires much less memory than actually using a map view. A useful link is this: http://nshipster.com/mktileoverlay-mkmapsnapshotter-mkdirections/
Another option when interaction isn't needed is the MapboxStatic library, which gives PNG or JPEG images of maps, which is ideal for table view usage.
I have a view with 3 buttons (Europe, Asia, America) and a MKMapView.
If one of these buttons was clicked, i need to show the specific continent.
In
MKGeometry.h (Mapkit Framework)
there is a constant
MKMapRectWorld
which i can use to show the whole world.
Is there something similar for continents?
If not, what is the best way to determine all informations i need for creating a MKCoordinateRegion?
Use Google Earth or Goole Maps to work out the lat/long boundaries and then call setRegion on your map view.
I have two annotations with the same coordinates. And I have to display them on the map. When I add these annotations on the map I see just one pin. How can I display two annotations instead of one? Or how can I display a annotations list by clicking on the pin? Can anybody help me?
Thanks in advance.
Igor
When you try to display multiple annotations at the same coordinate on a map using MapKit, generally it will actually place two different pins, but they will be in the exact same location. You can compare the difference in the shadow strength to see the difference, however; look at a single pin's shadow, then look at your double-pin shadow, and you should see the latter appear darker.
In terms of indicating to your user that there are multiple pins, there are several ways you could do that. You might consider implementing the title or subtitle properties on your annotations to display the number of annotations at the same coordinates (e.g. set subtitle to the string #"(and two more)" or similar). Then, when the callout accessory view is tapped, push (onto a navigation controller stack) a table view of annotations at that location.