diff --git a/src/ARISWebView.m b/src/ARISWebView.m index ace27ce7e..78f292c63 100644 --- a/src/ARISWebView.m +++ b/src/ARISWebView.m @@ -351,6 +351,13 @@ - (void) handleARISRequest:(NSURLRequest *)request } else if([mainCommand isEqualToString:@"instances"]) { + if(components.count > 1 && [components[1] isEqualToString:@"map"]) { + if(components.count > 2 && [components[2] isEqualToString:@"showNotesOnMap"]) { + Tab *t = [_MODEL_TABS_ tabForType:(@"MAP")]; + bool showNotes = [components[4] boolValue]; + t.showNotesOnMap = showNotes; + } + } if(components.count > 1 && [components[1] isEqualToString:@"player"]) { if(components.count > 2 && [components[2] isEqualToString:@"get"]) diff --git a/src/arisjs.js b/src/arisjs.js index 16cd86f7d..c878111ec 100755 --- a/src/arisjs.js +++ b/src/arisjs.js @@ -78,6 +78,7 @@ var ARISJS = function(_ARIS) _ARIS.setScene = function(scene_id) { _ARIS.enqueueRequest("aris://scene/set/" + scene_id); } _ARIS.getPlayer = function() { _ARIS.enqueueRequest("aris://player"); } _ARIS.getTriggerLocation = function(trigger_id) { _ARIS.enqueueRequest("aris://trigger/" + (trigger_id || 0)); } + _ARIS.showNotesOnMap = function(showNotes) { _ARIS.enqueueRequest("aris://instances/map/showNotesOnMap/set/" + showNotes); } //Call ARIS API directly (USE WITH CAUTION) _ARIS.callService = function(serviceName, body, auth, callback) diff --git a/src/data_objects/Tab.h b/src/data_objects/Tab.h index cc4fe25f3..6a7eb9a47 100644 --- a/src/data_objects/Tab.h +++ b/src/data_objects/Tab.h @@ -18,6 +18,7 @@ NSString *info; long sort_index; long requirement_root_package_id; + bool showNotesOnMap; } @property (nonatomic, assign) long tab_id; @@ -28,6 +29,7 @@ @property (nonatomic, strong) NSString *info; @property (nonatomic, assign) long sort_index; @property (nonatomic, assign) long requirement_root_package_id; +@property (nonatomic, assign) bool showNotesOnMap; - (id) initWithDictionary:(NSDictionary *)dict; - (NSString *) serialize; diff --git a/src/data_objects/Tab.m b/src/data_objects/Tab.m index a1e584620..03b8d7554 100644 --- a/src/data_objects/Tab.m +++ b/src/data_objects/Tab.m @@ -20,6 +20,7 @@ @implementation Tab @synthesize info; @synthesize sort_index; @synthesize requirement_root_package_id; +@synthesize showNotesOnMap; - (id) init { @@ -33,6 +34,7 @@ - (id) init self.info = @""; self.sort_index = 0; self.requirement_root_package_id = 0; + self.showNotesOnMap = true; } return self; } @@ -50,6 +52,7 @@ - (id) initWithDictionary:(NSDictionary *)dict self.info = [dict validStringForKey:@"info"]; self.sort_index = [dict validIntForKey:@"sort_index"]; self.requirement_root_package_id = [dict validIntForKey:@"requirement_root_package_id"]; + self.showNotesOnMap = true; } return self; } diff --git a/src/tab_controllers/map/MapViewController.m b/src/tab_controllers/map/MapViewController.m index dd4a8eb70..c8126fab3 100644 --- a/src/tab_controllers/map/MapViewController.m +++ b/src/tab_controllers/map/MapViewController.m @@ -314,6 +314,10 @@ - (void) refreshViewFromModel !modelInstance.infinite_qty && modelInstance.qty <= 0 ) + || + ( + [modelInstance.object_type isEqualToString:@"NOTE"] && !tab.showNotesOnMap + ) ) continue; shouldAdd = YES;