Class StyleUtils

java.lang.Object
mil.nga.geopackage.map.features.StyleUtils

public class StyleUtils extends Object
Style utilities for populating markers and shapes
Since:
3.2.0
  • 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 - GeoPackage
      featureRow - feature row
      density - 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 - GeoPackage
      featureRow - feature row
      density - 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 options
      geoPackage - GeoPackage
      featureRow - feature row
      density - 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 options
      geoPackage - GeoPackage
      featureRow - feature row
      density - 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 extension
      featureRow - feature row
      density - 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 options
      featureStyleExtension - feature style extension
      featureRow - feature row
      density - 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 extension
      featureRow - feature row
      density - 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 options
      featureStyleExtension - feature style extension
      featureRow - feature row
      density - display density: DisplayMetrics.density
      iconCache - icon cache
      Returns:
      true if icon or style was set into the marker options
    • createMarkerOptions

      public static MarkerOptions createMarkerOptions(FeatureStyle featureStyle, float density)
      Create new marker options populated with the feature style (icon or style)
      Parameters:
      featureStyle - feature style
      density - 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 style
      density - 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 options
      featureStyle - feature style
      density - 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 options
      featureStyle - feature style
      density - display density: DisplayMetrics.density
      iconCache - icon cache
      Returns:
      true if icon or style was set into the marker options
    • createMarkerOptions

      public static MarkerOptions createMarkerOptions(IconRow icon, float density)
      Create new marker options populated with the icon
      Parameters:
      icon - icon row
      density - display density: DisplayMetrics.density
      Returns:
      marker options populated with the icon
    • createMarkerOptions

      public static MarkerOptions createMarkerOptions(IconRow icon, float density, IconCache iconCache)
      Create new marker options populated with the icon
      Parameters:
      icon - icon row
      density - display density: DisplayMetrics.density
      iconCache - icon cache
      Returns:
      marker options populated with the icon
    • setIcon

      public static boolean setIcon(MarkerOptions markerOptions, IconRow icon, float density)
      Set the icon into the marker options
      Parameters:
      markerOptions - marker options
      icon - icon row
      density - 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 options
      icon - icon row
      density - display density: DisplayMetrics.density
      iconCache - icon cache
      Returns:
      true if icon was set into the marker options
    • createIcon

      public static Bitmap createIcon(IconRow icon, float density)
      Create the icon bitmap
      Parameters:
      icon - icon row
      density - display density: DisplayMetrics.density
      Returns:
      icon bitmap
    • createIcon

      public static Bitmap createIcon(IconRow icon, float density, IconCache iconCache)
      Create the icon bitmap
      Parameters:
      icon - icon row
      density - display density: DisplayMetrics.density
      iconCache - icon cache
      Returns:
      icon bitmap
    • createMarkerOptions

      public static MarkerOptions createMarkerOptions(StyleRow style)
      Create new marker options populated with the style
      Parameters:
      style - style row
      Returns:
      marker options populated with the style
    • setStyle

      public static boolean setStyle(MarkerOptions markerOptions, StyleRow style)
      Set the style into the marker options
      Parameters:
      markerOptions - marker options
      style - 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 - GeoPackage
      featureRow - feature row
      density - 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 options
      geoPackage - GeoPackage
      featureRow - feature row
      density - 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 extension
      featureRow - feature row
      density - 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 options
      featureStyleExtension - feature style extension
      featureRow - feature row
      density - display density: DisplayMetrics.density
      Returns:
      true if style was set into the polyline options
    • createPolylineOptions

      public static PolylineOptions createPolylineOptions(FeatureStyle featureStyle, float density)
      Create new polyline options populated with the feature style
      Parameters:
      featureStyle - feature style
      density - 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 options
      featureStyle - feature style
      density - display density: DisplayMetrics.density
      Returns:
      true if style was set into the polyline options
    • createPolylineOptions

      public static PolylineOptions createPolylineOptions(StyleRow style, float density)
      Create new polyline options populated with the style
      Parameters:
      style - style row
      density - display density: DisplayMetrics.density
      Returns:
      polyline options populated with the style
    • setStyle

      public static boolean setStyle(PolylineOptions polylineOptions, StyleRow style, float density)
      Set the style into the polyline options
      Parameters:
      polylineOptions - polyline options
      style - style row
      density - 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 - GeoPackage
      featureRow - feature row
      density - 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 options
      geoPackage - GeoPackage
      featureRow - feature row
      density - 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 extension
      featureRow - feature row
      density - 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 options
      featureStyleExtension - feature style extension
      featureRow - feature row
      density - display density: DisplayMetrics.density
      Returns:
      true if style was set into the polygon options
    • createPolygonOptions

      public static PolygonOptions createPolygonOptions(FeatureStyle featureStyle, float density)
      Create new polygon options populated with the feature style
      Parameters:
      featureStyle - feature style
      density - 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 options
      featureStyle - feature style
      density - display density: DisplayMetrics.density
      Returns:
      true if style was set into the polygon options
    • createPolygonOptions

      public static PolygonOptions createPolygonOptions(StyleRow style, float density)
      Create new polygon options populated with the style
      Parameters:
      style - style row
      density - display density: DisplayMetrics.density
      Returns:
      polygon options populated with the style
    • setStyle

      public static boolean setStyle(PolygonOptions polygonOptions, StyleRow style, float density)
      Set the style into the polygon options
      Parameters:
      polygonOptions - polygon options
      style - style row
      density - display density: DisplayMetrics.density
      Returns:
      true if style was set into the polygon options