I have implemented a MapFragment with an xml layout like this:
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/activity_mappa_partenza" />
In Google map api v.2 I want to draw a Polygon:
PolygonOptions optionsShadow = new PolygonOptions();
optionsShadow.fillColor(Color.RED);
optionsShadow.strokeColor(Color.RED);
optionsShadow.strokeWidth(1f);
optionsShadow.addAll(ombraLinkList);
map.addPolygon(optionsShadow);
ombraLinkList is a LinkedList filled with all point from Sun Terminator Line
What I want to achieve is a polygon filled with night region of the earth.
If the Latitude and Longitude are of this type: Lat 90 Lon -180, Lat 78 Lon -150, Lat 75 Lon -120, -------- --------- Lat 35 Lon -45, Lat 55 Lon 0, Lat 65 Lon 20, Lat 75 Lon 45, Lat 80 Lon 75, Lat 90 Lon 180
Lat 90, Lon 180 is the same point of Lat 90, Lon -180 and i'm unable to draw and close the poligon area.
Any suggestion will be appreciated. Thanks all.