Package mil.nga.geopackage.map.features
Class StyleCache
java.lang.Object
mil.nga.geopackage.map.features.StyleCache
Style utilities for populating markers and shapes. Caches icons for a single GeoPackage
- Since:
- 3.2.0
-
Constructor Summary
ConstructorDescriptionStyleCache
(FeatureStyleExtension featureStyleExtension, float density) ConstructorStyleCache
(FeatureStyleExtension featureStyleExtension, float density, int iconCacheSize) ConstructorStyleCache
(GeoPackage geoPackage, float density) ConstructorStyleCache
(GeoPackage geoPackage, float density, int iconCacheSize) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the cachecreateIcon
(IconRow icon) Create the icon bitmapcreateMarkerOptions
(FeatureStyle featureStyle) Create new marker options populated with the feature style (icon or style)createMarkerOptions
(IconRow icon) Create new marker options populated with the iconcreateMarkerOptions
(StyleRow style) Create new marker options populated with the stylecreateMarkerOptions
(FeatureRow featureRow) Create new marker options populated with the feature row style (icon or style)createPolygonOptions
(FeatureStyle featureStyle) Create new polygon options populated with the feature stylecreatePolygonOptions
(StyleRow style) Create new polygon options populated with the stylecreatePolygonOptions
(FeatureRow featureRow) Create new polygon options populated with the feature row stylecreatePolylineOptions
(FeatureStyle featureStyle) Create new polyline options populated with the feature stylecreatePolylineOptions
(StyleRow style) Create new polyline options populated with the stylecreatePolylineOptions
(FeatureRow featureRow) Create new polyline options populated with the feature row stylefloat
Get the display densityGet the feature style extensionvoid
setDensity
(float density) Set the display densityboolean
setFeatureStyle
(MarkerOptions markerOptions, FeatureStyle featureStyle) Set the feature style (icon or style) into the marker optionsboolean
setFeatureStyle
(MarkerOptions markerOptions, FeatureRow featureRow) Set the feature row style (icon or style) into the marker optionsboolean
setFeatureStyle
(PolygonOptions polygonOptions, FeatureStyle featureStyle) Set the feature style into the polygon optionsboolean
setFeatureStyle
(PolygonOptions polygonOptions, FeatureRow featureRow) Set the feature row style into the polygon optionsboolean
setFeatureStyle
(PolylineOptions polylineOptions, FeatureStyle featureStyle) Set the feature style into the polyline optionsboolean
setFeatureStyle
(PolylineOptions polylineOptions, FeatureRow featureRow) Set the feature row style into the polyline optionsboolean
setIcon
(MarkerOptions markerOptions, IconRow icon) Set the icon into the marker optionsboolean
setStyle
(MarkerOptions markerOptions, StyleRow style) Set the style into the marker optionsboolean
setStyle
(PolygonOptions polygonOptions, StyleRow style) Set the style into the polygon optionsboolean
setStyle
(PolylineOptions polylineOptions, StyleRow style) Set the style into the polyline options
-
Constructor Details
-
StyleCache
Constructor- Parameters:
geoPackage
- GeoPackagedensity
- display density:DisplayMetrics.density
-
StyleCache
Constructor- Parameters:
geoPackage
- GeoPackagedensity
- display density:DisplayMetrics.density
iconCacheSize
- number of icon bitmaps to cache
-
StyleCache
Constructor- Parameters:
featureStyleExtension
- feature style extensiondensity
- display density:DisplayMetrics.density
-
StyleCache
Constructor- Parameters:
featureStyleExtension
- feature style extensiondensity
- display density:DisplayMetrics.density
iconCacheSize
- number of icon bitmaps to cache
-
-
Method Details
-
clear
public void clear()Clear the cache -
getFeatureStyleExtension
Get the feature style extension- Returns:
- feature style extension
-
getDensity
public float getDensity()Get the display density- Returns:
- density
-
setDensity
public void setDensity(float density) Set the display density- Parameters:
density
- density
-
createMarkerOptions
Create new marker options populated with the feature row style (icon or style)- Parameters:
featureRow
- feature row- Returns:
- marker options populated with the feature style
-
setFeatureStyle
Set the feature row style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsfeatureRow
- feature row- Returns:
- true if icon or style was set into the marker options
-
createMarkerOptions
Create new marker options populated with the feature style (icon or style)- Parameters:
featureStyle
- feature style- Returns:
- marker options populated with the feature style
-
setFeatureStyle
Set the feature style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsfeatureStyle
- feature style- Returns:
- true if icon or style was set into the marker options
-
createMarkerOptions
Create new marker options populated with the icon- Parameters:
icon
- icon row- Returns:
- marker options populated with the icon
-
setIcon
Set the icon into the marker options- Parameters:
markerOptions
- marker optionsicon
- icon row- Returns:
- true if icon was set into the marker options
-
createIcon
Create the icon bitmap- Parameters:
icon
- icon row- Returns:
- icon bitmap
-
createMarkerOptions
Create new marker options populated with the style- Parameters:
style
- style row- Returns:
- marker options populated with the style
-
setStyle
Set the style into the marker options- Parameters:
markerOptions
- marker optionsstyle
- style row- Returns:
- true if style was set into the marker options
-
createPolylineOptions
Create new polyline options populated with the feature row style- Parameters:
featureRow
- feature row- Returns:
- polyline options populated with the feature style
-
setFeatureStyle
Set the feature row style into the polyline options- Parameters:
polylineOptions
- polyline optionsfeatureRow
- feature row- Returns:
- true if style was set into the polyline options
-
createPolylineOptions
Create new polyline options populated with the feature style- Parameters:
featureStyle
- feature style- Returns:
- polyline options populated with the feature style
-
setFeatureStyle
Set the feature style into the polyline options- Parameters:
polylineOptions
- polyline optionsfeatureStyle
- feature style- Returns:
- true if style was set into the polyline options
-
createPolylineOptions
Create new polyline options populated with the style- Parameters:
style
- style row- Returns:
- polyline options populated with the style
-
setStyle
Set the style into the polyline options- Parameters:
polylineOptions
- polyline optionsstyle
- style row- Returns:
- true if style was set into the polyline options
-
createPolygonOptions
Create new polygon options populated with the feature row style- Parameters:
featureRow
- feature row- Returns:
- polygon options populated with the feature style
-
setFeatureStyle
Set the feature row style into the polygon options- Parameters:
polygonOptions
- polygon optionsfeatureRow
- feature row- Returns:
- true if style was set into the polygon options
-
createPolygonOptions
Create new polygon options populated with the feature style- Parameters:
featureStyle
- feature style- Returns:
- polygon options populated with the feature style
-
setFeatureStyle
Set the feature style into the polygon options- Parameters:
polygonOptions
- polygon optionsfeatureStyle
- feature style- Returns:
- true if style was set into the polygon options
-
createPolygonOptions
Create new polygon options populated with the style- Parameters:
style
- style row- Returns:
- polygon options populated with the style
-
setStyle
Set the style into the polygon options- Parameters:
polygonOptions
- polygon optionsstyle
- style row- Returns:
- true if style was set into the polygon options
-