You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Add getAnnotationsInBounds in NativeMapView.java #1969
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.
@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.
Activity
ljbade commentedon Jul 30, 2015
@incanus How does this relate to your long press pin drop stuff?
incanus commentedon Jul 30, 2015
Not related.
incanus commentedon Jul 30, 2015
Eventually it will relate to selection of dropped pins, but that's cart before horse right now.
refs #1969: bind getAnnotationsInBounds() in JNI
ljbade commentedon Aug 12, 2015
@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
LinkedListas a private member ofMapView. Basically each time you handleadd*orremove*you update the Java list as well as call the JNI function.Then the
getAnnotationswill simply return this as aList.You can then change the JNI
nativeGetAnnotationsInBoundsto return along[]of annotation IDs. In the Java implementation ofgetAnnotationsInBoundsyou then use this array of IDs to build anArrayListofAnnotationobjects as aList.incanus commentedon Aug 12, 2015
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.
ljbade commentedon Aug 12, 2015
@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
Annotationobject created with that ID.incanus commentedon Aug 12, 2015
Ah I gotcha — yes, thanks for the help outlining the Java side of the API. Once I get there! 😄
ljbade commentedon Aug 17, 2015
@incanus After #2094 and #2088 all that's left now is this. I might be able to pick this up tomorrow.
refs #1969: bind getAnnotationsInBounds() in JNI
incanus commentedon Aug 28, 2015
👉 #2201
erf commentedon Aug 29, 2015
nice! 👍
bleege commentedon Aug 31, 2015
Fixed by #2201