Hi,
I am new for iPhone programming.
I just want to implement a samll function that allows system to obtain a location on MKMapView where the user has touched. I wrote some code as following:
#import "UIViewTouch.h"
@implementation UIViewTouch
@synthesize viewTouched;
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *) event{
...
As far as I know, there isn't a way to move an annotation without removing & readding it to the MapView (Maybe I"m wrong?).
Is there a way to prevent the MapView from being redrawn between removing & readding the annotation? Right now the redraw after removing the annotation causes a frame without the annotation, so it appears to flicke...
Hi All,
Trying to figure out this MKPolygon working. I've created a whole heap MKMapPoints and placed them into an array. Then I make a Polygon out of them with:
[MKPolygon polygonWithPoints:pointArr count:sqlite3_column_int(countStatement, 0)];
and add that to an Array for retrieval later.
Later I loop through the array and add ea...
I may be doing something really stupid here as I've done it before and it worked and now...
Created a new iPad project, in the details view I added a MKMapView, added the MapKit.framework to the project, added the property / etc. to the header. Go to run the project and get a SIGABRT with
**Terminating app due to uncaught exception '...
I have created a whole heap of overlays using MKPolygon and created into a MKPolygonView. This works fine but one of the overlays has a butt load of points (about 800 points) and this causes memory and performance issues. I tried shouldRasterize on the MKPolygonView but this had the opposite affect which I am not surprised.
Is there any...
Google maps API provides an option to show a bicycle layer. Is this also possible with MapKit?
...
I have a map marker to which I've added an event listener. when I click on the marker, I can get it to NSLog out a message... yet when I then click on the map, it does the same. I don't know if this is usual behaviour? In the end, I am trying to get a popup viewcontroller appearing - but that's been put on hold until this works.
So... ...
So I have a map with a heap of MKPolygonViews overlaid. When I put a couple on it chugs a bit and then if I put them all on the systems sends a didReceiveMemoryWarning to the system that I've responded to by removing the overlays.
Now I wondered how much memory it was actually using when this happens, it's only 10MB real memory and 100M...
So, I've created a CLLocationManager, called it to start updating, set mapView.showsUserLocation to YES, and returned nil for the userLocation annotation.
Here are some snippets from my code in my UIMapViewController:
- (void)viewDidLoad
{
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
[locationManager...
I find that when I make a call to setCenterCoordinate and have animated:YES, then if my MKMapView is removed/released while that animation is underway, I lose all ability to receive UI events (i.e. touch events) anywhere at all so I am effectively locked out from interacting with my app.
I'm not sure why this would happen versus some ot...
So I have an iPhone app which should aid the user to find a convenient walkway from his/her own position to a given destination. As I have learnt, MKMapView does not provide an easy way to infer a preferred walking route from A to B.
I can live with terminating my own app and launch the native map application on the iPhone, but in that ...
From the native iPhone map app, it is possible to share a position via email or MMS.
How (if) can this be achieved in a custom app?
...
I have a mkMapView with one annotation.
The first time every thing is OK. The application call the delegate - (MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id )annotation
{...} and my annotation is working fine.
When I need to change to a new map location (with a new annotation) the old one is release the new an...
Can anyone confirm that setRegion "snaps" to predefined zoom levels and whether or not this behavior is as designed (although undocumented) or a known bug? Specifically, it appears that setRegion snaps to the same zoom levels that correspond to the zoom levels used when the user double-taps the map.
I'm trying to restore a previously sa...
Disabling the 'blue dot' by setting showUserLocation = NO when dropping a pin at the user location in the center of the map. After dragging the pin to another location, I'd like to enable the blue dot again. Simply setting showUserLocation = YES again won't display the dot. Any idea what may not be correct?
...
Hi ,
Facing some strange problem.
MKMapView zooming and scrolling locks on device with callout open , not on simulator.
The locking is in the sense that if u try to zoom in or out, it zooms back user to same zoom level where it originally was similar, when tried to scroll in the map , it bring them back again.
This does not happen i...
I have a MKMapView in my app with several pins on it and I'd like to set different colors for each pin. My view controller is implementing MKMapViewDelegate and I've defined viewForAnnotation method.
- (MKAnnotationView *) mapView:(MKMapView *)mapView
viewForAnnotation:(id <MKAnnotation>) annotation {
MKPinAnnotationView *annView=[...
I am adding the annotations to the mapview with the addAnnotation. I have the latitude and longitude information drop the pin on this location. I want to show the name of the user on this location? How will i do this?
...
Enabling the 'blue dot' which shows current location in my application by
mapView.showsUserLocation = YES
Disabling/hiding the dot by
mapView.showsUserLocation = NO
in order to drop a pin. So far so good.
Adding an annotation pin at 'userLocation' and dragging it around in the map to a new location. After that I want to show the...
Hi Guys,
I am developing application based on geocoder. In my app, to get the user current address, i am using placemark address dictionary method inside geocode delegate method and then, i could able to get all the details (street, city, state, county, countrycode and all) except postalcode. Why postal code is not coming?. Now i am wor...