Package mil.nga.geopackage.map.features
Class StyleUtils
java.lang.Object
mil.nga.geopackage.map.features.StyleUtils
Style utilities for populating markers and shapes
- Since:
- 3.2.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Bitmap
createIcon
(IconRow icon, float density) Create the icon bitmapstatic Bitmap
createIcon
(IconRow icon, float density, IconCache iconCache) Create the icon bitmapstatic MarkerOptions
createMarkerOptions
(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new marker options populated with the feature row style (icon or style)static MarkerOptions
createMarkerOptions
(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) Create new marker options populated with the feature row style (icon or style)static MarkerOptions
createMarkerOptions
(FeatureStyle featureStyle, float density) Create new marker options populated with the feature style (icon or style)static MarkerOptions
createMarkerOptions
(FeatureStyle featureStyle, float density, IconCache iconCache) Create new marker options populated with the feature style (icon or style)static MarkerOptions
createMarkerOptions
(IconRow icon, float density) Create new marker options populated with the iconstatic MarkerOptions
createMarkerOptions
(IconRow icon, float density, IconCache iconCache) Create new marker options populated with the iconstatic MarkerOptions
createMarkerOptions
(StyleRow style) Create new marker options populated with the stylestatic MarkerOptions
createMarkerOptions
(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new marker options populated with the feature row style (icon or style)static MarkerOptions
createMarkerOptions
(GeoPackage geoPackage, FeatureRow featureRow, float density, IconCache iconCache) Create new marker options populated with the feature row style (icon or style)static PolygonOptions
createPolygonOptions
(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new polygon options populated with the feature row stylestatic PolygonOptions
createPolygonOptions
(FeatureStyle featureStyle, float density) Create new polygon options populated with the feature stylestatic PolygonOptions
createPolygonOptions
(StyleRow style, float density) Create new polygon options populated with the stylestatic PolygonOptions
createPolygonOptions
(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new polygon options populated with the feature row stylestatic PolylineOptions
createPolylineOptions
(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new polyline options populated with the feature row stylestatic PolylineOptions
createPolylineOptions
(FeatureStyle featureStyle, float density) Create new polyline options populated with the feature stylestatic PolylineOptions
createPolylineOptions
(StyleRow style, float density) Create new polyline options populated with the stylestatic PolylineOptions
createPolylineOptions
(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new polyline options populated with the feature row stylestatic boolean
setFeatureStyle
(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style (icon or style) into the marker optionsstatic boolean
setFeatureStyle
(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) Set the feature row style (icon or style) into the marker optionsstatic boolean
setFeatureStyle
(MarkerOptions markerOptions, FeatureStyle featureStyle, float density) Set the feature style (icon or style) into the marker optionsstatic boolean
setFeatureStyle
(MarkerOptions markerOptions, FeatureStyle featureStyle, float density, IconCache iconCache) Set the feature style (icon or style) into the marker optionsstatic boolean
setFeatureStyle
(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style (icon or style) into the marker optionsstatic boolean
setFeatureStyle
(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density, IconCache iconCache) Set the feature row style (icon or style) into the marker optionsstatic boolean
setFeatureStyle
(PolygonOptions polygonOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style into the polygon optionsstatic boolean
setFeatureStyle
(PolygonOptions polygonOptions, FeatureStyle featureStyle, float density) Set the feature style into the polygon optionsstatic boolean
setFeatureStyle
(PolygonOptions polygonOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style into the polygon optionsstatic boolean
setFeatureStyle
(PolylineOptions polylineOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style into the polyline optionsstatic boolean
setFeatureStyle
(PolylineOptions polylineOptions, FeatureStyle featureStyle, float density) Set the feature style into the polyline optionsstatic boolean
setFeatureStyle
(PolylineOptions polylineOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style into the polyline optionsstatic boolean
setIcon
(MarkerOptions markerOptions, IconRow icon, float density) Set the icon into the marker optionsstatic boolean
setIcon
(MarkerOptions markerOptions, IconRow icon, float density, IconCache iconCache) Set the icon into the marker optionsstatic boolean
setStyle
(MarkerOptions markerOptions, StyleRow style) Set the style into the marker optionsstatic boolean
setStyle
(PolygonOptions polygonOptions, StyleRow style, float density) Set the style into the polygon optionsstatic boolean
setStyle
(PolylineOptions polylineOptions, StyleRow style, float density) Set the style into the polyline options
-
Constructor Details
-
StyleUtils
public StyleUtils()
-
-
Method Details
-
createMarkerOptions
public static MarkerOptions createMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new marker options populated with the feature row style (icon or style)- Parameters:
geoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- marker options populated with the feature style
-
createMarkerOptions
public static MarkerOptions createMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density, IconCache iconCache) Create new marker options populated with the feature row style (icon or style)- Parameters:
geoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
iconCache
- icon cache- Returns:
- marker options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsgeoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if icon or style was set into the marker options
-
setFeatureStyle
public static boolean setFeatureStyle(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density, IconCache iconCache) Set the feature row style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsgeoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
iconCache
- icon cache- Returns:
- true if icon or style was set into the marker options
-
createMarkerOptions
public static MarkerOptions createMarkerOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new marker options populated with the feature row style (icon or style)- Parameters:
featureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- marker options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsfeatureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if icon or style was set into the marker options
-
createMarkerOptions
public static MarkerOptions createMarkerOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) Create new marker options populated with the feature row style (icon or style)- Parameters:
featureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
iconCache
- icon cache- Returns:
- marker options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) Set the feature row style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsfeatureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
iconCache
- icon cache- 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 styledensity
- display density:DisplayMetrics.density
- Returns:
- marker options populated with the feature style
-
createMarkerOptions
public static MarkerOptions createMarkerOptions(FeatureStyle featureStyle, float density, IconCache iconCache) Create new marker options populated with the feature style (icon or style)- Parameters:
featureStyle
- feature styledensity
- display density:DisplayMetrics.density
iconCache
- icon cache- Returns:
- marker options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyle featureStyle, float density) Set the feature style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsfeatureStyle
- feature styledensity
- display density:DisplayMetrics.density
- Returns:
- true if icon or style was set into the marker options
-
setFeatureStyle
public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyle featureStyle, float density, IconCache iconCache) Set the feature style (icon or style) into the marker options- Parameters:
markerOptions
- marker optionsfeatureStyle
- feature styledensity
- display density:DisplayMetrics.density
iconCache
- icon cache- Returns:
- true if icon or style was set into the marker options
-
createMarkerOptions
Create new marker options populated with the icon- Parameters:
icon
- icon rowdensity
- display density:DisplayMetrics.density
- Returns:
- marker options populated with the icon
-
createMarkerOptions
Create new marker options populated with the icon- Parameters:
icon
- icon rowdensity
- display density:DisplayMetrics.density
iconCache
- icon cache- Returns:
- marker options populated with the icon
-
setIcon
Set the icon into the marker options- Parameters:
markerOptions
- marker optionsicon
- icon rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if icon was set into the marker options
-
setIcon
public static boolean setIcon(MarkerOptions markerOptions, IconRow icon, float density, IconCache iconCache) Set the icon into the marker options- Parameters:
markerOptions
- marker optionsicon
- icon rowdensity
- display density:DisplayMetrics.density
iconCache
- icon cache- Returns:
- true if icon was set into the marker options
-
createIcon
Create the icon bitmap- Parameters:
icon
- icon rowdensity
- display density:DisplayMetrics.density
- Returns:
- icon bitmap
-
createIcon
Create the icon bitmap- Parameters:
icon
- icon rowdensity
- display density:DisplayMetrics.density
iconCache
- icon cache- 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
public static PolylineOptions createPolylineOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new polyline options populated with the feature row style- Parameters:
geoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- polyline options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(PolylineOptions polylineOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style into the polyline options- Parameters:
polylineOptions
- polyline optionsgeoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polyline options
-
createPolylineOptions
public static PolylineOptions createPolylineOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new polyline options populated with the feature row style- Parameters:
featureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- polyline options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(PolylineOptions polylineOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style into the polyline options- Parameters:
polylineOptions
- polyline optionsfeatureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polyline options
-
createPolylineOptions
Create new polyline options populated with the feature style- Parameters:
featureStyle
- feature styledensity
- display density:DisplayMetrics.density
- Returns:
- polyline options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(PolylineOptions polylineOptions, FeatureStyle featureStyle, float density) Set the feature style into the polyline options- Parameters:
polylineOptions
- polyline optionsfeatureStyle
- feature styledensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polyline options
-
createPolylineOptions
Create new polyline options populated with the style- Parameters:
style
- style rowdensity
- display density:DisplayMetrics.density
- Returns:
- polyline options populated with the style
-
setStyle
Set the style into the polyline options- Parameters:
polylineOptions
- polyline optionsstyle
- style rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polyline options
-
createPolygonOptions
public static PolygonOptions createPolygonOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new polygon options populated with the feature row style- Parameters:
geoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- polygon options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(PolygonOptions polygonOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style into the polygon options- Parameters:
polygonOptions
- polygon optionsgeoPackage
- GeoPackagefeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polygon options
-
createPolygonOptions
public static PolygonOptions createPolygonOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new polygon options populated with the feature row style- Parameters:
featureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- polygon options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(PolygonOptions polygonOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style into the polygon options- Parameters:
polygonOptions
- polygon optionsfeatureStyleExtension
- feature style extensionfeatureRow
- feature rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polygon options
-
createPolygonOptions
Create new polygon options populated with the feature style- Parameters:
featureStyle
- feature styledensity
- display density:DisplayMetrics.density
- Returns:
- polygon options populated with the feature style
-
setFeatureStyle
public static boolean setFeatureStyle(PolygonOptions polygonOptions, FeatureStyle featureStyle, float density) Set the feature style into the polygon options- Parameters:
polygonOptions
- polygon optionsfeatureStyle
- feature styledensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polygon options
-
createPolygonOptions
Create new polygon options populated with the style- Parameters:
style
- style rowdensity
- display density:DisplayMetrics.density
- Returns:
- polygon options populated with the style
-
setStyle
Set the style into the polygon options- Parameters:
polygonOptions
- polygon optionsstyle
- style rowdensity
- display density:DisplayMetrics.density
- Returns:
- true if style was set into the polygon options
-