Обнаружение касания на MGLRasterStyleLayer с помощью Mapbox iOS - PullRequest
0 голосов
/ 26 мая 2020

Пытаясь обнаружить RasterStylelayer Я добавил, что пользователь нажимает - всегда возвращать null.

   - (IBAction)handleMapTap:(UITapGestureRecognizer *)gesture {

        // Get the CGPoint where the user tapped.
        CGPoint spot = [gesture locationInView:mapView];

        NSArray *features = [mapView visibleFeaturesAtPoint:spot
                               inStyleLayersWithIdentifiers:[NSSet setWithObject:self.layerIdentifier]];
        MGLRasterStyleLayer *feature = features.firstObject;
        NSLog(@"feature %@",feature);
    }

Можно ли найти выбранный источник с помощью этого метода?

...