mapbox-gl-native
mapbox-gl-native copied to clipboard
Can't get MGLFeature from "visibleFeaturesInRect: inStyleLayersWithIdentifiers:"
This is my code
` if (tap.state == UIGestureRecognizerStateEnded) {
CGPoint touchpoint = [tap locationInView:self];
CGRect fishRect = CGRectMake(Tp.x-1, Tp.y-1, 2, 2);
NSSet *fishSet = [NSSet setWithObject:self.fishLay.identifier];
NSArray<id<MGLFeature>> * fishFeatures = [self visibleFeaturesInRect:fishRect inStyleLayersWithIdentifiers:fishSet];
if (fishFeatures.count > 0) {
/// do something
}
}`
But the MGLFeature alway is empty, even if I click exactly. And there is also a issue of offset, the direction is random.