com.amap.api.maps.MapView源码实例Demo

android.widget.ExpandableListView.OnChildClickListener#com.amap.api.maps.MapView源码实例Demo

下面列出了android.widget.ExpandableListView.OnChildClickListener#com.amap.api.maps.MapView 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: TraceByAmap   文件: ShareActivity.java
@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();
}
 
源代码2 项目: RecordPath3D   文件: RecordShowActivity.java
@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();
}
 
源代码3 项目: TraceByAmap   文件: PolylineActivity.java
@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();
	}
 
源代码4 项目: react-native-amap   文件: AMapViewManager.java
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);
        }
    }
}
 
源代码5 项目: TraceByAmap   文件: TraceActivity.java
@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();
}
 
源代码6 项目: TraceByAmap   文件: BasicMapActivity.java
@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();

}
 
源代码7 项目: TraceByAmap   文件: TrafficActivity.java
@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);
}
 
源代码8 项目: xmpp   文件: LocationActivity.java
@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();
    }


}
 
源代码9 项目: Android_UsingCar_Example   文件: MainActivity.java
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);

	}
 
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();
}
 
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();
}
 
源代码12 项目: FimiX8-RE   文件: CustomLocationModeActivity.java
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(1);
    this.mapView = new MapView(this);
    this.mapView.onCreate(savedInstanceState);
    RelativeLayout layout = new RelativeLayout(this);
    layout.addView(this.mapView);
    TextView textView = new TextView(this);
    textView.setText("自定义效果\n 1、定位成功后, 小蓝点和和地图一起移动到定位点\n 2、手势操作地图后模式修改为 仅定位不移动到中心点");
    layout.addView(textView);
    setContentView(layout);
    init();
}
 
源代码13 项目: FimiX8-RE   文件: CustomLocationActivity.java
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(1);
    setContentView(R.layout.location_mode_source_activity);
    this.mapView = (MapView) findViewById(R.id.map);
    this.mapView.onCreate(savedInstanceState);
    init();
}
 
源代码14 项目: TraceByAmap   文件: PoiIDSearchActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.poiaroundsearch_activity);
	mapview = (MapView)findViewById(R.id.mapView);
	mapview.onCreate(savedInstanceState);
	init();
}
 
源代码15 项目: TraceByAmap   文件: PoiAroundSearchActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.poiaroundsearch_activity);
	mapview = (MapView)findViewById(R.id.mapView);
	mapview.onCreate(savedInstanceState);
	init();
}
 
源代码16 项目: TraceByAmap   文件: DistrictWithBoundaryActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.district_boundary_activity);
	mButton = (Button) findViewById(R.id.search_button);
	mEditText = (EditText) findViewById(R.id.city_text);
	mMapView = (MapView) findViewById(R.id.map);
	mMapView.onCreate(savedInstanceState);
	mAMap = mMapView.getMap();
	mButton.setOnClickListener(this);

}
 
源代码17 项目: TraceByAmap   文件: SmoothMoveActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_smooth_move);

    mMapView = (MapView) findViewById(R.id.map);
    mMapView.onCreate(savedInstanceState);

    init();
}
 
源代码18 项目: TraceByAmap   文件: PolygonActivity.java
@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.polygon_activity);
        /*
         * 设置离线地图存储目录,在下载离线地图或初始化地图设置;
         * 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
         * 则需要在离线地图下载和使用地图页面都进行路径设置
         * */
	    //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
//        MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
		mapView = (MapView) findViewById(R.id.map);
		mapView.onCreate(savedInstanceState);// 此方法必须重写
		init();
	}
 
源代码19 项目: TraceByAmap   文件: NavigateArrowOverlayActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.arc_activity);
	mapView = (MapView) findViewById(R.id.map);
	mapView.onCreate(savedInstanceState);// 此方法必须重写

	init();
}
 
源代码20 项目: TraceByAmap   文件: MarkerActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.marker_activity);
	/*
	 * 设置离线地图存储目录,在下载离线地图或初始化地图设置; 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
	 * 则需要在离线地图下载和使用地图页面都进行路径设置
	 */
	// Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
	// MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
	mapView = (MapView) findViewById(R.id.map);
	mapView.onCreate(savedInstanceState); // 此方法必须重写
	init();
}
 
源代码21 项目: RecordPath3D   文件: MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.basicmap_activity);
	mMapView = (MapView) findViewById(R.id.map);
	mMapView.onCreate(savedInstanceState);// 此方法必须重写
	init();
	initpolyline();
}
 
源代码22 项目: TraceByAmap   文件: CustomMarkerActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.custommarker_activity);
	/*
	 * 设置离线地图存储目录,在下载离线地图或初始化地图设置; 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
	 * 则需要在离线地图下载和使用地图页面都进行路径设置
	 */
	// Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
	// MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
	mapView = (MapView) findViewById(R.id.map);
	mapView.onCreate(savedInstanceState); // 此方法必须重写
	init();
}
 
源代码23 项目: TraceByAmap   文件: ArcActivity.java
@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.arc_activity);
        /*
         * 设置离线地图存储目录,在下载离线地图或初始化地图设置;
         * 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
         * 则需要在离线地图下载和使用地图页面都进行路径设置
         * */
	    //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
//        MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
		mapView = (MapView) findViewById(R.id.map);
		mapView.onCreate(savedInstanceState);// 此方法必须重写
		init();
	}
 
源代码24 项目: TraceByAmap   文件: GeodesicActivity.java
@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.arc_activity);
        /*
         * 设置离线地图存储目录,在下载离线地图或初始化地图设置;
         * 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
         * 则需要在离线地图下载和使用地图页面都进行路径设置
         * */
	    //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
//        MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
		mapView = (MapView) findViewById(R.id.map);
		mapView.onCreate(savedInstanceState);// 此方法必须重写
		init();
	}
 
源代码25 项目: TraceByAmap   文件: HoleActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.hole_activity);

    mapView = (MapView) findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);// 此方法必须重写

    init();

}
 
源代码26 项目: TraceByAmap   文件: PolylineActivitybase.java
@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();
	}
 
源代码27 项目: TraceByAmap   文件: TileOverlayActivity.java
@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.arc_activity);
        /*
         * 设置离线地图存储目录,在下载离线地图或初始化地图设置;
         * 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
         * 则需要在离线地图下载和使用地图页面都进行路径设置
         * */
	    //Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
//        MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
		mapView = (MapView) findViewById(R.id.map);
		mapView.onCreate(savedInstanceState);// 此方法必须重写
		init();
	}
 
源代码28 项目: TraceByAmap   文件: BuildingOverlayActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_building_overlay);
    mapView = (MapView) findViewById(R.id.mapView);
    mapView.onCreate(savedInstanceState);
    map = mapView.getMap();
    map.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(39.922632, 116.391874), 17));
}
 
源代码29 项目: TraceByAmap   文件: InfoWindowActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.marker_activity);
	/*
	 * 设置离线地图存储目录,在下载离线地图或初始化地图设置; 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
	 * 则需要在离线地图下载和使用地图页面都进行路径设置
	 */
	// Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
	// MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
	mapView = (MapView) findViewById(R.id.map);
	mapView.onCreate(savedInstanceState); // 此方法必须重写
	init();
}
 
源代码30 项目: TraceByAmap   文件: BusStationActivity.java
@Override
protected void onCreate(Bundle bundle) {
	super.onCreate(bundle);
	setContentView(R.layout.busline_activity);
	mapView = (MapView) findViewById(R.id.map);
	mapView.onCreate(bundle);// 此方法必须重写
	init();
}