Package com.aerisweather.aeris.maps
Class AerisMapOptions
- java.lang.Object
- 
- com.aerisweather.aeris.maps.AerisMapOptions
 
- 
 public class AerisMapOptions extends Object AerisMapOptions Class for retrieving and saving map options to and from the device SharedPreferences. SOMEDAY: Add a constructor that takes a Context object, then remove all Context parameters from various methods. SOMEDAY: Move the handling of the default options to each respective class (AerisAmp, PointData, PolygonData)
- 
- 
Constructor SummaryConstructors Constructor Description AerisMapOptions()AerisMapOptions(AerisAmp aerisAmp, AerisTile tile, AerisPointData pointData, AerisPolygonData polygonData)AerisMapOptions(AerisAmp aerisAmp, AerisTile tile, AerisPointData pointData, AerisPolygonData polygonData, int opacity, int animSpeed, int googleMapType)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidclearPreferences(android.content.Context context)Remove all map preferences from local storageList<AerisAmpLayer>getActiveAmpLayers()Returns the list of currently selected AerisAmpLayer objectsAerisAmpgetAerisAMP()booleangetAmpLayersChanged()intgetAnimationInterval()Return the number of seconds between the animation images.floatgetAnimationSpeed()Returns an int value indicating the animation speed specified in the saved preferencesintgetAnimationStartOffset()Returns the number of seconds prior to the current time, to start the animation.intgetAnimationStopOffset()Returns the number of seconds after the current time, to stop the animation.booleangetMapPreferences(android.content.Context context)Parse the device's SharedPreferences storage for AerisWeather map keys.intgetMapType()Returns an int value indicating the GoogleMapType specified in the saved preferences.intgetOpacity()Returns an int value indicating the opacity specified in the saved preferencesAerisPointDatagetPointData()Returns the AerisPointData object specified in the saved preferencesAerisPolygonDatagetPolygon()Deprecated.Use getPolygonData() instead Returns the AerisPolygonData object specified in the saved preferencesAerisPolygonDatagetPolygonData()Returns the AerisPolygonData object specified in the saved preferencesstatic AerisMapOptionsgetPreference(android.content.Context context)static AerisMapOptionsgetPreference(android.content.Context context, boolean ignoreUsingOptions)Deprecated.See getMapPreferences()AerisTilegetTile()Returns the AerisTile object specified in the saved preferencesvoidremoveAmpLayer(AerisAmpLayer removeLayer)Remove a specific AMP layer from the map options objectvoidsaveMapPreferences(android.content.Context context)Save the map option preferences to the device's SharedPreferencesvoidsetAerisAMP(AerisAmp aerisAmp)voidsetAmpLayer(AerisAmpLayer aerisAmpLayer)Add a specific AMP layer to the map options objectvoidsetAmpLayersChanged(boolean changed)voidsetAnimationInterval(int interval)Set the number of seconds between the animation images.AerisMapOptionssetAnimationSpeed(float animationSpeed)voidsetAnimationStartOffset(int offsetInSeconds)Set the number of seconds prior to the current time, to start the animation.voidsetAnimationStopOffset(int offsetInSeconds)Set the number of seconds after the current time, to stop the animation.voidsetDefaultAmpLayers()Add the default AMP map layers (Flat, Admin, Radar) to the map options objectvoidsetDefaultMapPreferences(android.content.Context context)AerisMapOptionssetMapType(int mapType)AerisMapOptionssetOpacity(int opacity)static voidsetOptionsOff(android.content.Context context)AerisMapOptionssetPointData(AerisPointData data)AerisMapOptionssetPolygonData(AerisPolygonData polygon)voidsetPreference(android.content.Context context)Deprecated.See saveMapPreferences() Save the map preferences to the device's SharedPreferencesAerisMapOptionssetTile(AerisTile tile)AerisMapOptionswithAnimationSpeed(float animationSpeed)AerisMapOptionswithMapType(int mapType)Deprecated.Use setMapType insteadAerisMapOptionswithOpacity(int opacity)Deprecated.Use setOpacity insteadAerisMapOptionswithPointData(AerisPointData data)Deprecated.Use setPointData insteadAerisMapOptionswithPolygon(AerisPolygonData polygon)Deprecated.Use setPolygonData insteadAerisMapOptionswithTile(AerisTile tile)Deprecated.Use setTile instead
 
