Class Polygon


  • public class Polygon
    extends org.neshan.mapsdk.internal.elements.MapElement
    A polygon that can be drawn on a MapView
    • Field Summary

      • Fields inherited from class org.neshan.mapsdk.internal.elements.MapElement

        META_DATA_ID_KEY, META_DATA_MARKER_ID_KEY, META_DATA_TYPE_KEY, uuid
    • Constructor Summary

      Constructors 
      Constructor Description
      Polygon​(java.util.ArrayList<LatLng> points, com.carto.styles.PolygonStyle polygonStyle)  
      Polygon​(java.util.ArrayList<LatLng> points, java.util.ArrayList<LatLng> holes, com.carto.styles.PolygonStyle polygonStyle)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.carto.vectorelements.VectorElement getRealElement()  
      org.neshan.mapsdk.internal.elements.MapElement setBaseProjection​(com.carto.projections.Projection baseProjection)  
      • Methods inherited from class org.neshan.mapsdk.internal.elements.MapElement

        getUuid
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Polygon

        public Polygon​(java.util.ArrayList<LatLng> points,
                       com.carto.styles.PolygonStyle polygonStyle)
        Parameters:
        points - list of points that define the outline of the polygon
        polygonStyle -
      • Polygon

        public Polygon​(java.util.ArrayList<LatLng> points,
                       java.util.ArrayList<LatLng> holes,
                       com.carto.styles.PolygonStyle polygonStyle)
        Parameters:
        points - list of points that define the outline of the polygon
        holes - A hole is a region inside the polygon that is not filled. A hole is specified in exactly the same way as the outline.
        polygonStyle -
    • Method Detail

      • setBaseProjection

        public org.neshan.mapsdk.internal.elements.MapElement setBaseProjection​(com.carto.projections.Projection baseProjection)
        Specified by:
        setBaseProjection in class org.neshan.mapsdk.internal.elements.MapElement
      • getRealElement

        public com.carto.vectorelements.VectorElement getRealElement()
                                                              throws NullProjectionException
        Specified by:
        getRealElement in class org.neshan.mapsdk.internal.elements.MapElement
        Throws:
        NullProjectionException