本文整理匯總了Java中com.esri.arcgisruntime.mapping.view.WrapAroundMode類的典型用法代碼示例。如果您正苦於以下問題:Java WrapAroundMode類的具體用法?Java WrapAroundMode怎麽用?Java WrapAroundMode使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WrapAroundMode類屬於com.esri.arcgisruntime.mapping.view包,在下文中一共展示了WrapAroundMode類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setMapView
import com.esri.arcgisruntime.mapping.view.WrapAroundMode; //導入依賴的package包/類
/**
* Takes a MapView that has already been instantiated to show a WebMap,
* completes its setup by setting various listeners and attributes, and sets
* it as the activity's content view.
*
* @param mapView
*/
private void setMapView(final MapView mapView) {
mMapView = mapView;
mMapView.setWrapAroundMode(WrapAroundMode.ENABLE_WHEN_SUPPORTED);
// Creating an inflater
mInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
// Setting up the layout params for the searchview and searchresult
// layout
mlayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT,
Gravity.LEFT | Gravity.TOP);
int LEFT_MARGIN_SEARCH = 15;
int RIGHT_MARGIN_SEARCH = 15;
int BOTTOM_MARGIN_SEARCH = 0;
mlayoutParams.setMargins(LEFT_MARGIN_SEARCH, TOP_MARGIN_SEARCH, RIGHT_MARGIN_SEARCH, BOTTOM_MARGIN_SEARCH);
// Displaying the searchbox layout
showSearchBoxLayout();
// Show current location
mLocationDisplay = mapView.getLocationDisplay();
mLocationDisplay.setAutoPanMode(LocationDisplay.AutoPanMode.RECENTER);
mLocationDisplay.startAsync();
mLocationDisplay.setInitialZoomScale(50000);
// Handle any location changes
mLocationDisplay.addLocationChangedListener(new LocationListener());
// Setup use of magnifier on a long press on the map
mMapView.setMagnifierEnabled(true);
mLongPressEvent = null;
// Setup OnTouchListener to detect and act on long-press
mMapView.setOnTouchListener(new MapTouchListener(getActivity().getApplicationContext(), mMapView));
mLocator = new LocatorTask(getString(R.string.geocode_url));
}