117118119120121122123124125126127
point.getY() + (r * Math.sin(a))); point2List.add(newPoint1); } point2List.add(point2List.get(0)); LinearRing linearRing = new LinearRing(point2List); List<LinearRing> ringList = new ArrayList<LinearRing>(); ringList.add(linearRing); Vector polygonFeature = new Vector(new Polygon(ringList)); map.addLayer(vectorLayer);
103104105106107108109110111112113
pointList.add(newPoint); } pointList.add(pointList.get(0)); LinearRing linearRing = new LinearRing(pointList); Vector polygonFeature = new Vector(new Polygon( Arrays.asList(linearRing)), toMap(pair("name", "dude"), pair("age", 21), pair("favColor", "purple"), pair("align", "lb")));
59606162636465
public Polygon toGeometry() { List<Point> points = cast(Arrays.asList( new Point(_left, _bottom), new Point(_right, _bottom), new Point(_right, _top), new Point(_left, _top))); return new Polygon(Arrays.asList(new LinearRing(points))); }