Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have either of you found a solution to this issue? I am having the exact same problem, and even using the Google Maps SDK for iOS code verbatim it is still crashing. It crashes on the bolded item below:</p> <pre><code>GMSMutablePath *path = [GMSMutablePath path]; [path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.0)]; [path addCoordinate:CLLocationCoordinate2DMake(37.45, -122.0)]; [path addCoordinate:CLLocationCoordinate2DMake(37.45, -122.2)]; [path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.2)]; [path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.0)]; **GMSPolyline *rectangle = [GMSPolyline polylineWithPath:path];** rectangle.map = mapView_; </code></pre> <p><strong>EDIT: I have found the solution for this behavior:</strong></p> <p>To correct the issue, simply wrap your current code in a dispatch block. Reason being, Google Maps SDK requires that all drawing events be done on the main thread. The below code works properly:</p> <pre><code>dispatch_async(dispatch_get_main_queue(), ^{ GMSMutablePath *path = [GMSMutablePath path]; [path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.0)]; [path addCoordinate:CLLocationCoordinate2DMake(37.45, -122.0)]; [path addCoordinate:CLLocationCoordinate2DMake(37.45, -122.2)]; [path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.2)]; [path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.0)]; **GMSPolyline *rectangle = [GMSPolyline polylineWithPath:path];** rectangle.map = mapView_; }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload