I want to modify IOS MKMapView such that I want all continents to be of my own colour such as green colour and I want to include only continents in map (water area should be hidden or transparent). Also when I tap on particular region, then I should be able to retrieve the latitude and longitude after customising ( mainly focussing on fetching country info only ). Please suggest me any methods to implement this.
Thank You.
Related
Why when I load my pin annotation in map, my pin annotations have different number shadow? Some have no shadows and some have many shadows.
I receive the data for pin from the firebase.
How to remove shadow or how to make a small shadow in all pin?
Check image
The darker shadow means you have multiple pins in the same location. There are two main causes for this and depending on the reason, there are two ways to solve this:
1. The data contains multiple elements with the same location.
Consider using clustering, which will display the number of annotations in the location. This will be a lot easier for the user to understand than a darker shadow. :)
Here's a tutorial from Apple: Decluttering a Map with MapKit Annotation Clustering
2. You forgot to erase the annotations before adding them again.
Remove the annotations before adding them to the map again, for example when you're refreshing the view.
mapView.removeAnnotations(annotationsToRemove) where annotationsToRemove is an array containing the specific annotations you need to remove.
Or, if you want to add all the annotations again, you can remove all the annotations with
mapView.removeAnnotations(mapView.annotations)
I am trying to display two stroke/fill color on single MKPolyline. One color code from Origin to current location and another color from Current location to destination.
In simplest way i can say, i want to show past route on different color code.
How can I do this? Is there any tutorial or sample code?
Thanks
I have a png image of a country's map showing its regions.
I want to detect touch and select (uniquely identify) any irregular shaped region from map and perform some activity for selected region. I also want to show/display selection of region while tapping on it (either by highlighting region's image or showing a line on his boundary).
Please tell me the best way to achieve this. MKMapView won't help as i don't want to use Apple/Google maps.
Im working with Mapkit and I trying to draw a line in the "sidewalks" (border of the street),right now I'm looking for ideas on how I could start this task, thanks for your help.
notes: I know how to works with mkpolyline and coordinates
http://s30.postimg.org/7rnmdjzu9/mapa.png
You do not have access to the information that qualifies as a road inside the MKMapView. so, in order to be able to draw into the border of the street you will need to access the information that qualifies as a street (the coordinates of the road) or analyzing the view and changing the specific color represented by the border of the street (this is not public API, you will need to dig around the view hierarchy).
How do I make a image, make it georeferenced and make it such that using the GPS, a blue dot appears where I am standing (assuming the image is there) in my iOS application. How do I approach this to georeference my image and accomplish this?
The only way to do this would be to use MKMapView. There is a property you can set, -showsUserLocation, that will show the blue dot you need.
If you need to show this over the top of a specific image... you will have to get creative with it. Maybe loading a custom image for an annotation. It can be done, just depends on how big of a map you plan to show and what your use case is. Hope this helps.
The steps I would take are as follows :
Get the user's location using a location manager
Capture the image
Instead of saving it to the disk, copy the image to a new file named something like "imageprefix_(user location's latitude value)_(user location's longitude value).png"
Put an MKMapView in your UIViewController and set
[viewController.mapView showsUserLocation:YES]
Show the image below, or above. In the future, if you're not at that location, use the latitude and longitude values from the title of the image to drop an annotation on your mapView
Good luck!