- 
- 
- 
Constructor Detail- 
AerisMapOptionspublic AerisMapOptions() 
 - 
AerisMapOptionspublic AerisMapOptions(AerisAmp aerisAmp, AerisTile tile, AerisPointData pointData, AerisPolygonData polygonData, int opacity, int animSpeed, int googleMapType) 
 - 
AerisMapOptionspublic AerisMapOptions(AerisAmp aerisAmp, AerisTile tile, AerisPointData pointData, AerisPolygonData polygonData) 
 
- 
 - 
Method Detail- 
getAmpLayersChangedpublic boolean getAmpLayersChanged() 
 - 
setAmpLayersChangedpublic void setAmpLayersChanged(boolean changed) 
 - 
withTilepublic AerisMapOptions withTile(AerisTile tile) Deprecated.Use setTile instead- Parameters:
- tile- AerisTile
- Returns:
- Updated AerisMapOptions object
 
 - 
setTilepublic AerisMapOptions setTile(AerisTile tile) - Parameters:
- tile- AerisTile
- Returns:
- Updated AerisMapOptions object
 
 - 
getTilepublic AerisTile getTile() Returns the AerisTile object specified in the saved preferences- Returns:
- AerisTile
 
 - 
setAerisAMPpublic void setAerisAMP(AerisAmp aerisAmp) 
 - 
getAerisAMPpublic AerisAmp getAerisAMP() 
 - 
setDefaultAmpLayerspublic void setDefaultAmpLayers() Add the default AMP map layers (Flat, Admin, Radar) to the map options object
 - 
setAmpLayerpublic void setAmpLayer(AerisAmpLayer aerisAmpLayer) Add a specific AMP layer to the map options object- Parameters:
- aerisAmpLayer- AerisAmpLayer
 
 - 
removeAmpLayerpublic void removeAmpLayer(AerisAmpLayer removeLayer) Remove a specific AMP layer from the map options object- Parameters:
- removeLayer- AerisAmpLayer to remove from array of current layers
 
 - 
getActiveAmpLayerspublic List<AerisAmpLayer> getActiveAmpLayers() Returns the list of currently selected AerisAmpLayer objects- Returns:
- AerisAmpLayer list
 
 - 
withPointDatapublic AerisMapOptions withPointData(AerisPointData data) Deprecated.Use setPointData instead- Parameters:
- data- AerisPointData
- Returns:
- Updated AerisMapOptions object
 
 - 
setPointDatapublic AerisMapOptions setPointData(AerisPointData data) - Parameters:
- data- AerisPointData
- Returns:
- Updated AerisMapOptions object
 
 - 
getPointDatapublic AerisPointData getPointData() Returns the AerisPointData object specified in the saved preferences- Returns:
- AerisPointData
 
 - 
withPolygonpublic AerisMapOptions withPolygon(AerisPolygonData polygon) Deprecated.Use setPolygonData instead- Parameters:
- polygon- AerisPolygonData
- Returns:
- Updated AerisMapOptions object
 
 - 
setPolygonDatapublic AerisMapOptions setPolygonData(AerisPolygonData polygon) - Parameters:
- polygon- AerisPolygonData
- Returns:
- Updated AerisMapOptions object
 
 - 
getPolygonpublic AerisPolygonData getPolygon() Deprecated.Use getPolygonData() instead Returns the AerisPolygonData object specified in the saved preferences- Returns:
- AerisPolygonData
 
 - 
getPolygonDatapublic AerisPolygonData getPolygonData() Returns the AerisPolygonData object specified in the saved preferences- Returns:
- AerisPolygonData
 
 - 
withAnimationSpeedpublic AerisMapOptions withAnimationSpeed(float animationSpeed) - Parameters:
- animationSpeed- float
- Returns:
- Updated AerisMapOptions object
 
 - 
setAnimationSpeedpublic AerisMapOptions setAnimationSpeed(float animationSpeed) - Parameters:
- animationSpeed- float
- Returns:
- Updated AerisMapOptions object
 
 - 
