1

I am now testing some Maps service provider.
First I have a tableview which contains two provider:"Map Kit","Google Maps SDK".
And when I go into the map kit sample,then get out, and then go into the google maps sample, everything works fine.

But, when I go into the google maps sample first, then get out, and then go into the map kit sample, it crash.

When debug, I find out it crash when [[MKMapView alloc] init]

Why this happens?

Although in real App, we won't have two map service provider, I still want to know the reason.
Thanks.

Puttin
  • 1,596
  • 23
  • 27

1 Answers1

1

There are a couple of existing questions which cover this:

Google Maps SDK & Mapkit in the same app cause crash

Switch Google Maps SDK & Mapkit in the same app cause crash

However, this was related to this bug which Google fixed in version 1.1.2 (released 26th March) - so make sure you have the latest version of the SDK.

Otherwise, as explained in the other questions, you might need to clear or save/restore the OpenGL context before calling MapKit.

Community
  • 1
  • 1
Saxon Druce
  • 17,406
  • 5
  • 50
  • 71
  • 1
    It's probably MapKit then - eg try placing a call to `[EAGLContext setCurrentContext:nil]` before the call to `[[MKMapView alloc] init]`, as described in the other questions. – Saxon Druce Apr 12 '13 at 05:43
  • works here too! http://code.google.com/p/gmaps-api-issues/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal&groupby=&sort=&id=5304 – Daij-Djan Apr 25 '13 at 13:57