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

MGLAnnotation select not triggering a second time when changing zoom level #15193

Closed
tkrami opened this issue Jul 23, 2019 · 7 comments
Closed
Labels
bug iOS Mapbox Maps SDK for iOS

Comments

@tkrami
Copy link

tkrami commented Jul 23, 2019

Hello,
we are using the sdk to display annotations an show detailed information about this by clicking one specific annotation.
But we have an issue in all of our apps. After clicking a annotation, deselecting it and zooming to a lower level the func mapView(_ mapView: MGLMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage? function do not trigger the click again.

Also checked that all annotations are drawn right on the map. Also implemented the quick fix by creating an image where the lower half of the icon is transparent (otherwise the sdk will draw the annotation wrong)

Steps to reproduce

  1. Selecting an annotation
  2. Deselcting the annotation by clicking anywhere on the map (func mapView(_ mapView: MGLMapView, didDeselect annotation: MGLAnnotation gets called.
  3. Zoom to a lower zoom level
  4. Selecting a other annotation

Expected behavior

The func mapView(_ mapView: MGLMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage? function should be triggered on every zoom level and every time an annotation was selected. Its very annoying that some annotations are triggering this function and some annotation do nothing.

Actual behavior

The func mapView(_ mapView: MGLMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage? function is not triggered on every zoom level and every time an annotation was selected.

Configuration

**Mapbox SDK versions: 5.1.1
**iOS/macOS versions: 10.0 - 12.x
**Device/simulator models: all iPhones
**Xcode version: Version 10.2.1 (10E1001)

@friedbunny
Copy link
Contributor

Hi @tkrami, thanks for the detailed report. This looks similar to a bug we introduced in 5.1.0 and fixed with #15097 (for release in 5.2.0 tomorrow) — could you please give 5.2.0-beta.1 a try and report back if this annotation selection issue persists? 🙇

@friedbunny friedbunny added bug iOS Mapbox Maps SDK for iOS labels Jul 23, 2019
@tkrami
Copy link
Author

tkrami commented Jul 24, 2019

@friedbunny downgrading to version 4.11.1 works for me. When the 5.2.0 is released I will give it a try.

@tkrami
Copy link
Author

tkrami commented Jul 24, 2019

@friedbunny Another issue was detected yesterday.
Apple rejected the app:
Guideline 3.1.1 - Business - Payments - In-App Purchase

We noticed that your app or its metadata provides access to external mechanisms for purchases or subscriptions to be used in the app, which does not comply with the App Store Review Guidelines.

Specifically, the information button for Mapbox links to the website where digital products and services can be purchased.

Do you know this issue?

@julianrex
Copy link
Contributor

@friedbunny Another issue was detected yesterday.

Noting that this is addressed here: #15406 (comment)

@tkrami have you had a chance to test 5.2.0 for the original issue?

@julianrex julianrex removed the product label Aug 19, 2019
@tkrami
Copy link
Author

tkrami commented Aug 20, 2019

@julianrex I do not test the newest release. I downgraded to pod 'Mapbox-iOS-SDK', '~> 4.11.0' and this will fix the issue for me.

@tkrami
Copy link
Author

tkrami commented Aug 20, 2019

@julianrex I tried v5.2.0. It seems to work correctly with this version.

@friedbunny
Copy link
Contributor

@tkrami great, thanks for following up. 🙇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

3 participants