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

[android] getMarkerViewsInBounds() returns all the marker views irrespective of LatLngBounds #5799

Closed
BharathMG opened this issue Jul 26, 2016 · 1 comment
Labels
Android Mapbox Maps SDK for Android bug

Comments

@BharathMG
Copy link
Contributor

getMarkerViewsInBounds() method returns all the MarkerView annotations irrespective of LatLngBounds being passed.

I need to do markerHitTest to see if a user tapped point falls on any MarkerView. Because of getting all MarkerViews, I cannot use this method.

P.S : This also causes invalidateViewMarkersInBounds() not do anything as the above method will always return all the MarkerViews. But I can see the contains check was intentionally removed to fix #5402 .

cc @tobrun Looks like I have to wait till #4522 is resolved ?

Steps to trigger behavior

  1. Ask getMarkerViewsInBounds(latLngBounds);
  2. All MarkerViews are returned even if they are outside bounds.

Expected behavior

  1. Only MarkerViews within bounds should be returned

Actual behavior

  1. All MarkerViews are returned even if they are outside bounds.
@tobrun tobrun added bug Android Mapbox Maps SDK for Android labels Jul 26, 2016
@cammace
Copy link
Contributor

cammace commented Nov 9, 2016

We've removed getMarkerViewsInBounds() in the 4.2.0. Two solutions for this could be using the new query map features introduced (see #5165) or a better option might be using the Turf inside method found in mapbox-java (also included in the maps SDK).

@cammace cammace closed this as completed Nov 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug
Projects
None yet
Development

No branches or pull requests

3 participants