77
77
import com .mapbox .mapboxsdk .constants .Style ;
78
78
import com .mapbox .mapboxsdk .exceptions .IconBitmapChangedException ;
79
79
import com .mapbox .mapboxsdk .geometry .LatLng ;
80
- import com .mapbox .mapboxsdk .geometry .LatLngBounds ;
81
80
import com .mapbox .mapboxsdk .location .LocationListener ;
82
81
import com .mapbox .mapboxsdk .location .LocationServices ;
83
82
import com .mapbox .mapboxsdk .maps .widgets .CompassView ;
@@ -1156,7 +1155,6 @@ List<Marker> getMarkersInRect(@NonNull RectF rect) {
1156
1155
return new ArrayList <>();
1157
1156
}
1158
1157
1159
- // TODO: filter in JNI using C++ parameter to queryPointAnnotations
1160
1158
long [] ids = mNativeMapView .queryPointAnnotations (rect );
1161
1159
1162
1160
List <Long > idsList = new ArrayList <>(ids .length );
@@ -1182,7 +1180,6 @@ public List<MarkerView> getMarkerViewsInRect(@NonNull RectF rect) {
1182
1180
return new ArrayList <>();
1183
1181
}
1184
1182
1185
- // TODO: filter in JNI using C++ parameter to queryPointAnnotations
1186
1183
long [] ids = mNativeMapView .queryPointAnnotations (rect );
1187
1184
1188
1185
List <Long > idsList = new ArrayList <>(ids .length );
@@ -1727,11 +1724,12 @@ public boolean onSingleTapConfirmed(MotionEvent e) {
1727
1724
PointF tapPoint = new PointF (e .getX (), e .getY ());
1728
1725
float toleranceSides = 4 * mScreenDensity ;
1729
1726
float toleranceTopBottom = 10 * mScreenDensity ;
1730
- RectF tapRect = new RectF (tapPoint .x - mAverageIconWidth / 2 - toleranceSides ,
1731
- tapPoint .y - mAverageIconHeight / 2 - toleranceTopBottom ,
1732
- tapPoint .x + mAverageIconWidth / 2 + toleranceSides ,
1733
- tapPoint .y + mAverageIconHeight / 2 + toleranceTopBottom );
1734
1727
1728
+ RectF tapRect = new RectF ((tapPoint .x - mAverageIconWidth / 2 - toleranceSides ) / mScreenDensity ,
1729
+ (tapPoint .y - mAverageIconHeight / 2 - toleranceTopBottom ) / mScreenDensity ,
1730
+ (tapPoint .x + mAverageIconWidth / 2 + toleranceSides ) / mScreenDensity ,
1731
+ (tapPoint .y + mAverageIconHeight / 2 + toleranceTopBottom ) / mScreenDensity );
1732
+
1735
1733
List <Marker > nearbyMarkers = getMarkersInRect (tapRect );
1736
1734
long newSelectedMarkerId = -1 ;
1737
1735
0 commit comments