Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations and clusters get removed randomly when using MKMapTypeHybridFlyover #137

Open
nnhubbard opened this issue Mar 3, 2017 · 7 comments
Labels

Comments

@nnhubbard
Copy link

nnhubbard commented Mar 3, 2017

I am using MKMapTypeHybridFlyover and am getting my annotations and clusters removed at randomly times leaving a blank map. I can reproduce this using the demo project.

Demo video:

https://youtu.be/y0JfE8FiuXE

This seems to happen when the map is skewed.

Any ideas on what could be going on?

@choefele choefele added the bug label Mar 6, 2017
@choefele
Copy link
Owner

choefele commented Mar 6, 2017

Does this only happen if the map type is MKMapTypeHybrid and you change the camera angle? Or does it happen in other ways as well?

Not sure what's the problem – perhaps you have time to create a PR?

@nnhubbard
Copy link
Author

It doesn't seem to happen other mapTypes. I don't know what is wrong either...

@nnhubbard
Copy link
Author

I have also gotten this to happen when the map isn't skewed. The really strange thing I am seeing is when turning on debug mode and seeing the blue grids. In other mapTypes the grids move along with the map when you pan it. But, in Flyover mode the grids redraw in strange ways. I leads me to think that the methods for calculation are not taking into account some strange changes that Flyover mode introduces.

Flyover grids example (strange issues): https://youtu.be/K-UxfTABKJM

Hybrid grids example (no issues): https://youtu.be/ZxYls4oV4i4

Any ides on what could be causing this?

@nnhubbard nnhubbard changed the title Annotations and clusters get removed randomly when using MKMapTypeHybrid Annotations and clusters get removed randomly when using MKMapTypeHybridFlyover Mar 15, 2017
@nnhubbard
Copy link
Author

Correction to my original bug, I had intended to say that this was happening in MKMapTypeHybridFlyover mode. Flyover seems to be the issue. I had mistakenly just said MKMapTypeHybrid which was incorrect.

@choefele
Copy link
Owner

choefele commented Aug 8, 2017

About the issue in https://youtu.be/y0JfE8FiuXE – how did you get the camera to show the map at a pitched angle? From the documentation:

If the map type is MKMapTypeSatellite or MKMapTypeHybrid, the pitch value is clamped to 0.

I tried both MKMapTypeSatelliteFlyover and MKMapTypeHybridFlyover and I couldn't get the camera to pitch (neither manually via Option-Shift-Mouse nor via updating the pitch property programatically).

As for the issue in https://youtu.be/K-UxfTABKJM – this seems to be similar to #133. The rect alignment somehow changed on iOS 10 and I don't yet have a way to work around this. I'm happy to accept PRs for this

@nnhubbard
Copy link
Author

To get the camera to pitch use a physical device and put two fingers on the screen and slide them up. Make sure to be zoomed in fairly close to earth.

@choefele
Copy link
Owner

choefele commented Aug 9, 2017

It turns out that pitching only works on a device – not in the simulator.

It looks to me that the problem is related to the pitching angle: the further you pitch, the bigger the size of the rectangles used for clustering until they are huge and the annotations vanish. It appears that map types related to flyover can be pitched further than other map types so that this problem only appears with these types.

At the moment, the only workaround I can offer is to restrict the pitch angles when enabling flyover mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants