1

I have do lots of the thing not able to find the solution for this situation.In Google map my current location marker not coming only overlay of the ground was coming.

I am using Google map SDK 1.13.0 .

    GMSMapView *mapView = [[GMSMapView alloc] init];
    mapView.tag = Tag_googleMapView;
    mapView.frame = CGRectMake(0.0, 0.0, view.frame.size.width,view.frame.size.height);
    mapView.delegate = self;
    mapView.indoorEnabled = YES;
    [mapView setMyLocationEnabled:YES];
    [mapView.settings setMyLocationButton:YES]; 

It looks like this.

enter image description here

It not proper blue current location marker was not coming

enter image description here

Chirag Shah
  • 3,034
  • 1
  • 30
  • 61

1 Answers1

0

I had this issue. It was due to an issue with the Google Maps library not being properly included in the project through Cocoapods. If using Cocoapods, make sure that the COCOAPODS = 1 flag is set in your target under Build Settings > Preprocessor Macros. I faced this issue because when including the dependency in a project with multiple targets, the flag is not automatically set in all targets unless the Pod is explicitly added to each target in the Podfile. If you have multiple targets your Podfile should be something similar to:

def map_pod
    source 'https://github.com/CocoaPods/Specs.git'
    pod 'GoogleMaps'
end

target 'target_1_name' do
    map_pod
end

target 'target_2_name' do
    map_pod
end

I believe the location icon does not appear properly because without the compiler flag, the libraries required to render it are not properly linked.

user3847320
  • 823
  • 9
  • 18