Package com.parse

Class ParsePolygon

  • public class ParsePolygon
    extends java.lang.Object
    ParsePolygon represents a set of coordinates that may be associated with a key in a ParseObject or used as a reference point for geo queries. This allows proximity based queries on the key.


     List points = new ArrayList();
     points.add(new ParseGeoPoint(0,0));
     points.add(new ParseGeoPoint(0,1));
     points.add(new ParseGeoPoint(1,1));
     points.add(new ParseGeoPoint(1,0));
     ParsePolygon polygon = new ParsePolygon(points);
     ParseObject object = new ParseObject("PlaceObject");
     object.put("area", polygon);;
    • Field Detail

      • CREATOR

        public static final <any> CREATOR
    • Constructor Detail

      • ParsePolygon

        public ParsePolygon​(java.util.List<ParseGeoPoint> coords)
        Creates a new polygon with the specified ParseGeoPoint.
        coords - The polygon's coordinates.
      • ParsePolygon

        public ParsePolygon​(ParsePolygon polygon)
        Creates a copy of polygon;
        polygon - The polygon to copy.
    • Method Detail

      • getCoordinates

        public java.util.List<ParseGeoPoint> getCoordinates()
        Get coordinates.
      • setCoordinates

        public void setCoordinates​(java.util.List<ParseGeoPoint> coords)
        Set coordinates. Valid are Array of GeoPoint, ParseGeoPoint or Location at least 3 points
        coords - The polygon's coordinates.
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • describeContents

        public int describeContents()
      • writeToParcel

        public void writeToParcel​(Parcel dest,
                                  int flags)