com.amap.api.maps.MapView Java Examples
The following examples show how to use
com.amap.api.maps.MapView.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeoFence_Round_Activity.java From Android_Location_Demo with Apache License 2.0 | 6 votes |
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_geofence_new); setTitle(R.string.roundGeoFence); // 初始化地理围栏 fenceClient = new GeoFenceClient(getApplicationContext()); lyOption = findViewById(R.id.ly_option); btAddFence = (Button) findViewById(R.id.bt_addFence); btOption = (Button) findViewById(R.id.bt_option); tvGuide = (TextView) findViewById(R.id.tv_guide); tvResult = (TextView) findViewById(R.id.tv_result); tvResult.setVisibility(View.GONE); etCustomId = (EditText) findViewById(R.id.et_customId); etRadius = (EditText) findViewById(R.id.et_radius); cbAlertIn = (CheckBox) findViewById(R.id.cb_alertIn); cbAlertOut = (CheckBox) findViewById(R.id.cb_alertOut); cbAldertStated = (CheckBox) findViewById(R.id.cb_alertStated); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); markerOption = new MarkerOptions().draggable(true); init(); }
Example #2
Source File: AMapViewManager.java From react-native-amap with MIT License | 6 votes |
public void addFeature(MapView parent, View child, int index) { AMap map = parent.getMap(); if (child instanceof AMapMarker) { AMapMarker annotation = (AMapMarker) child; annotation.addToMap(map); features.add(index, annotation); Marker marker = (Marker) annotation.getFeature(); markerMap.put(marker, annotation); } else if (child instanceof AMapPolyline) { AMapPolyline polylineView = (AMapPolyline) child; polylineView.addToMap(map); features.add(index, polylineView); Polyline polyline = (Polyline) polylineView.getFeature(); polylineMap.put(polyline, polylineView); } else { ViewGroup children = (ViewGroup) child; for (int i = 0; i < children.getChildCount(); i++) { addFeature(parent, children.getChildAt(i), index); } } }
Example #3
Source File: PolylineActivity.java From TraceByAmap with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.polyline_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; * 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 * */ //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); addPolylinessoild();//画实线 addPolylinesdotted();//画虚线 addPolylinesWithTexture();//画纹理线 //跨越180°的线 addBeyond180Polylines(); }
Example #4
Source File: TrafficActivity.java From TraceByAmap with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.traffic_activity); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState); aMap = mapView.getMap(); findViewById(R.id.traffic_road).setOnClickListener(this); findViewById(R.id.traffic_circle).setOnClickListener(this); trafficSearch = new TrafficSearch(this); trafficSearch.setTrafficSearchListener(this); }
Example #5
Source File: TraceActivity.java From TraceByAmap with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_trace); mGraspButton = (Button) findViewById(R.id.grasp_button); mCleanFinishOverlay = (Button) findViewById(R.id.clean_finish_overlay_button); mCleanFinishOverlay.setOnClickListener(this); mGraspButton.setOnClickListener(this); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState);// 此方法必须重写 mResultShow = (TextView) findViewById(R.id.show_all_dis); mLowSpeedShow = (TextView) findViewById(R.id.show_low_speed); mRecordChoose = (Spinner) findViewById(R.id.record_choose); mDistanceString = getResources().getString(R.string.distance); mStopTimeString = getResources().getString(R.string.stop_time); mCoordinateTypeGroup = (RadioGroup) findViewById(R.id.coordinate_type_group); mCoordinateTypeGroup.setOnCheckedChangeListener(this); init(); }
Example #6
Source File: BasicMapActivity.java From TraceByAmap with MIT License | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.basicmap_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; * 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 * */ //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #7
Source File: LocationActivity.java From xmpp with Apache License 2.0 | 6 votes |
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_location); mapView = (MapView) findViewById(R.id.map_route); mlist = (ListView) findViewById(R.id.location_listView); ll_back= (LinearLayout) findViewById(R.id.location_layout_back); ll_back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); mlist.setOnItemClickListener(this); mapView.onCreate(savedInstanceState); if (aMap == null) { aMap = mapView.getMap(); aMap.setOnCameraChangeListener(this); setUpMap(); } }
Example #8
Source File: RecordShowActivity.java From RecordPath3D with Apache License 2.0 | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.recorddisplay_activity); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState);// 此方法必须重写 mGraspRadioButton = (RadioButton) findViewById(R.id.record_show_activity_grasp_radio_button); mOriginRadioButton = (RadioButton) findViewById(R.id.record_show_activity_origin_radio_button); mOriginRadioButton.setOnClickListener(this); mGraspRadioButton.setOnClickListener(this); mDisplaybtn = (ToggleButton) findViewById(R.id.displaybtn); mDisplaybtn.setOnClickListener(this); Intent recordIntent = getIntent(); int threadPoolSize = Runtime.getRuntime().availableProcessors() * 2 + 3; mThreadPool = Executors.newFixedThreadPool(threadPoolSize); if (recordIntent != null) { mRecordItemId = recordIntent.getIntExtra(RecordActivity.RECORD_ID, -1); } initMap(); }
Example #9
Source File: ShareActivity.java From TraceByAmap with MIT License | 6 votes |
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.share_activity); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState);// 此方法必须重写 mLocationButton = (Button) findViewById(R.id.share_location); mRouteButton = (Button) findViewById(R.id.share_route); mPoiButton = (Button) findViewById(R.id.share_poi); mNaviButton = (Button) findViewById(R.id.share_navi); mUrlView = (WebView)findViewById(R.id.url_view); mLocationButton.setOnClickListener(this); mRouteButton.setOnClickListener(this); mPoiButton.setOnClickListener(this); mNaviButton.setOnClickListener(this); mShareSearch = new ShareSearch(this.getApplicationContext()); mShareSearch.setOnShareSearchListener(this); init(); }
Example #10
Source File: GeoFence_Polygon_Activity.java From Android_Location_Demo with Apache License 2.0 | 6 votes |
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_geofence_new); setTitle(R.string.polygonGeoFence); // 初始化地理围栏 fenceClient = new GeoFenceClient(getApplicationContext()); btAddFence = (Button) findViewById(R.id.bt_addFence); tvGuide = (TextView) findViewById(R.id.tv_guide); tvResult = (TextView) findViewById(R.id.tv_result); tvResult.setVisibility(View.GONE); etCustomId = (EditText) findViewById(R.id.et_customId); cbAlertIn = (CheckBox) findViewById(R.id.cb_alertIn); cbAlertOut = (CheckBox) findViewById(R.id.cb_alertOut); cbAldertStated = (CheckBox) findViewById(R.id.cb_alertStated); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); bitmap = BitmapDescriptorFactory .defaultMarker(BitmapDescriptorFactory.HUE_YELLOW); markerOption = new MarkerOptions().icon(bitmap).draggable(true); init(); }
Example #11
Source File: MainActivity.java From Android_UsingCar_Example with Apache License 2.0 | 6 votes |
private void init(Bundle savedInstanceState) { mAddressTextView = (TextView) findViewById(R.id.address_text); mDestinationButton = (Button) findViewById(R.id.destination_button); mDestinationButton.setOnClickListener(this); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); mAmap = mMapView.getMap(); mAmap.getUiSettings().setZoomControlsEnabled(false); mAmap.setOnMapLoadedListener(this); mAmap.setOnCameraChangeListener(this); mDestinationContainer = (LinearLayout) findViewById(R.id.destination_container); mRouteCostText = (TextView) findViewById(R.id.routecost_text); mDesitinationText = (TextView) findViewById(R.id.destination_text); mDesitinationText.setOnClickListener(this); mLocationImage = (ImageView) findViewById(R.id.location_image); mLocationImage.setOnClickListener(this); mFromToContainer = (LinearLayout) findViewById(R.id.fromto_container); mCancelButton = (Button) findViewById(R.id.cancel_button); }
Example #12
Source File: UiSettingsActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ui_settings_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 */ // Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #13
Source File: GeoFence_Keyword_Activity.java From Android_Location_Demo with Apache License 2.0 | 5 votes |
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_geofence_new); setTitle(R.string.keywordGeoFence); // 初始化地理围栏 fenceClient = new GeoFenceClient(getApplicationContext()); lyOption = findViewById(R.id.ly_option); btAddFence = (Button) findViewById(R.id.bt_addFence); btOption = (Button) findViewById(R.id.bt_option); tvResult = (TextView) findViewById(R.id.tv_result); tvResult.setVisibility(View.GONE); etCustomId = (EditText) findViewById(R.id.et_customId); etCity = (EditText) findViewById(R.id.et_city); etPoiType = (EditText) findViewById(R.id.et_poitype); etKeyword = (EditText) findViewById(R.id.et_keyword); etFenceSize = (EditText) findViewById(R.id.et_fenceSize); cbAlertIn = (CheckBox) findViewById(R.id.cb_alertIn); cbAlertOut = (CheckBox) findViewById(R.id.cb_alertOut); cbAldertStated = (CheckBox) findViewById(R.id.cb_alertStated); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); markerOption = new MarkerOptions().draggable(true); init(); }
Example #14
Source File: MapActivity.java From TestChat with Apache License 2.0 | 5 votes |
@Override public void initView() { LogUtil.e("222123213mapInitView"); send = (Button) findViewById(R.id.btn_map_send); back = (Button) findViewById(R.id.btn_map_back); display = (MapView) findViewById(R.id.mv_display); type = (Button) findViewById(R.id.btn_map_type); if (display != null) { display.onCreate(savedInstanceState); } send.setOnClickListener(this); back.setOnClickListener(this); type.setOnClickListener(this); if (mMap == null) { mMap = display.getMap(); } mMap.setOnMapLoadedListener(new AMap.OnMapLoadedListener() { @Override public void onMapLoaded() { mMap.setOnMapLoadedListener(null); LogUtil.e("视图加载完成1111122111"); send.setClickable(true); type.setClickable(true); LogUtil.e("1浏览更新"); updateMarkerLocation(); } }); }
Example #15
Source File: MainActivity.java From SmoothMove with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #16
Source File: BusRouteActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.route_activity); mContext = this.getApplicationContext(); mapView = (MapView) findViewById(R.id.route_map); mapView.onCreate(bundle);// 此方法必须重写 init(); setfromandtoMarker(); mapView.setVisibility(View.GONE); mBusResultLayout.setVisibility(View.VISIBLE); searchRouteResult(ROUTE_TYPE_BUS, RouteSearch.BusDefault); }
Example #17
Source File: GeoFence_Keyword_Activity.java From Android_Location_Demo with Apache License 2.0 | 5 votes |
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_geofence_new); setTitle(R.string.keywordGeoFence); // 初始化地理围栏 fenceClient = new GeoFenceClient(getApplicationContext()); lyOption = findViewById(R.id.ly_option); btAddFence = (Button) findViewById(R.id.bt_addFence); btOption = (Button) findViewById(R.id.bt_option); tvResult = (TextView) findViewById(R.id.tv_result); tvResult.setVisibility(View.GONE); etCustomId = (EditText) findViewById(R.id.et_customId); etCity = (EditText) findViewById(R.id.et_city); etPoiType = (EditText) findViewById(R.id.et_poitype); etKeyword = (EditText) findViewById(R.id.et_keyword); etFenceSize = (EditText) findViewById(R.id.et_fenceSize); cbAlertIn = (CheckBox) findViewById(R.id.cb_alertIn); cbAlertOut = (CheckBox) findViewById(R.id.cb_alertOut); cbAldertStated = (CheckBox) findViewById(R.id.cb_alertStated); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); markerOption = new MarkerOptions().draggable(true); init(); }
Example #18
Source File: GestureSettingsActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gesture_settings_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 */ // Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #19
Source File: LimitBoundsActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.limit_bounds_activity); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState); init(); aMap.addMarker(new MarkerOptions().position(southwestLatLng)); aMap.addMarker(new MarkerOptions().position(northeastLatLng)); aMap.moveCamera(CameraUpdateFactory.zoomTo(8f)); }
Example #20
Source File: EventsActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.events_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 */ // Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #21
Source File: ZoomActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.zoom_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; * 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 * */ //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #22
Source File: PoiClickActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.poiclick_activity); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); mAMap = mMapView.getMap(); mAMap.setOnPOIClickListener(this); mAMap.setOnMarkerClickListener(this); }
Example #23
Source File: GeoFence_Multiple_Activity.java From Android_Location_Demo with Apache License 2.0 | 5 votes |
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_geofence_new); setTitle(R.string.multipleGeoFence); // 初始化地理围栏 fenceClient = new GeoFenceClient(getApplicationContext()); rgFenceType = (RadioGroup) findViewById(R.id.rg_fenceType); lyOption = findViewById(R.id.ly_option); btAddFence = (Button) findViewById(R.id.bt_addFence); btOption = (Button) findViewById(R.id.bt_option); tvGuide = (TextView) findViewById(R.id.tv_guide); tvResult = (TextView) findViewById(R.id.tv_result); tvResult.setVisibility(View.GONE); etCustomId = (EditText) findViewById(R.id.et_customId); etCity = (EditText) findViewById(R.id.et_city); etRadius = (EditText) findViewById(R.id.et_radius); etPoiType = (EditText) findViewById(R.id.et_poitype); etKeyword = (EditText) findViewById(R.id.et_keyword); etFenceSize = (EditText) findViewById(R.id.et_fenceSize); cbAlertIn = (CheckBox) findViewById(R.id.cb_alertIn); cbAlertOut = (CheckBox) findViewById(R.id.cb_alertOut); cbAldertStated = (CheckBox) findViewById(R.id.cb_alertStated); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); markerOption = new MarkerOptions().draggable(true); init(); }
Example #24
Source File: ContainsActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.arc_activity); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #25
Source File: CameraActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.camera_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; * 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 * */ //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #26
Source File: ScreenShotActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.screenshot_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; * 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 * */ //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #27
Source File: HeatMapActivity.java From TraceByAmap with MIT License | 5 votes |
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.heatmap_activity); mMapView = (MapView) findViewById(R.id.map); mMapView.onCreate(savedInstanceState); mAMap = mMapView.getMap(); initDataAndHeatMap(); }
Example #28
Source File: Animate_CameraActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.animatecamera_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; * 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 * */ //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #29
Source File: LayersActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layers_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; * 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 * */ //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }
Example #30
Source File: LogoSettingsActivity.java From TraceByAmap with MIT License | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.logo_settings_activity); /* * 设置离线地图存储目录,在下载离线地图或初始化地图设置; 使用过程中可自行设置, 若自行设置了离线地图存储的路径, * 则需要在离线地图下载和使用地图页面都进行路径设置 */ // Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置 // MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this); mapView = (MapView) findViewById(R.id.map); mapView.onCreate(savedInstanceState);// 此方法必须重写 init(); }