Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2546] Android: state of annotations added/removed prior to view creation is not reflected when view is created

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:24.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M05
ComponentsAndroid
Labelsandroid, defect, mapview, release-1.6.0
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:22:25.000+0000
Updated2011-04-17T01:59:24.000+0000

Description

For example, addAnnotation(annotation) only does something useful if the view has already been created. This may be the case with other properties as well, so whoever works on this should look for that. Also check if it works to addAnnotation prior to creating the view in iPhone.

WORKAROUND: If you're wanting to set/remove annotations prior to adding the view (i.e., prior to win.add(mapview), keep them in an array and then pass them as the annotations creation property when you create the view. Better yet, if you're experiencing this problem, it might be just a question of how to order your code: call win.add(mapview) and win.open() before .addAnnotation. Because .addAnnotation (and .removeAnnotation) will work if ....

  • the window is open
  • the mapview has been added to the window already.

Attachments

FileDateSize
app.js2011-04-15T03:22:25.000+00001055

Comments

  1. Joshua 2011-04-15

    Bill what about addAnnotations to update the map with new annotations. If you're adding one annotation no big deal, but if your removing 50 and adding 60 addAnnotation is cumbersome and slow.

  2. Joshua 2011-04-15

    Bill I forgot to mention this is a problem in Android, iPhone works wonderfully.

  3. Bill Dawson 2011-04-15

    that will be addressed

  4. Joshua 2011-04-15

    When is 1.5.1 slated for general release?

  5. Joshua 2011-04-15

    Did the ticket make it in 1.5.1? I downloaded the new sdk and it still doesn't seem to work.

  6. Don Thorp 2011-04-15

    The ticket is still new and has not been worked on yet.

  7. Joshua 2011-04-15

    Hasn't the 1.5.1 release already gone out?

  8. Don Thorp 2011-04-15

    Yes it has, what hasn't happened is me redistributing issues to other milestones. The purpose of 1.5.1 changed from when we originally slotted the item here. Expect to see lots of shuffling as I move things around. Lighthouse is a crude tool for planning and it doesn't give us a good way to move things around privately while planning. When the ticket state goes to fixed-in-qa it has been pushed to a branch. When it's resolved it's passed QA in that branch.

  9. Joshua 2011-04-15

    Gotcha, thank you for the info.

  10. Opie Cyrus 2011-04-15

    (from [d486fe7de107960866721bcd85cb44780893a8db]) [#2519 state:fixed-in-qa] [#2546 state:fixed-in-qa] changed map annotations to be stored by proxy

    when adding or removing annotations, those will be stored in proxy. Upon the map actualybeing made visible, the annotations will be made visible along with any annotations selected before the map is opened.
    https://github.com/appcelerator/titanium_mobile/commit/d486fe7de107960866721bcd85cb44780893a8db"> https://github.com/appcelerator/titanium_mobile/commit/d486fe7de107...

  11. Opie Cyrus 2011-04-15

    Please verify with the attached app. Upon launch, the annotation will be added and selected before the map is added to the window or the window is opened. The annotation should be automatically selected when the app launches without any user interaction.

  12. Don Thorp 2011-04-15

    Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a

JSON Source