0
이것은 UIView에서 구현 한 내 View Controller입니다. 노란색 컴파일러 하이라이트이있다UIView는 내지도를 표시하지 않고 표준지도 만 표시합니다.
라인 : 그래서 self
에 문제가
self.vermapa_.delegate=self;
?
(.H)
#import <UIKit/UIKit.h>
@interface appiOSViewController : UIViewController
@end
하고 (하는 .m)
#import "appiOSViewController.h"
#import <GoogleMaps/GoogleMaps.h>
@interface appiOSViewController()
@property (weak,nonatomic) IBOutlet GMSMapView *vermapa_;
@end
@implementation appiOSViewController
- (void)viewDidLoad
{
[super viewDidLoad];
**self.vermapa_.delegate=self;**
GMSCameraPosition *pos = [GMSCameraPosition cameraWithLatitude:7.114797
longitude:-73.104932
zoom:15.3];
self.vermapa_ = [GMSMapView mapWithFrame:CGRectZero camera:pos];
self.vermapa_.myLocationEnabled = YES;
self.vermapa_.settings.compassButton = YES;
self.vermapa_.settings.myLocationButton = YES;
self.vermapa_.settings.zoomGestures = YES;
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(7.116309,-73.105713);
marker.title = @"Parada frente al edificio L";
marker.snippet = @"UNAB - Jardín";
marker.map = self.vermapa_;
GMSMarker *marker1 = [[GMSMarker alloc] init];
marker1.position = CLLocationCoordinate2DMake(7.112412,-73.105134);
marker1.title = @"CSU";
marker1.snippet = @"UNAB - Terrazas";
marker1.map = self.vermapa_;
GMSMarker *marker2 = [[GMSMarker alloc] init];
marker2.position = CLLocationCoordinate2DMake(7.110863,-73.106075);
marker2.title = @"Parada de Bus - Terrazas";
marker2.snippet = @"Terrazas";
marker2.map = self.vermapa_;
GMSMarker *marker3 = [[GMSMarker alloc] init];
marker3.position = CLLocationCoordinate2DMake(7.117738,-73.105651);
marker3.title = @"Parqueadero UNAB";
marker3.snippet = @"UNAB - Jardín";
marker3.map = self.vermapa_;
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
다음과 같이 강조 표시된 줄로 내 문제를 해결했습니다. vermapa_.delegate = (id) self; UIView는 표준지도를 계속 보여줍니다. 제발 누군가의 도움이 필요합니다. –
anch95