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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic android.graphics.BitmapcreateIcon(IconRow icon, float density) Create the icon bitmapstatic android.graphics.BitmapcreateIcon(IconRow icon, float density, IconCache iconCache) Create the icon bitmapstatic MarkerOptionscreateMarkerOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new marker options populated with the feature row style (icon or style)static MarkerOptionscreateMarkerOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) Create new marker options populated with the feature row style (icon or style)static MarkerOptionscreateMarkerOptions(FeatureStyle featureStyle, float density) Create new marker options populated with the feature style (icon or style)static MarkerOptionscreateMarkerOptions(FeatureStyle featureStyle, float density, IconCache iconCache) Create new marker options populated with the feature style (icon or style)static MarkerOptionscreateMarkerOptions(IconRow icon, float density) Create new marker options populated with the iconstatic MarkerOptionscreateMarkerOptions(IconRow icon, float density, IconCache iconCache) Create new marker options populated with the iconstatic MarkerOptionscreateMarkerOptions(StyleRow style) Create new marker options populated with the stylestatic MarkerOptionscreateMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new marker options populated with the feature row style (icon or style)static MarkerOptionscreateMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density, IconCache iconCache) Create new marker options populated with the feature row style (icon or style)static PolygonOptionscreatePolygonOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new polygon options populated with the feature row stylestatic PolygonOptionscreatePolygonOptions(FeatureStyle featureStyle, float density) Create new polygon options populated with the feature stylestatic PolygonOptionscreatePolygonOptions(StyleRow style, float density) Create new polygon options populated with the stylestatic PolygonOptionscreatePolygonOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new polygon options populated with the feature row stylestatic PolylineOptionscreatePolylineOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Create new polyline options populated with the feature row stylestatic PolylineOptionscreatePolylineOptions(FeatureStyle featureStyle, float density) Create new polyline options populated with the feature stylestatic PolylineOptionscreatePolylineOptions(StyleRow style, float density) Create new polyline options populated with the stylestatic PolylineOptionscreatePolylineOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) Create new polyline options populated with the feature row stylestatic booleansetFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style (icon or style) into the marker optionsstatic booleansetFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) Set the feature row style (icon or style) into the marker optionsstatic booleansetFeatureStyle(MarkerOptions markerOptions, FeatureStyle featureStyle, float density) Set the feature style (icon or style) into the marker optionsstatic booleansetFeatureStyle(MarkerOptions markerOptions, FeatureStyle featureStyle, float density, IconCache iconCache) Set the feature style (icon or style) into the marker optionsstatic booleansetFeatureStyle(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style (icon or style) into the marker optionsstatic booleansetFeatureStyle(MarkerOptions markerOptions, GeoPackage geoPackage, FeatureRow featureRow, float density, IconCache iconCache) Set the feature row style (icon or style) into the marker optionsstatic booleansetFeatureStyle(PolygonOptions polygonOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style into the polygon optionsstatic booleansetFeatureStyle(PolygonOptions polygonOptions, FeatureStyle featureStyle, float density) Set the feature style into the polygon optionsstatic booleansetFeatureStyle(PolygonOptions polygonOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style into the polygon optionsstatic booleansetFeatureStyle(PolylineOptions polylineOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) Set the feature row style into the polyline optionsstatic booleansetFeatureStyle(PolylineOptions polylineOptions, FeatureStyle featureStyle, float density) Set the feature style into the polyline optionsstatic booleansetFeatureStyle(PolylineOptions polylineOptions, GeoPackage geoPackage, FeatureRow featureRow, float density) Set the feature row style into the polyline optionsstatic booleansetIcon(MarkerOptions markerOptions, IconRow icon, float density) Set the icon into the marker optionsstatic booleansetIcon(MarkerOptions markerOptions, IconRow icon, float density, IconCache iconCache) Set the icon into the marker optionsstatic booleansetStyle(MarkerOptions markerOptions, StyleRow style) Set the style into the marker optionsstatic booleansetStyle(PolygonOptions polygonOptions, StyleRow style, float density) Set the style into the polygon optionsstatic booleansetStyle(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.densityiconCache- 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.densityiconCache- 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.densityiconCache- 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.densityiconCache- 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.densityiconCache- 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.densityiconCache- 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.densityiconCache- 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.densityiconCache- 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.densityiconCache- 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
-