getAnimationSpeedpublic float getAnimationSpeed() Returns an int value indicating the animation speed specified in the saved preferences- Returns:
- AerisPointData
 
 - 
withOpacitypublic AerisMapOptions withOpacity(int opacity) Deprecated.Use setOpacity instead- Parameters:
- opacity- int
- Returns:
- Updated AerisMapOptions object
 
 - 
setAnimationIntervalpublic void setAnimationInterval(int interval) Set the number of seconds between the animation images.- Parameters:
- interval- seconds
 
 - 
getAnimationIntervalpublic int getAnimationInterval() Return the number of seconds between the animation images.- Returns:
- int seconds
 
 - 
setOpacitypublic AerisMapOptions setOpacity(int opacity) - Parameters:
- opacity- int
- Returns:
- Updated AerisMapOptions object
 
 - 
getOpacitypublic int getOpacity() Returns an int value indicating the opacity specified in the saved preferences- Returns:
- AerisPointData
 
 - 
withMapTypepublic AerisMapOptions withMapType(int mapType) Deprecated.Use setMapType instead- Parameters:
- mapType- GoogleMap.MAP_TYPE_NORMAL, _HYBRID, _TERRAIN, _SATELLITE, _NONE
- Returns:
- Updated AerisMapOptions object
 
 - 
setMapTypepublic AerisMapOptions setMapType(int mapType) - Parameters:
- mapType- GoogleMap.MAP_TYPE_NORMAL, _HYBRID, _TERRAIN, _SATELLITE, _NONE
- Returns:
- Updated AerisMapOptions object
 
 - 
getMapTypepublic int getMapType() Returns an int value indicating the GoogleMapType specified in the saved preferences. Valid values: GoogleMap.MAP_TYPE_NORMAL, _HYBRID, _TERRAIN, _SATELLITE, _NONE- Returns:
- int
 
 - 
setOptionsOffpublic static void setOptionsOff(android.content.Context context) - Parameters:
- context- Context
 
 - 
clearPreferencespublic static void clearPreferences(android.content.Context context) Remove all map preferences from local storage- Parameters:
- context- Context
 
 - 
setAnimationStartOffsetpublic void setAnimationStartOffset(int offsetInSeconds) Set the number of seconds prior to the current time, to start the animation.- Parameters:
- offsetInSeconds- int
 
 - 
getAnimationStartOffsetpublic int getAnimationStartOffset() Returns the number of seconds prior to the current time, to start the animation.- Returns:
- int
 
 - 
setAnimationStopOffsetpublic void setAnimationStopOffset(int offsetInSeconds) Set the number of seconds after the current time, to stop the animation.- Parameters:
- offsetInSeconds- int
 
 - 
getAnimationStopOffsetpublic int getAnimationStopOffset() Returns the number of seconds after the current time, to stop the animation.- Returns:
- int
 
 - 
setPreferencepublic void setPreference(android.content.Context context) Deprecated.See saveMapPreferences() Save the map preferences to the device's SharedPreferences- Parameters:
- context- App context
 
 - 
saveMapPreferencespublic void saveMapPreferences(android.content.Context context) Save the map option preferences to the device's SharedPreferences- Parameters:
- context- App context
 
 - 
getPreferencepublic static AerisMapOptions getPreference(android.content.Context context) - Parameters:
- context- App context
- Returns:
- AerisMapOptions
 
 - 
getPreferencepublic static AerisMapOptions getPreference(android.content.Context context, boolean ignoreUsingOptions) Deprecated.See getMapPreferences()- Parameters:
- context- App context
- ignoreUsingOptions- Determines if the MapOptions object will be populated with default values
- Returns:
- AerisMapOptions
 
 - 
getMapPreferencespublic boolean getMapPreferences(android.content.Context context) Parse the device's SharedPreferences storage for AerisWeather map keys. Returns true if all map options are found and successfully retrieved. A return of false typically indicates that the default map options should be used.- Parameters:
- context- Device context
- Returns:
- boolean
 
 - 
setDefaultMapPreferencespublic void setDefaultMapPreferences(android.content.Context context) 
 
- 
 
-