I am using the code below to draw a bunch of vertical lines at 5 degree intervals on a Google map (android API v2). All works great until zooming out to approximately zoom level 5.1, at which point all my lines disappear. Is this a bug in my code, or something that the maps API does on purpose? How can I get these lines to show up at all zoom scales?
Thanks very much.
if (gMap != null) {
double lat = loc_service.getLatitude();
double lng = loc_service.getLongitude();
LatLngBounds bounds = new LatLngBounds(new LatLng(lat-(MAP_WIDTH/2), lng-(MAP_WIDTH/2)), new LatLng(lat+(MAP_WIDTH/2), lng+(MAP_WIDTH/2)));
CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, 720, 720, 0);
gMap.setMyLocationEnabled(true);
gMap.moveCamera(cu);
// initialize the time marker AT ONE MINUTE INTERVALS
time_markers = new ArrayList<Polyline>();
// calculate distance to zero-second mark
double offset = getLngOffset();
for (int i=-MARK_RNG; i<MARK_RNG; i++) {
PolylineOptions plOptions = new PolylineOptions()
.add(new LatLng(90, (lng-offset + (i*5))))
.add(new LatLng(-90, (lng-offset + (i*5))))
.width(2)
.color(Color.BLUE);
time_markers.add(gMap.addPolyline(plOptions));
}
}