public class LayersManagerBroadcastReceiver extends DropDownReceiver implements android.content.SharedPreferences.OnSharedPreferenceChangeListener, android.view.View.OnKeyListener, DropDown.OnStateListener, android.view.View.OnClickListener
Modifier and Type | Class and Description |
---|---|
static class |
LayersManagerBroadcastReceiver.AdapterSpec |
static class |
LayersManagerBroadcastReceiver.DatasetIngestCallback |
Modifier and Type | Field and Description |
---|---|
protected FavoriteListAdapter |
_favAdapter |
protected LayersManagerBroadcastReceiver.AdapterSpec |
_mobileLayersAdapter |
protected LayersManagerBroadcastReceiver.AdapterSpec |
_nativeLayersAdapter |
protected android.content.SharedPreferences |
_prefs |
static java.lang.String |
ACTION_ADD_FAV |
static java.lang.String |
ACTION_ERROR_LOADING_LAYERS |
static java.lang.String |
ACTION_GRG_DELETE |
static java.lang.String |
ACTION_LAYER_LOADING_PROGRESS |
static java.lang.String |
ACTION_REFRESH_LAYER_MANAGER |
static java.lang.String |
ACTION_SELECT_LAYER |
static java.lang.String |
ACTION_TOOL_FINISHED |
static java.lang.String |
ACTION_VIEW_FAV |
protected java.util.Set<LayerSelectionAdapter> |
adapters |
protected android.widget.Button |
cancelButton |
protected android.widget.Button |
downloadButton |
protected OnlineLayersDownloadManager |
downloader |
protected DownloadAndCacheBroadcastReceiver |
downloadRecv |
static java.lang.String |
EXTRA_IS_LOCKED |
static java.lang.String |
EXTRA_LAYER_NAME |
static java.lang.String |
EXTRA_OFFLINE_ONLY |
static java.lang.String |
EXTRA_PROGRESS_MESSAGE |
static java.lang.String |
EXTRA_SELECTION |
static java.lang.String |
EXTRA_ZOOM_TO
If true, specifies that map should "zoom to" the layer on select.
|
protected static java.lang.String |
FAVS_ID |
protected static java.lang.String |
IMAGERY_ID |
protected static java.lang.String |
MOBILE_ID |
protected android.widget.Switch |
offlineOnlyCheckbox |
protected OnlineLayersManagerView |
onlineView |
protected android.widget.Button |
selectButton |
protected android.widget.TabHost |
tabHost |
static java.lang.String |
TAG |
static int |
TILE_DOWNLOAD_LIMIT |
DROPDOWN_STATE_FULLSCREEN, DROPDOWN_STATE_NONE, DROPDOWN_STATE_NORMAL, FIVE_EIGTHS_HEIGHT, FIVE_EIGTHS_WIDTH, FIVE_TWELFTHS_HEIGHT, FIVE_TWELFTHS_WIDTH, FULL_HEIGHT, FULL_WIDTH, HALF_HEIGHT, HALF_WIDTH, HANDLE_THICKNESS_LANDSCAPE, HANDLE_THICKNESS_PORTRAIT, NO_HEIGHT, NO_WIDTH, QUARTER_SCREEN, SEVEN_SIXTEENTH_WIDTH, THIRD_HEIGHT, THIRD_WIDTH, THREE_EIGHTHS_HEIGHT, THREE_EIGHTHS_WIDTH, TWO_THIRDS_HEIGHT, TWO_THIRDS_WIDTH
Constructor and Description |
---|
LayersManagerBroadcastReceiver(MapView mapView,
CardLayer rasterLayers,
LayersManagerBroadcastReceiver.AdapterSpec nativeListAdapter,
LayersManagerBroadcastReceiver.AdapterSpec mobileListAdapter) |
Modifier and Type | Method and Description |
---|---|
protected void |
activateLayer(LayerSelectionAdapter adapter,
boolean forceAuto) |
protected void |
add(java.lang.String name,
double lat,
double lon,
double alt,
double scale,
double tilt,
double rotation,
java.lang.String layer,
java.lang.String selection,
boolean locked) |
protected void |
add(java.lang.String name,
double lat,
double lon,
double alt,
double scale,
double tilt,
double rotation,
java.lang.String layer,
java.lang.String selection,
boolean locked,
boolean illuminationEnabled,
long illuminationDateTime) |
void |
cancelDownloadArea() |
protected void |
cancelDownloadWorkflow()
Cancel all aspects of the download workflow.
|
protected void |
configureTabLongPressListener(int tabNum,
LayerSelectionAdapter adapter) |
protected void |
createNewLayer() |
void |
disposeImpl()
Any drop down specific disposal implementation that is performed during the
disposal of a drop down.
|
protected void |
drillIn(LayerSelectionAdapter adapter,
int zoomTo) |
protected void |
drillOut(LayerSelectionAdapter adapter,
int zoomTo) |
double |
estimateMinDownloadResolution(TileMatrix matrix,
double maxRes) |
protected LayerSelectionAdapter |
getActiveLayers() |
int |
getTileNum2(java.lang.String layerUri,
double minRes,
double maxRes) |
protected android.view.View |
instantiateFavsView(android.content.Context context) |
protected AbstractLayersManagerView |
instantiateLayersManagerViewImpl(android.content.Context context,
int viewId,
LayersManagerBroadcastReceiver.AdapterSpec adapter) |
protected LayersManagerView |
instantiateMapManagerView(android.content.Context context,
LayersManagerBroadcastReceiver.AdapterSpec adapter) |
protected android.view.View |
instantiateMobileView(android.content.Context c) |
protected android.view.View |
instantiateNativeMapManagerView(android.content.Context context) |
static boolean |
isDownloadable(DatasetDescriptor desc)
Given a Dataset Descriptor, determine if downloading is supported.
|
static boolean |
isSelectionDownloadable(LayerSelection ls) |
protected static boolean |
isUniqueLayerName(java.lang.String name) |
void |
onClick(android.view.View v) |
void |
onDownloadCanceled() |
void |
onDownloadComplete() |
void |
onDownloadError() |
void |
onDropDownClose() |
void |
onDropDownSelectionRemoved() |
void |
onDropDownSizeChanged(double width,
double height) |
void |
onDropDownVisible(boolean v) |
boolean |
onKey(android.view.View v,
int keyCode,
android.view.KeyEvent event)
listen for the back button
|
void |
onProxySubjectChanged(ProxyLayer layer) |
void |
onReceive(android.content.Context ignoreCtx,
android.content.Intent intent) |
void |
onSelectionChanged(RasterLayer2 layer) |
void |
onSharedPreferenceChanged(android.content.SharedPreferences p,
java.lang.String key) |
protected void |
queryMapService(java.lang.String servicePath) |
void |
receiveDownloadArea() |
protected void |
setExpandedDownloadState(boolean enabled)
Control the state of the download expanded layout in the mobile
tab.
|
protected void |
showDownloadProgress(boolean b) |
protected void |
showImageryHint() |
protected void |
showMobileHint() |
protected void |
startDownload(java.lang.String layerTitle) |
protected void |
view(FavoriteListAdapter.Favorite fav) |
_showDropDown, callResize, closeDropDown, dispose, dropDownAlreadyExists, getAssociationKey, getBackStackCount, getDropDown, getMapView, hideDropDown, isClosed, isPortrait, isRetained, isTablet, isTransient, isVisible, onBackButtonPressed, onStateRequested, resize, setAssociationKey, setRetain, setSelected, setSelected, setSelected, setTransient, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, showDropDown, unhideDropDown
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static final java.lang.String ACTION_ERROR_LOADING_LAYERS
public static final java.lang.String ACTION_LAYER_LOADING_PROGRESS
public static final java.lang.String ACTION_GRG_DELETE
public static final java.lang.String ACTION_TOOL_FINISHED
public static final java.lang.String EXTRA_LAYER_NAME
public static final java.lang.String EXTRA_PROGRESS_MESSAGE
public static final java.lang.String ACTION_SELECT_LAYER
public static final java.lang.String EXTRA_OFFLINE_ONLY
public static final java.lang.String EXTRA_SELECTION
public static final java.lang.String EXTRA_IS_LOCKED
public static final java.lang.String ACTION_REFRESH_LAYER_MANAGER
public static final java.lang.String ACTION_ADD_FAV
public static final java.lang.String ACTION_VIEW_FAV
public static final java.lang.String EXTRA_ZOOM_TO
protected final android.content.SharedPreferences _prefs
protected DownloadAndCacheBroadcastReceiver downloadRecv
protected static final java.lang.String IMAGERY_ID
protected static final java.lang.String MOBILE_ID
protected static final java.lang.String FAVS_ID
protected FavoriteListAdapter _favAdapter
public static final int TILE_DOWNLOAD_LIMIT
public static final java.lang.String TAG
protected android.widget.TabHost tabHost
protected final LayersManagerBroadcastReceiver.AdapterSpec _nativeLayersAdapter
protected final LayersManagerBroadcastReceiver.AdapterSpec _mobileLayersAdapter
protected android.widget.Button downloadButton
protected android.widget.Button cancelButton
protected android.widget.Button selectButton
protected android.widget.Switch offlineOnlyCheckbox
protected OnlineLayersManagerView onlineView
protected OnlineLayersDownloadManager downloader
protected final java.util.Set<LayerSelectionAdapter> adapters
public LayersManagerBroadcastReceiver(MapView mapView, CardLayer rasterLayers, LayersManagerBroadcastReceiver.AdapterSpec nativeListAdapter, LayersManagerBroadcastReceiver.AdapterSpec mobileListAdapter)
protected LayerSelectionAdapter getActiveLayers()
public void disposeImpl()
DropDownReceiver
disposeImpl
in class DropDownReceiver
protected void showImageryHint()
protected void showMobileHint()
public void onReceive(android.content.Context ignoreCtx, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
public void onSharedPreferenceChanged(android.content.SharedPreferences p, java.lang.String key)
onSharedPreferenceChanged
in interface android.content.SharedPreferences.OnSharedPreferenceChangeListener
protected void configureTabLongPressListener(int tabNum, LayerSelectionAdapter adapter)
protected void activateLayer(LayerSelectionAdapter adapter, boolean forceAuto)
protected android.view.View instantiateFavsView(android.content.Context context)
protected void view(FavoriteListAdapter.Favorite fav)
protected void add(java.lang.String name, double lat, double lon, double alt, double scale, double tilt, double rotation, java.lang.String layer, java.lang.String selection, boolean locked)
protected void add(java.lang.String name, double lat, double lon, double alt, double scale, double tilt, double rotation, java.lang.String layer, java.lang.String selection, boolean locked, boolean illuminationEnabled, long illuminationDateTime)
protected android.view.View instantiateNativeMapManagerView(android.content.Context context)
protected LayersManagerView instantiateMapManagerView(android.content.Context context, LayersManagerBroadcastReceiver.AdapterSpec adapter)
protected void drillIn(LayerSelectionAdapter adapter, int zoomTo)
protected void drillOut(LayerSelectionAdapter adapter, int zoomTo)
protected void setExpandedDownloadState(boolean enabled)
protected android.view.View instantiateMobileView(android.content.Context c)
protected void cancelDownloadWorkflow()
public static boolean isSelectionDownloadable(LayerSelection ls)
public static boolean isDownloadable(DatasetDescriptor desc)
desc
- the dataset descriptorprotected AbstractLayersManagerView instantiateLayersManagerViewImpl(android.content.Context context, int viewId, LayersManagerBroadcastReceiver.AdapterSpec adapter)
public void onDownloadComplete()
public void onDownloadCanceled()
public void onDownloadError()
public int getTileNum2(java.lang.String layerUri, double minRes, double maxRes)
public double estimateMinDownloadResolution(TileMatrix matrix, double maxRes)
public void receiveDownloadArea()
public void cancelDownloadArea()
public void onDropDownSelectionRemoved()
onDropDownSelectionRemoved
in interface DropDown.OnStateListener
public void onDropDownVisible(boolean v)
onDropDownVisible
in interface DropDown.OnStateListener
public void onDropDownSizeChanged(double width, double height)
onDropDownSizeChanged
in interface DropDown.OnStateListener
public void onDropDownClose()
onDropDownClose
in interface DropDown.OnStateListener
protected static boolean isUniqueLayerName(java.lang.String name)
protected void queryMapService(java.lang.String servicePath)
protected void startDownload(java.lang.String layerTitle)
protected void createNewLayer()
protected void showDownloadProgress(boolean b)
public boolean onKey(android.view.View v, int keyCode, android.view.KeyEvent event)
onKey
in interface android.view.View.OnKeyListener
public void onProxySubjectChanged(ProxyLayer layer)
public void onSelectionChanged(RasterLayer2 layer)
public void onClick(android.view.View v)
onClick
in interface android.view.View.OnClickListener