I am adding a long polyline to connect my transit points. The line is fine when the zoom level is default but as soon as I zoom the lines disappear. This behavior is very random as some line disappear when I zoom once and some disappear on full zoom and some on medium zoom.
Few questions on SO have a solution to change the z-index but it does not work.
Asked
Active
Viewed 490 times
-2

Rishabh Srivastava
- 3,683
- 2
- 30
- 58
-
unless adding the code which produces this behavior ...this only permits guessing. – Martin Zeitler Mar 12 '19 at 00:51
-
Polylines drawn incorrectly in certain cases. [Google Issue 5313](https://issuetracker.google.com/issues/35821816) Strange behaviour drawing polyline. [Issue 5123](https://issuetracker.google.com/issues/35822851) Polylines which venture near the poles are drawn incorrectly. [Issue 9176](https://issuetracker.google.com/issues/35827934) take your pick... – Jon Goodwin Mar 12 '19 at 00:58
-
How about this one (v2) [Bug:Polyline disappear Google issue 35830044](https://issuetracker.google.com/issues/35830044) ?. Are we supposed to guess what your problem **is** ? You need to provide *test cases*. (*minimum code* to **replicate** your problem). There are **MANY** more.. *unfortunately* `Polyline` is, and *always* has been *riddled* with bugs. – Jon Goodwin Mar 12 '19 at 03:15
1 Answers
0
After some digging, here's a possible duplicate - Polylines on android map disappear when zoomed out.
Try something like this, as OP suggested.
map.addPolyline(new PolylineOptions()
.add(new LatLng(85, 5))
.add(new LatLng(-85, 5))
.width(2)
.color(Color.BLUE));

RMass
- 177
- 1
- 2
- 14