Topic: Geo Augmented Markers

show/hide Google maps (SOLVED)

Friday, May 5, 2017


I'm wondering if it would be possibile to keep only the augmented reality view, in a configurable way or by hiding the map. If not (as I've seen in a similar post), if it's in the roadmap.
Is it possible to listen to the event showAR/showMap in some way?

I noticed that the event onMapOrCameraClicked is never called and the event onGeoLocationChanged is called only once entering the map. No problem with onGeoElement. Can it be or am I wrong in something?

Thank you for your reply

user profile image
Support Team  (expert)
Wednesday, May 10, 2017

at this moment, there is no way to keep only the augmented reality view on screen. As suggested trick, you should attach an observer event to Google Maps alpha property like this:
// @property (nonatomic) GMSMapView * mapView;
self.mapView=[[self valueForKey:@"googlemap"] valueForKey:@"mapView"];
[self addObserver:self
options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld

Then, on callback method you should manage alpha changing value:
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if ([keyPath isEqualToString:@"mapView.alpha"]) {

Concerning onMapOrCameraClicked event, we checked that is a bug, so we will fix it as soon as possible.
On the other side, onGeoLocationChanged method calling could be configurable using two instance variables:

  • float _minDistanceGeolocationChange -> minimum distance (in meters) between two consecutive onGeoLocationChanged method calling
  • float _minTimeGeolocationChange -> minimum time (in seconds) between two consecutive onGeoLocationChanged method calling
You should set this values (in viewDidLoad method for example) as follow:
[[self valueForKey:@"_geoManager"] setValue:@(1.f) forKey:@"_minDistanceGeolocationChange"];
[[self valueForKey:@"_geoManager"] setValue:@(0.f) forKey:@"_minTimeGeolocationChange"];


user profile image
Support Team  (expert)
Thursday, May 25, 2017

with the new release (3 RC.2) we fixed the missing call to the onMapOrCameraClicked event for iOS.
Thanks for your reporting.

Sign in to add a comment