Wednesday, 15 April 2015

ios - Invalid Region Exception when trying to load annotations very far away -


I have a function, which is the center center view between all annotations, which is a type of code here It was taken:

Everything is fine, unless you do not make annotations far away from each other, one can place an annotation in San Francisco and central China, and it works fine. The function that focuses the view will give you space in Europe, because the zoom level is maxed. I want this behavior

However, if you place an icon in San Francisco, and in Japan, the app crashes with this exception:

invalid area & lt ; Center: +39.84104733, +8.77916614 Duration: +178.18954061, + 450.00000000 & gt;

Also keep in mind that it is in portrait mode that the landscape can handle everything.

Is it because map zoom zoom zoom can zoom more zoom?

Does it have to do with loading annotations initially, and then dequeued with DequeuewithReuseIdentifier? I have this in view:
[[NSNotificationCenter defaultCenter] addObserver: Self Selector: @selector (Create Annotation :) Name: @ "Create Annotation" Object: Zero];

I hit a brick wall and I like some responses.

The problem is probably the reason that the area you extend to 180 meridians I'm not sure about the solution , But you can try to reduce 360 ​​by any length of 360. (Again, I do not know that this will work, only one thought).

I must have thought that there should be the same problem in Central China and San Francisco. It may also be a latitude value, I think the map view latitude goes to 80 degrees north and -80 south (160 degrees latitude delta). Before trying to see it, try to replace different values ​​in the field.

No comments:

Post a Comment