Skip to content

Commit

Permalink
Merge pull request #307 from vijaysingh-axway/MOD-2103
Browse files Browse the repository at this point in the history
fix(ios): cannot add pop-over to map annotation
  • Loading branch information
lokeshchdhry authored Oct 1, 2020
2 parents 47bd79a + a4ac913 commit ea958a9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ios/Classes/TiMapAnnotationProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -569,4 +569,8 @@ - (void)animate:(id)arg
[(TiMapView *)[delegate view] animateAnnotation:newAnnotation withLocation:newLocation];
}

- (UIView *)view
{
return [delegate viewForAnnotationProxy:self];
}
@end
1 change: 0 additions & 1 deletion ios/Classes/TiMapPinAnnotationView.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/

#import "TiMapPinAnnotationView.h"
#import "TiMapAnnotationProxy.h"
#import "TiMapView.h"
Expand Down
2 changes: 2 additions & 0 deletions ios/Classes/TiMapViewProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Please see the LICENSE included with this distribution for details.
*/
#import "TiViewProxy.h"
#import <MapKit/MapKit.h>

@class TiMapAnnotationProxy;
@class TiMapCameraProxy;
Expand Down Expand Up @@ -32,6 +33,7 @@

- (TiMapAnnotationProxy *)annotationFromArg:(id)arg;
- (TiMapCameraProxy *)camera;
- (MKAnnotationView *)viewForAnnotationProxy:(TiMapAnnotationProxy *)annotationProxy;

- (void)addAnnotation:(id)args;
- (void)addAnnotations:(id)args;
Expand Down
6 changes: 6 additions & 0 deletions ios/Classes/TiMapViewProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ - (TiMapAnnotationProxy *)annotationFromArg:(id)arg
return proxy;
}

- (MKAnnotationView *)viewForAnnotationProxy:(TiMapAnnotationProxy *)annotationProxy
{
MKMapView *mapView = [(TiMapView *)[self view] map];
return [mapView viewForAnnotation:annotationProxy];
}

#pragma mark Public API

- (void)zoom:(id)arg
Expand Down
3 changes: 2 additions & 1 deletion ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 4.0.0

version: 4.0.1
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: External version of Map module
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@titanium-sdk/ti.map",
"version": "6.0.0",
"version": "6.0.1",
"description": "Provides Map UI elements for Titanium applications",
"scripts": {
"commit": "git-cz",
Expand Down

0 comments on commit ea958a9

Please sign in to comment.