JAKERI

Icon

Consulting/Development in Java, Objective-C for web based systems and iPhone

Golfkartan tillgänglig i iTunes App store

Nu finns JAKERI ABs tredje iPhone-applikation, Golfkartan tillgänglig i iTunes App store.

iTunes App store

Se pressrelease för Golfkartan.

Golfkartan ger dig tillgång till alla Sveriges golfbanor direkt i din iPhone.
Funktioner
Visar alla svenska golfbanor på en karta
Lista i bokstavsordning med alla golfbanor
Telefonnummer och emailadress till varje golfbana
Ring eller maila direkt från programmet genom att klicka på telefonnummer eller email
Mer information direkt tillgänglig via http://www.golf.se för varje golfbana
Positionering med inbyggd GPS
Möjlighet att välja mellan karta, hybrid eller satellit
Automatisk uppdatering av listan med golfbanor
Möjlighet till vägbeskrivning med inbyggd kartapplikation
Golfkartan gives you access to all golf courses in Sweden through your iPhone
Features
Show all swedish golf courses on a map
List all golf courses alphabetically
Phone number and email address
Call or email directly from the application by tapping on the phone number or email address
More information directly available from http://www.golf.se for each golf course
Show your current location with built in GPS
Choose between map, hybrid or satellite view
Automatic updates of golf courses
Show directions with with built in Maps application

Golfkartan ger dig tillgång till alla Sveriges golfbanor direkt i din iPhone.

Funktioner

  • Visar alla svenska golfbanor på en karta
  • Lista i bokstavsordning med alla golfbanor
  • Telefonnummer och emailadress till varje golfbana
  • Ring eller maila direkt från programmet genom att klicka på telefonnummer eller email
  • Mer information direkt tillgänglig via http://www.golf.se för varje golfbana
  • Positionering med inbyggd GPS
  • Möjlighet att välja mellan karta, hybrid eller satellit
  • Automatisk uppdatering av listan med golfbanor
  • Möjlighet till vägbeskrivning med inbyggd kartapplikation

Custom callout bubble in MKMapView, final solution!

Once again, this post has been updated.

I was not completely satisfied with my prior solution to custom callout bubble in MKMapView due a drawback.

One drawback is that if you click an annotation in the TouchView it is not propagated down to the MKMapView which makes pinch zoom bit more tricky if you have many annotations. Someone out there might have a good solution for it?

Fortunately I figured out a new solution for the problem! A much more simple solution too.

It is a combination of the property change listener solution and moving the calloutOffset off the display.

Set the calloutOffset off the display and add an observer to the selected-property.
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation {

MKAnnotationView* annotationView = nil;

MyAnnotation *myAnnotation = (MyAnnotation*) annotation;
NSString* identifier = @"Pin";
MKPinAnnotationView* annView = (MKPinAnnotationView*)[self.mapView dequeueReusableAnnotationViewWithIdentifier:identifier];

if(nil == annView) {
annView = [[[MKPinAnnotationView alloc] initWithAnnotation:myAnnotation reuseIdentifier:identifier] autorelease];
}
//Add an observer for the selected-property on the MKAnnotationView. Delegate to self.
[annView addObserver:self
forKeyPath:@"selected"
options:NSKeyValueObservingOptionNew
context:GMAP_ANNOTATION_SELECTED];

[annView setPinColor:MKPinAnnotationColorGreen];

//Set calloutOffset off screen.
CGPoint notNear = CGPointMake(10000.0,10000.0);
annView.calloutOffset = notNear;
annotationView = annView;

[annotationView setEnabled:YES];
[annotationView setCanShowCallout:YES];

return annotationView;
}

Implement the observeValueForKeyPath method. It will be triggered when the property is selected or deselected.

- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context{

NSString *action = (NSString*)context;

if([action isEqualToString:GMAP_ANNOTATION_SELECTED]){
BOOL annotationAppeared = [[change valueForKey:@"new"] boolValue];
if (annotationAppeared) {
[self showAnnotation:((MyAnnotationView*) object).annotation];
}
else {
NSLog(@"annotation deselected %@", ((MyAnnotationView*) object).annotation.title);
[self hideAnnotation];
}
}
}

Screenshot_17

Take a look at my new example (with standard MKPinAnnotationView) or with custom annotation view.