Google maps polyline not rendering perfectly : <p>I am drawing polyline using latest google maps API for iOS. I am constructing polyline point by point but it is not rendering properly as when i zoom out the polyline vanishes(not in literal terms) from the map and when i zoom in it simply shows the line.</p>

<p><a href="https://i.stack.imgur.com/wO637.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/wO637.jpg" alt="Zoomed in view"></a>
This is how polyline appears when zoomed in </p>

<p><a href="https://i.stack.imgur.com/cBJrm.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/cBJrm.jpg" alt="Zoomed out view"></a>
This is how it appears when zoomed out </p>

<p>here is my function for drawing polyline</p>

<pre><code>RCPolyline *polyline = [[RCPolyline alloc] init];
[polyline drawPolylineFromPoint:self.selectedEmployee.location toPoint:location];
</code></pre>

<p>i have override <code>init:</code> for RCPolyline to be something like this</p>

<pre><code>- (instancetype)init {
self = [super init];
if (self) {
    self.strokeWidth = 5.0f;
    self.strokeColor = UIColor.redColor;
    self.geodesic = YES;
    self.map = [RCMapView sharedMapView];
}
return self;}
</code></pre>

<p>and <code>drawPolylineFromPoint:toPoint:</code> does this</p>

<pre><code> - (void)drawPolylineFromPoint:(CLLocation *)pointX toPoint:(CLLocation *)pointY {
      GMSMutablePath *path = [GMSMutablePath path];
      [path addCoordinate:pointX.coordinate];
      [path addCoordinate:pointY.coordinate];
      self.path = path;} 
</code></pre>
