Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add getAnnotationsInBounds in NativeMapView.java #1969

Closed

Description

@erf

I'm looking at implementing annotation selection in Android but i need the getAnnotationsInBounds method.

Activity

  1. added
    Android
    on Jul 30, 2015
  2. ljbade commented on Jul 30, 2015

    @ljbade
    Contributor

    @incanus How does this relate to your long press pin drop stuff?

  3. incanus commented on Jul 30, 2015

    @incanus
    Contributor

    Not related.

  4. incanus commented on Jul 30, 2015

    @incanus
    Contributor

    Eventually it will relate to selection of dropped pins, but that's cart before horse right now.

  5. self-assigned this
    on Jul 31, 2015
  6. added this to the milestone on Jul 31, 2015
  7. added a commit that references this issue on Jul 31, 2015
  8. ljbade commented on Aug 12, 2015

    @ljbade
    Contributor

    @incanus some feedback on how to design this:

    First you should implement #1998
    This will require you to keep a shadow of the Annotation objects in a local LinkedList as a private member of MapView. Basically each time you handle add* or remove* you update the Java list as well as call the JNI function.

    Then the getAnnotations will simply return this as a List.

    You can then change the JNI nativeGetAnnotationsInBounds to return a long[] of annotation IDs. In the Java implementation of getAnnotationsInBounds you then use this array of IDs to build an ArrayList of Annotation objects as a List.

  9. incanus commented on Aug 12, 2015

    @incanus
    Contributor

    I think I follow, but does this account for needing to query an arbitrary bounding box? That's why I want to pass down to the C++ routine.

  10. ljbade commented on Aug 12, 2015

    @ljbade
    Contributor

    @incanus Oh yes you still pass down to the C++ routine the bounding box. But you return the list of annotation ID numbers, which is then used to find the actual Annotation object created with that ID.

  11. incanus commented on Aug 12, 2015

    @incanus
    Contributor

    Ah I gotcha — yes, thanks for the help outlining the Java side of the API. Once I get there! 😄

  12. ljbade commented on Aug 17, 2015

    @ljbade
    Contributor

    @incanus After #2094 and #2088 all that's left now is this. I might be able to pick this up tomorrow.

  13. added a commit that references this issue on Aug 27, 2015
  14. incanus commented on Aug 28, 2015

    @incanus
    Contributor

    👉 #2201

  15. erf commented on Aug 29, 2015

    @erf
    ContributorAuthor

    nice! 👍

  16. bleege commented on Aug 31, 2015

    @bleege
    Contributor

    Fixed by #2201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidfeature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions