forked from organicmaps/organicmaps
[ios] Display only one bookmarks category at once. It can be changed from Bookmarks Dialog
This commit is contained in:
parent
01a5a78da4
commit
ceb3ed16fb
4 changed files with 12 additions and 5 deletions
|
@ -25,8 +25,12 @@
|
|||
{
|
||||
m_balloon.setName = text;
|
||||
// Create category if it doesn't exist
|
||||
(void)GetFramework().GetBmCategory([text UTF8String]);
|
||||
|
||||
Framework & f = GetFramework();
|
||||
char const * cString = [text UTF8String];
|
||||
(void)f.GetBmCategory(cString);
|
||||
// Change visible bookmarks category
|
||||
f.SetVisibleBmCategory(cString);
|
||||
|
||||
// Display "Add Bookmark" dialog
|
||||
NSArray * vcs = self.navigationController.viewControllers;
|
||||
UITableViewController * addBookmarkVC = (UITableViewController *)[vcs objectAtIndex:[vcs count] - 3];
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
// Default bookmark pin color
|
||||
self.color = @"placemark-purple";
|
||||
self.setName = [BalloonView getDefaultSetName];
|
||||
// Load bookmarks from kml files
|
||||
GetFramework().LoadBookmarks();
|
||||
// Display only one category of bookmarks. User can change visible category from BookmarksVC Dialog.
|
||||
GetFramework().SetVisibleBmCategory([self.setName UTF8String]);
|
||||
self.pinImage = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:self.color]] autorelease];
|
||||
isDisplayed = NO;
|
||||
m_target = target;
|
||||
|
|
|
@ -96,6 +96,8 @@
|
|||
if (![m_balloon.setName isEqualToString:cell.textLabel.text])
|
||||
{
|
||||
m_balloon.setName = cell.textLabel.text;
|
||||
// Change visible bookmarks category
|
||||
GetFramework().SetVisibleBmCategory([m_balloon.setName UTF8String]);
|
||||
// Update Bookmarks VC if needed
|
||||
if (!m_editModeEnabled)
|
||||
{
|
||||
|
|
|
@ -139,9 +139,6 @@
|
|||
{
|
||||
[self onFirstLaunchCheck];
|
||||
|
||||
// Load bookmarks from kml files
|
||||
GetFramework().LoadBookmarks();
|
||||
|
||||
[Preferences setup:m_mapViewController];
|
||||
m_locationManager = [[LocationManager alloc] init];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue