当前位置: 首页>>代码示例>>Java>>正文


Java MapView类代码示例

本文整理汇总了Java中com.amap.api.maps2d.MapView的典型用法代码示例。如果您正苦于以下问题:Java MapView类的具体用法?Java MapView怎么用?Java MapView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MapView类属于com.amap.api.maps2d包,在下文中一共展示了MapView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);

    IntentFilter filter = new IntentFilter();
    filter.addAction(DJIDemoApplication.FLAG_CONNECTION_CHANGE);
    registerReceiver(mReceiver, filter);

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

    initMapView();
    initUI();
    addListener();

}
 
开发者ID:DJI-Mobile-SDK-Tutorials,项目名称:Android-GSDemo-Gaode-Map,代码行数:19,代码来源:MainActivity.java

示例2: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_searchlocation);
    mapView = (MapView) findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);// 必须要写
    Intent intent = getIntent();
    keyWord = intent.getStringExtra("keyWord");
    city = intent.getStringExtra("city");
    pz = intent.getIntExtra("count", 1);
    if (TextUtils.isEmpty(keyWord)) {
        keyWord = "中科汇联信息技术有限公司";
    }
    if (TextUtils.isEmpty(city)) {
        city = "北京";
    }
    init();
}
 
开发者ID:treejames,项目名称:Map4amap,代码行数:19,代码来源:SearchLocationMap.java

示例3: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_locationplusmap);
    mapView = (MapView) findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);// 必须要写

    Intent intent = getIntent();
    keyWord = intent.getStringExtra("keyWord");
    city = intent.getStringExtra("city");
    pz = intent.getIntExtra("count", 1);
    if (TextUtils.isEmpty(keyWord)) {
        keyWord = "中科汇联信息技术有限公司";
    }
    if (TextUtils.isEmpty(city)) {
        city = "北京";
    }
    initId();
    init();
}
 
开发者ID:treejames,项目名称:Map4amap,代码行数:21,代码来源:LocationPlusMap.java

示例4: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // When the compile and target version is higher than 22, please request the
    // following permissions at runtime to ensure the
    // SDK work well.
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        ActivityCompat.requestPermissions(this,
                new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.VIBRATE,
                        Manifest.permission.INTERNET, Manifest.permission.ACCESS_WIFI_STATE,
                        Manifest.permission.WAKE_LOCK, Manifest.permission.ACCESS_COARSE_LOCATION,
                        Manifest.permission.ACCESS_NETWORK_STATE, Manifest.permission.ACCESS_FINE_LOCATION,
                        Manifest.permission.CHANGE_WIFI_STATE, Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS,
                        Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.SYSTEM_ALERT_WINDOW,
                        Manifest.permission.READ_PHONE_STATE,
                }
                , 1);
    }

    setContentView(R.layout.activity_way_point);

    IntentFilter filter = new IntentFilter();
    filter.addAction(DJIDemoApplication.FLAG_CONNECTION_CHANGE);
    registerReceiver(mReceiver, filter);

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

    initMapView();
    initUI();
    addListener();

}
 
开发者ID:lupwei,项目名称:Croprotector,代码行数:35,代码来源:WayPointActivity.java

示例5: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.map_view_amap_layout);
      mapView = (MapView) findViewById(R.id.autonavi_mapView);
  	mapView.onCreate(savedInstanceState);// 此方法必须重写

ToolBarOptions options = new ToolBarOptions();
setToolBar(R.id.toolbar, options);

  	initView();
      initAmap();
      initLocation();
      updateSendStatus();
  }
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:16,代码来源:LocationAmapActivity.java

示例6: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.map_view_amap_navigation_layout);
	mapView = (MapView) findViewById(R.id.autonavi_mapView);
	mapView.onCreate(savedInstanceState);// 此方法必须重写

	ToolBarOptions options = new ToolBarOptions();
	setToolBar(R.id.toolbar, options);

	initView();
	initAmap();
	initLocation();
	updateSendStatus();
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:16,代码来源:NavigationAmapActivity.java

示例7: initView

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
void initView() {
    mMapView = (MapView) findViewById(R.id.map);
    mLocbtn = (AppCompatImageButton) findViewById(R.id.locbtn);
    mActionLocate = (FloatingActionButton) findViewById(R.id.action_locate);
    mActionSettings = (FloatingActionButton) findViewById(R.id.action_settings);
    mActionReminder = (FloatingActionButton) findViewById(R.id.action_reminder);
    mFloatingActionsMenu = (FloatingActionsMenu) findViewById(R.id.floating_actions_menu);
    mInfoTextView = (TextView) findViewById(R.id.info_text_view);

    mActionLocate.setOnClickListener(this);
    mActionSettings.setOnClickListener(this);
    mActionReminder.setOnClickListener(this);
    mLocbtn.setOnClickListener(this);
}
 
开发者ID:InnoFang,项目名称:FamilyBond,代码行数:15,代码来源:MapActivity.java

示例8: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.find_around_layout);

        mapView = (MapView) findViewById(R.id.map);  //显示地图
        mapView.onCreate(savedInstanceState);   //必须要写
        aMap = mapView.getMap();    //获取地图对象

        initViews();
        EventDeal();
    }
 
开发者ID:absentm,项目名称:myapplication,代码行数:14,代码来源:FindMapAroundAty.java

示例9: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mMapView=(MapView)findViewById(R.id.primary_map);
    city_btn =(Button)findViewById(R.id.city_name);
    main_content =(TextView)findViewById(R.id.main_content);
    mMapView.onCreate(savedInstanceState);

    init();
}
 
开发者ID:Abitalo,项目名称:WeatherDemo,代码行数:13,代码来源:MainActivity.java

示例10: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);

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

    init();
}
 
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:13,代码来源:ShareLocationActivity.java

示例11: initView

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
    protected MapView initView(Bundle savedInstanceState) {

        MapView mapView = (MapView) findViewById(R.id.map);
        horizontalScrollView = (RealTimeLocationHorizontalScrollView) findViewById(R.id.scroll_view);

        mExitImageView = (ImageView) findViewById(android.R.id.icon);
        mCloseImageView = (ImageView) findViewById(android.R.id.icon1);

        mExitImageView.setOnClickListener(this);
        mCloseImageView.setOnClickListener(this);

        mParticipantTextView = (TextView) findViewById(android.R.id.text1);

        mLayout= (RelativeLayout) findViewById(R.id.layout);
        mLayout.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
//                Log.d("RealTimeLocation", "--onTouch-------------");
                return true;
            }
        });

        EventBus.getDefault().register(this);

        int type = getIntent().getIntExtra("conversationType", 0);
        targetId = getIntent().getStringExtra("targetId");

        conversationType = Conversation.ConversationType.setValue(type);

        return mapView;
    }
 
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:33,代码来源:RealTimeLocationActivity.java

示例12: onCreateView

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View rootView = inflater.inflate(R.layout.fragment_main_map_layout, container, false);

    //显示地图
    mapView = (MapView) rootView.findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);
    aMap = mapView.getMap();
    initMap();
    //跳转至发帖页
    publishButton = (FloatingActionButton) rootView.findViewById(R.id.main_map_publish_button);
    publishButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (!LoginStatus.getIsUserMode()) {
                GreenToast.makeText(getActivity(), getResources().getString(R.string.please_login_first), Toast.LENGTH_LONG).show();
                return;
            } else if (CommonUtil.isEmptyString(LocationInfo.getAddress()) ||
                    CommonUtil.isEmptyString(LocationInfo.getCityName()) ||
                    CommonUtil.isEmptyString(String.valueOf(LocationInfo.getLat()))) {

                GreenToast.makeText(getActivity(), getResources().getString(R.string.can_not_get_your_location), Toast.LENGTH_LONG).show();
                return;
            }
            getActivity().startActivityForResult(new Intent(getActivity(), PublishActivity.class), IntentUtil.TO_PUBLISH_PAGE);
        }
    });

    return rootView;
}
 
开发者ID:chenjunqian,项目名称:here,代码行数:32,代码来源:MainMapFragment.java

示例13: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_simple);
    mapView = (MapView) findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);// 必须要写

}
 
开发者ID:treejames,项目名称:Map4amap,代码行数:9,代码来源:SimpleMap.java

示例14: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layout_locationmap);
    mapView = (MapView) findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);// 必须要写
    initId();
    init();
}
 
开发者ID:treejames,项目名称:Map4amap,代码行数:10,代码来源:LocationMap.java

示例15: onCreate

import com.amap.api.maps2d.MapView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	// TODO Auto-generated method stub
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_content_activity);
	setActionbar();
	mapView = (MapView) findViewById(R.id.map);
	mapView.onCreate(savedInstanceState); // 此方法必须重写
	
	int index = this.getIntent().getExtras().getInt("INDEX");
	Log.i(TAG, "------->index:"+index);
	setContent();
	
}
 
开发者ID:SimonJoker,项目名称:OnTheRoad,代码行数:15,代码来源:ActivityContentAcvitity.java


注:本文中的com.amap.api.maps2d.MapView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。