Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6668471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:02:43+00:00 2026-05-26T03:02:43+00:00

I am using the (really cool) WhirlyGlobe (https://code.google.com/p/whirlyglobe/) 3D globe display for iPhone in

  • 0

I am using the (really cool) WhirlyGlobe (https://code.google.com/p/whirlyglobe/) 3D globe display for iPhone in a new application. I can add labels at certain locations using the code shown below. I want to be able to go back and remove a label I added earlier. The Documentation (http://whirlyglobedocs.s3-website-us-east-1.amazonaws.com/html/interface_label_layer.html#ac17e1ec72e70eec416cb2cac833f46fa) shows a removeLabel method but I cannot seem to get it to work. I can add but not remove Labels. I tried looping through all subviews but cannot find these SimpleLabel instances. Can someone please help me understand how to remove a label? I haven’t had much luck finding many examples. Thank you!

// Current position
float lat = [[values objectAtIndex:8] floatValue];
flaot lon = [[values objectAtIndex:9] floatValue];

// Create a SingleLabel at this Lat / Lon pair location                
SingleLabel *interimLabel = [[[SingleLabel alloc] init] autorelease];
interimLabel.text = [NSString stringWithFormat:@"PRN %d",[[values objectAtIndex:1] intValue]];
[interimLabel setLoc:GeoCoord::CoordFromDegrees(lon, lat)];
[locationArray addObject:interimLabel];
[allLabels addObject:interimLabel];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:02:44+00:00Added an answer on May 26, 2026 at 3:02 am

    When you add a single label or a group of labels to the label layer, you’ll get back a SimpleIdentity. Keep that around somewhere. Then, when you want to delete the label (or group of labels) from the label layer, you pass back in that SimpleIdentity.

    What’s going on is this. WhirlyGlobe batches drawable data like a mofo. Your SingleLabel objects no longer exist as soon as the Label Layer has crunched them down into as few Drawables and it can get away with. So to refer to those labels, you have to keep around the unique ID.

    Now if you want to delete these labels separately or individually change their appearances, then you’ve got to add them one by one. One label to one SimpleIdentity. Otherwise there’s no way to refer to them individually.

    For speed, I recommend grouping as many of them together as you can get away with. If that’s just too complex for now, add them one by one and then make a note to come back. So when you say “Why isn’t this running as fast as I’d like” you can then say “Ooooo, right.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There’s a really cool diff class hosted by Google here: http://code.google.com/p/google-diff-match-patch/ I’ve used it
I read a really cool blog about using Autofac to completely decouple an application
I really appreciate if someone can help me with using how to use shape
Having a really aggravating problem using Managed Metadata in SP2010 where I can get
i'm pretty new to flex 3 but it's really cool so far. i have
The S#arp Architecture seems really cool, but do you think it's still too new
So, I've wasted a bunch of time creating this really cool keyboard macro application.
The Joiner in Google Guava (a superset of Google collection) is really cool. My
I've been using EF4 (not code-first) since a year, so I'm not really an
I am using the really awesome ruby ffi library to access functions in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.