Class AerisMapsEngine


  • public class AerisMapsEngine
    extends Object
    This singleton engine allows for customization of the Maps default settings. The settings can be modified as the xml level in the R.values.aeris_default_values.xml. TODO: Builder pattern for runtime setup of default settings
    • Field Detail

      • initialized

        public static boolean initialized
    • Constructor Detail

      • AerisMapsEngine

        public AerisMapsEngine()
    • Method Detail

      • getInstance

        public static AerisMapsEngine getInstance​(android.content.Context context)
        Gets an instance of the engine. Context is necessary if the engine has not yet been initialized is it will use the context to pull default values from R.values.aeris_default_values.xml. It is recommended to intialize this in the application class.
        Parameters:
        context - Context to use fetching initialize variables.
        Returns:
        Instance of the AerisMapsEngine singleton.
      • initConfig

        public void initConfig​(android.content.Context context)
        Initializes by default context items.
        Parameters:
        context - Context to use.
      • initMarkerDrawable

        public void initMarkerDrawable​(AerisMarkerType type,
                                       int resDrawable)
        Override the marker drawable programmatically for a AerisMarkerType. These drawables can also be overridden simply by putting the corresponding marker in your application's drawable folders. All markers have a marker_@type.png. TODO: See documentation for what drawable to override for different marker types
        Parameters:
        resDrawable - id of the drawable
        type - the marker type
      • getDrawableForMarker

        public int getDrawableForMarker​(AerisMarkerType type)
      • getEndFrameTimeMillis

        public int getEndFrameTimeMillis()
        Gets the wait time in milliseconds for how long the animation should wait extra on the last frame of the animations.
        Returns:
        End frame animation time in milliseconds.
      • getDefaultTileOpacity

        public float getDefaultTileOpacity()
        Get the default tile opacity. This number is a range of 0-1.0.
        Returns:
        The default opacity.
      • getDefaultAnimationSpeed

        public float getDefaultAnimationSpeed()
        Gets the default animation speed. This is the time between each frame in milliseconds.
        Returns:
        The default animation speed in milliseconds.
      • getCameraChangeMillis

        public int getCameraChangeMillis()
        Gets the amount of time to wait after moving the camera before pulling for new point and polygon data.
        Returns:
        Camera change time to wait in milliseconds.
      • getMaxAnimationSpeed

        public float getMaxAnimationSpeed()
        Gets the max animation speed in milliseconds.
        Returns:
        max animation speed
      • getMinAnimationSpeed

        public float getMinAnimationSpeed()
        Gets the min animation speed in milliseconds.
        Returns:
        min animation speed.
      • getAnimationTilesToLoad

        public int getAnimationTilesToLoad()
        Gets the number of animation tiles to load.
        Returns:
        number of animation tiles to load.
      • isForecastLineShown

        public boolean isForecastLineShown()
        Whether to display the forecast line for each storm cell on the map.
        Returns:
        true if forecast line show be displayed.
      • isForecastConeShown

        public boolean isForecastConeShown()
        Whether to display the wide forecast cone for each storm cell on the map.
        Returns:
        true if forecast cone should be displayed
      • isMarkerAnnotationShown

        public boolean isMarkerAnnotationShown()
        Whether to display the annotation containing the storm cells ID when the marker is selected.
        Returns:
        true if callout should display cell id when annotation is selected.
      • setAerisMapOptionsPermissions

        protected void setAerisMapOptionsPermissions​(com.aerisweather.aeris.model.AerisPermissions permissions)
      • getAerisMapOptionsPermissions

        public com.aerisweather.aeris.model.AerisPermissions getAerisMapOptionsPermissions()
        Call to get the permissions for map options activity. Will get permissions from AerisEngine if this has not been set by AerisMapView
        Returns:
        AerisPermissions
      • getHailInfo

        public AerisMapsEngine.CellInfo getHailInfo()
        Gets the hail storm cell customization info relating to showCone, showLine, stroke,fill and line color.
        Returns:
        hail Cell info
      • getTornadicInfo

        public AerisMapsEngine.CellInfo getTornadicInfo()
        Gets the tornadic storm cell customization info relating to showCone, showLine, stroke,fill and line color.
        Returns:
        tornadic Cell info
      • getRotatingInfo

        public AerisMapsEngine.CellInfo getRotatingInfo()
        Gets the rotating storm cell customization info relating to showCone, showLine, stroke,fill and line color.
        Returns:
        rotating Cell info
      • getGeneralInfo

        public AerisMapsEngine.CellInfo getGeneralInfo()
        Gets the general storm cell customization info relating to showCone, showLine, stroke,fill and line color.
        Returns:
        Cell info
      • getFloodWarningInfo

        public AerisMapsEngine.WarningInfo getFloodWarningInfo()
        Gets the warnings customization info relating to floods.
        Returns:
        flood warning info
      • getTornadoWarningInfo

        public AerisMapsEngine.WarningInfo getTornadoWarningInfo()
        Gets the warnings customization info relating to tornado
        Returns:
        tornado warning info
      • getSvrThunderstormWarningInfo

        public AerisMapsEngine.WarningInfo getSvrThunderstormWarningInfo()
        Gets the warnings customization info relating to severe thunderstorms.
        Returns:
        severe thunderstorm warning info
      • getConvectiveOutlookGeneral

        public AerisMapsEngine.ConvectiveOutlookInfo getConvectiveOutlookGeneral()
        Gets the convective outlook customization info relating to the general risk category
        Returns:
        general convective outlook info
      • getConvectiveOutlookMarginal

        public AerisMapsEngine.ConvectiveOutlookInfo getConvectiveOutlookMarginal()
        Gets the convective outlook customization info relating to the marginal risk category
        Returns:
        marginal convective outlook info
      • getConvectiveOutlookSlight

        public AerisMapsEngine.ConvectiveOutlookInfo getConvectiveOutlookSlight()
        Gets the convective outlook customization info relating to the slight risk category
        Returns:
        slight convective outlook info
      • getConvectiveOutlookEnhanced

        public AerisMapsEngine.ConvectiveOutlookInfo getConvectiveOutlookEnhanced()
        Gets the convective outlook customization info relating to the enhanced risk category
        Returns:
        enhanced convective outlook info
      • getConvectiveOutlookModerate

        public AerisMapsEngine.ConvectiveOutlookInfo getConvectiveOutlookModerate()
        Gets the convective outlook customization info relating to the moderate risk category
        Returns:
        moderate convective outlook info
      • getConvectiveOutlookHigh

        public AerisMapsEngine.ConvectiveOutlookInfo getConvectiveOutlookHigh()
        Gets the convective outlook customization info relating to the high risk category
        Returns:
        high convective outlook info
      • getDroughtMonitorAbnormal

        public AerisMapsEngine.DroughtMonitorInfo getDroughtMonitorAbnormal()
        Gets the drought monitor customization info relating to the abnormally dry category
        Returns:
        abnormally dry drought info
      • getDroughtMonitorModerate

        public AerisMapsEngine.DroughtMonitorInfo getDroughtMonitorModerate()
        Gets the drought monitor customization info relating to the moderate category
        Returns:
        moderate drought info
      • getDroughtMonitorSevere

        public AerisMapsEngine.DroughtMonitorInfo getDroughtMonitorSevere()
        Gets the drought monitor customization info relating to the severe category
        Returns:
        severe drought info
      • getDroughtMonitorExtreme

        public AerisMapsEngine.DroughtMonitorInfo getDroughtMonitorExtreme()
        Gets the drought monitor customization info relating to the extreme category
        Returns:
        extreme drought info
      • getDroughtMonitorExceptional

        public AerisMapsEngine.DroughtMonitorInfo getDroughtMonitorExceptional()
        Gets the drought monitor customization info relating to the exceptional category
        Returns:
        exceptional drought info
      • getFireOutlookElevated

        public AerisMapsEngine.FireOutlookInfo getFireOutlookElevated()
        Gets the fire outlook customization info relating to the elevated category
        Returns:
        elevated fire outlook info
      • getFireOutlookCritical

        public AerisMapsEngine.FireOutlookInfo getFireOutlookCritical()
        Gets the fire outlook customization info relating to the critical category
        Returns:
        critical fire outlook info
      • getFireOutlookExtreme

        public AerisMapsEngine.FireOutlookInfo getFireOutlookExtreme()
        Gets the fire outlook customization info relating to the extreme category
        Returns:
        extreme fire outlook info