<fragment android:id="@+id/map" android:name="com.openatk.openatklib.atkmap.ATKSupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent" />
FragmentManager fm = getSupportFragmentManager();
ATKSupportMapFragment fragmentMap = (ATKSupportMapFragment) fm.findFragmentById(R.id.map);
ATKMap atkmap = fragmentMap.getAtkMap();
- google-play-services_lib (using rev: 22)
- android-support-v4
- gson-2.2.4
int polygonId = 0;
ATKPolygonView polygonView = atkmap.drawPolygon(polygonId);
ATKPolygonView polygonView = atkmap.completePolygon();
List<LatLng> points = new ArrayList<LatLng>();
points.add(new LatLng(40.46f,-86.96f));
points.add(new LatLng(40.44f,-86.91f));
points.add(new LatLng(40.43f,-86.90f));
polygonId = 1;
ATKPolygon polygon = new ATKPolygon(polygonId, points);
ATKPolygonView added = atkmap.addPolygon(polygon);
added.getAtkPolygon().boundary.add(new LatLng(40.41f,-86.95f));
atkmap.updatePolygon(added.getAtkPolygon());
added.setOnClickListener(new ATKPolygonClickListener(){
@Override
public boolean onClick(ATKPolygonView polygonView) {
polygonView.setFillColor(1.0f, 255, 255, 0);
return false;
}
});