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 class
AerisMapsEngine.CellInfo
Wrapper class that holds the customization info for a storm cellclass
AerisMapsEngine.ConvectiveOutlookInfo
Wrapper class to hold customization info for convective outlook polygons.class
AerisMapsEngine.DroughtMonitorInfo
Wrapper class to hold customization info for drought monitor polygons.class
AerisMapsEngine.FireOutlookInfo
Wrapper class to hold customization info for drought monitor polygons.class
AerisMapsEngine.TropicalCycloneErrorConeInfo
class
AerisMapsEngine.WarningInfo
Wrapper class to hold customization info for warning polygons.
-
Field Summary
Fields Modifier and Type Field Description static boolean
initialized
-
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.AerisPermissions
getAerisMapOptionsPermissions()
Call to get the permissions for map options activity.int
getAnimationTilesToLoad()
Gets the number of animation tiles to load.int
getCameraChangeMillis()
Gets the amount of time to wait after moving the camera before pulling for new point and polygon data.AerisMapsEngine.ConvectiveOutlookInfo
getConvectiveOutlookEnhanced()
Gets the convective outlook customization info relating to the enhanced risk categoryAerisMapsEngine.ConvectiveOutlookInfo
getConvectiveOutlookGeneral()
Gets the convective outlook customization info relating to the general risk categoryAerisMapsEngine.ConvectiveOutlookInfo
getConvectiveOutlookHigh()
Gets the convective outlook customization info relating to the high risk categoryAerisMapsEngine.ConvectiveOutlookInfo
getConvectiveOutlookMarginal()
Gets the convective outlook customization info relating to the marginal risk categoryAerisMapsEngine.ConvectiveOutlookInfo
getConvectiveOutlookModerate()
Gets the convective outlook customization info relating to the moderate risk categoryAerisMapsEngine.ConvectiveOutlookInfo
getConvectiveOutlookSlight()
Gets the convective outlook customization info relating to the slight risk categoryfloat
getDefaultAnimationSpeed()
Gets the default animation speed.AerisMapsDefaultPointParameters
getDefaultPointParameters()
Gets the default parameters.float
getDefaultTileOpacity()
Get the default tile opacity.int
getDrawableForMarker(AerisMarkerType type)
AerisMapsEngine.DroughtMonitorInfo
getDroughtMonitorAbnormal()
Gets the drought monitor customization info relating to the abnormally dry categoryAerisMapsEngine.DroughtMonitorInfo
getDroughtMonitorExceptional()
Gets the drought monitor customization info relating to the exceptional categoryAerisMapsEngine.DroughtMonitorInfo
getDroughtMonitorExtreme()
Gets the drought monitor customization info relating to the extreme categoryAerisMapsEngine.DroughtMonitorInfo
getDroughtMonitorModerate()
Gets the drought monitor customization info relating to the moderate categoryAerisMapsEngine.DroughtMonitorInfo
getDroughtMonitorSevere()
Gets the drought monitor customization info relating to the severe categoryint
getEndFrameTimeMillis()
Gets the wait time in milliseconds for how long the animation should wait extra on the last frame of the animations.AerisMapsEngine.FireOutlookInfo
getFireOutlookCritical()
Gets the fire outlook customization info relating to the critical categoryAerisMapsEngine.FireOutlookInfo
getFireOutlookElevated()
Gets the fire outlook customization info relating to the elevated categoryAerisMapsEngine.FireOutlookInfo
getFireOutlookExtreme()
Gets the fire outlook customization info relating to the extreme categoryAerisMapsEngine.WarningInfo
getFloodWarningInfo()
Gets the warnings customization info relating to floods.AerisMapsEngine.CellInfo
getGeneralInfo()
Gets the general storm cell customization info relating to showCone, showLine, stroke,fill and line color.AerisMapsEngine.CellInfo
getHailInfo()
Gets the hail storm cell customization info relating to showCone, showLine, stroke,fill and line color.static AerisMapsEngine
getInstance(android.content.Context context)
Gets an instance of the engine.float
getMaxAnimationSpeed()
Gets the max animation speed in milliseconds.float
getMinAnimationSpeed()
Gets the min animation speed in milliseconds.AerisMapsEngine.CellInfo
getRotatingInfo()
Gets the rotating storm cell customization info relating to showCone, showLine, stroke,fill and line color.AerisMapsEngine.WarningInfo
getSvrThunderstormWarningInfo()
Gets the warnings customization info relating to severe thunderstorms.AerisMapsEngine.CellInfo
getTornadicInfo()
Gets the tornadic storm cell customization info relating to showCone, showLine, stroke,fill and line color.AerisMapsEngine.WarningInfo
getTornadoWarningInfo()
Gets the warnings customization info relating to tornadoAerisMapsEngine.TropicalCycloneErrorConeInfo
getTropicalCycloneErrorConeGeneral()
void
initConfig(android.content.Context context)
Initializes by default context items.void
initMarkerDrawable(AerisMarkerType type, int resDrawable)
Override the marker drawable programmatically for aAerisMarkerType
.boolean
isForecastConeShown()
Whether to display the wide forecast cone for each storm cell on the map.boolean
isForecastLineShown()
Whether to display the forecast line for each storm cell on the map.boolean
isMarkerAnnotationShown()
Whether to display the annotation containing the storm cells ID when the marker is selected.protected void
setAerisMapOptionsPermissions(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 modifyingAerisMapsDefaultPointParameters
various 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()
-
-