Class DefaultFeatureTiles


  • public class DefaultFeatureTiles
    extends FeatureTiles
    Default Feature Tiles implementation using Android Graphics to draw tiles from Well Known Binary Geometries
    Since:
    1.3.1
    • Field Detail

      • DEFAULT_GEOMETRY_CACHE_SIZE

        public static final int DEFAULT_GEOMETRY_CACHE_SIZE
        Default max number of feature geometries to retain in cache
        Since:
        3.3.0
        See Also:
        Constant Field Values
      • cacheGeometries

        protected boolean cacheGeometries
        When true, geometries are cached. Default is true
    • Constructor Detail

      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context,
                                   FeatureDao featureDao)
        Constructor
        Parameters:
        context - context
        featureDao - feature dao
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context,
                                   FeatureDao featureDao,
                                   float density)
        Constructor
        Parameters:
        context - context
        featureDao - feature dao
        density - display density: DisplayMetrics.density
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context,
                                   FeatureDao featureDao,
                                   int width,
                                   int height)
        Constructor
        Parameters:
        context - context
        featureDao - feature dao
        width - drawn tile width
        height - drawn tile height
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context,
                                   GeoPackage geoPackage,
                                   FeatureDao featureDao)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        context - context
        geoPackage - GeoPackage
        featureDao - feature dao
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context,
                                   GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   float density)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        context - context
        geoPackage - GeoPackage
        featureDao - feature dao
        density - display density: DisplayMetrics.density
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context,
                                   GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   int width,
                                   int height)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        context - context
        geoPackage - GeoPackage
        featureDao - feature dao
        width - drawn tile width
        height - drawn tile height
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context,
                                   GeoPackage geoPackage,
                                   FeatureDao featureDao,
                                   float density,
                                   int width,
                                   int height)
        Constructor, auto creates the index manager for indexed tables and feature styles for styled tables
        Parameters:
        context - context
        geoPackage - GeoPackage
        featureDao - feature dao
        density - display density: DisplayMetrics.density
        width - drawn tile width
        height - drawn tile height
        Since:
        3.2.0
      • DefaultFeatureTiles

        public DefaultFeatureTiles​(Context context)
        Constructor, only for retrieving default feature attributes
        Parameters:
        context - context
    • Method Detail

      • isCacheGeometries

        public boolean isCacheGeometries()
        Is caching geometries enabled?
        Returns:
        true if caching geometries
        Since:
        3.3.0
      • setCacheGeometries

        public void setCacheGeometries​(boolean cacheGeometries)
        Set the cache geometries flag
        Parameters:
        cacheGeometries - true to cache geometries
        Since:
        3.3.0
      • clearGeometryCache

        public void clearGeometryCache()
        Clear the geometry cache
        Since:
        3.3.0
      • setGeometryCacheSize

        public void setGeometryCacheSize​(int size)
        Set / resize the geometry cache size
        Parameters:
        size - new size
        Since:
        3.3.0
      • drawTile

        public Bitmap drawTile​(int zoom,
                               BoundingBox boundingBox,
                               FeatureIndexResults results)
        Draw a tile bitmap from feature index results
        Specified by:
        drawTile in class FeatureTiles
        Parameters:
        zoom - zoom level
        boundingBox - web mercator bounding box
        results - feature index results
        Returns:
        tile
      • drawTile

        public Bitmap drawTile​(int zoom,
                               BoundingBox boundingBox,
                               FeatureCursor cursor)
        Draw a tile bitmap from feature geometries in the provided cursor
        Specified by:
        drawTile in class FeatureTiles
        Parameters:
        zoom - zoom level
        boundingBox - web mercator bounding box
        cursor - feature cursor
        Returns:
        tile
      • drawTile

        public Bitmap drawTile​(int zoom,
                               BoundingBox boundingBox,
                               List<FeatureRow> featureRow)
        Draw a tile bitmap from the feature rows
        Specified by:
        drawTile in class FeatureTiles
        Parameters:
        zoom - zoom level
        boundingBox - web mercator bounding box
        featureRow - feature row
        Returns:
        tile