Package com.aerisweather.aeris.maps
Class AerisMapsEngine
- java.lang.Object
-
- com.aerisweather.aeris.maps.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAerisMapsEngine.CellInfoWrapper class that holds the customization info for a storm cellclassAerisMapsEngine.ConvectiveOutlookInfoWrapper class to hold customization info for convective outlook polygons.classAerisMapsEngine.DroughtMonitorInfoWrapper class to hold customization info for drought monitor polygons.classAerisMapsEngine.FireOutlookInfoWrapper class to hold customization info for drought monitor polygons.classAerisMapsEngine.TropicalCycloneErrorConeInfoclassAerisMapsEngine.WarningInfoWrapper class to hold customization info for warning polygons.
-
Field Summary
Fields Modifier and Type Field Description static booleaninitialized
-
Constructor Summary
Constructors Constructor Description AerisMapsEngine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.aerisweather.aeris.model.AerisPermissionsgetAerisMapOptionsPermissions()Call to get the permissions for map options activity.intgetAnimationTilesToLoad()Gets the number of animation tiles to load.intgetCameraChangeMillis()Gets the amount of time to wait after moving the camera before pulling for new point and polygon data.AerisMapsEngine.ConvectiveOutlookInfogetConvectiveOutlookEnhanced()Gets the convective outlook customization info relating to the enhanced risk categoryAerisMapsEngine.ConvectiveOutlookInfogetConvectiveOutlookGeneral()Gets the convective outlook customization info relating to the general risk categoryAerisMapsEngine.ConvectiveOutlookInfogetConvectiveOutlookHigh()Gets the convective outlook customization info relating to the high risk categoryAerisMapsEngine.ConvectiveOutlookInfogetConvectiveOutlookMarginal()Gets the convective outlook customization info relating to the marginal risk categoryAerisMapsEngine.ConvectiveOutlookInfogetConvectiveOutlookModerate()Gets the convective outlook customization info relating to the moderate risk categoryAerisMapsEngine.ConvectiveOutlookInfogetConvectiveOutlookSlight()Gets the convective outlook customization info relating to the slight risk categoryfloatgetDefaultAnimationSpeed()Gets the default animation speed.AerisMapsDefaultPointParametersgetDefaultPointParameters()Gets the default parameters.floatgetDefaultTileOpacity()Get the default tile opacity.intgetDrawableForMarker(AerisMarkerType type)AerisMapsEngine.DroughtMonitorInfogetDroughtMonitorAbnormal()Gets the drought monitor customization info relating to the abnormally dry categoryAerisMapsEngine.DroughtMonitorInfogetDroughtMonitorExceptional()Gets the drought monitor customization info relating to the exceptional categoryAerisMapsEngine.DroughtMonitorInfogetDroughtMonitorExtreme()Gets the drought monitor customization info relating to the extreme categoryAerisMapsEngine.DroughtMonitorInfogetDroughtMonitorModerate()Gets the drought monitor customization info relating to the moderate categoryAerisMapsEngine.DroughtMonitorInfogetDroughtMonitorSevere()Gets the drought monitor customization info relating to the severe categoryintgetEndFrameTimeMillis()Gets the wait time in milliseconds for how long the animation should wait extra on the last frame of the animations.AerisMapsEngine.FireOutlookInfogetFireOutlookCritical()Gets the fire outlook customization info relating to the critical categoryAerisMapsEngine.FireOutlookInfogetFireOutlookElevated()Gets the fire outlook customization info relating to the elevated categoryAerisMapsEngine.FireOutlookInfogetFireOutlookExtreme()Gets the fire outlook customization info relating to the extreme categoryAerisMapsEngine.WarningInfogetFloodWarningInfo()Gets the warnings customization info relating to floods.AerisMapsEngine.CellInfogetGeneralInfo()Gets the general storm cell customization info relating to showCone, showLine, stroke,fill and line color.AerisMapsEngine.CellInfogetHailInfo()Gets the hail storm cell customization info relating to showCone, showLine, stroke,fill and line color.static AerisMapsEnginegetInstance(android.content.Context context)Gets an instance of the engine.floatgetMaxAnimationSpeed()Gets the max animation speed in milliseconds.floatgetMinAnimationSpeed()Gets the min animation speed in milliseconds.AerisMapsEngine.CellInfogetRotatingInfo()Gets the rotating storm cell customization info relating to showCone, showLine, stroke,fill and line color.AerisMapsEngine.WarningInfogetSvrThunderstormWarningInfo()Gets the warnings customization info relating to severe thunderstorms.AerisMapsEngine.CellInfogetTornadicInfo()Gets the tornadic storm cell customization info relating to showCone, showLine, stroke,fill and line color.AerisMapsEngine.WarningInfogetTornadoWarningInfo()Gets the warnings customization info relating to tornadoAerisMapsEngine.TropicalCycloneErrorConeInfogetTropicalCycloneErrorConeGeneral()voidinitConfig(android.content.Context context)Initializes by default context items.voidinitMarkerDrawable(AerisMarkerType type, int resDrawable)Override the marker drawable programmatically for aAerisMarkerType.booleanisForecastConeShown()Whether to display the wide forecast cone for each storm cell on the map.booleanisForecastLineShown()Whether to display the forecast line for each storm cell on the map.booleanisMarkerAnnotationShown()Whether to display the annotation containing the storm cells ID when the marker is selected.protected voidsetAerisMapOptionsPermissions(com.aerisweather.aeris.model.AerisPermissions permissions)
-
-
-
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 aAerisMarkerType. 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 drawabletype- the marker type
-
getDefaultPointParameters
public AerisMapsDefaultPointParameters getDefaultPointParameters()
Gets the default parameters. These can be overriden programmatically by modifyingAerisMapsDefaultPointParametersvarious set parameters.- Returns:
- default options
-
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
-
getTropicalCycloneErrorConeGeneral
public AerisMapsEngine.TropicalCycloneErrorConeInfo getTropicalCycloneErrorConeGeneral()
-
-