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


Java MarkerOptions.title方法代码示例

本文整理汇总了Java中com.amap.api.maps.model.MarkerOptions.title方法的典型用法代码示例。如果您正苦于以下问题:Java MarkerOptions.title方法的具体用法?Java MarkerOptions.title怎么用?Java MarkerOptions.title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.amap.api.maps.model.MarkerOptions的用法示例。


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

示例1: addNodeMarks

import com.amap.api.maps.model.MarkerOptions; //导入方法依赖的package包/类
protected void addNodeMarks() {
	aMap.clear();
	MarkerOptions markerOptions = new MarkerOptions();
	if (!list_p.isEmpty()) {
		for (TransNode t : list_p) {
			Position p = t.getPosition();
			markerOptions.title(t.getNodename());
			markerOptions.snippet("电话: " + t.getTelcode() + "\n" + "区域码: "
					+ t.getRegioncode());
			// 设置Marker的坐标,为我们点击地图的经纬度坐标
			markerOptions.position(new LatLng(p.getX(), p.getY()));
			// 设置Marker的可见性
			markerOptions.visible(true);
			// 设置Marker是否可以被拖拽,这里先设置为false,之后会演示Marker的拖拽功能
			markerOptions.draggable(false);
			// 将Marker添加到地图上去
			aMap.addMarker(markerOptions);
		}
	} else {
		Toast.makeText(getActivity(), "查询不到此网点哦~", Toast.LENGTH_SHORT)
				.show();
	}
}
 
开发者ID:Extrace,项目名称:Extrace_UserApp,代码行数:24,代码来源:TransNodeTabFragment.java

示例2: createMarkerOptions

import com.amap.api.maps.model.MarkerOptions; //导入方法依赖的package包/类
private MarkerOptions createMarkerOptions() {
    MarkerOptions options = new MarkerOptions();
    if (anchorIsSet) options.anchor(anchorX, anchorY);
    //if (calloutAnchorIsSet) options.infoWindowAnchor(calloutAnchorX, calloutAnchorY);
    options.position(position);
    options.title(title);
    options.snippet(snippet);
    options.rotateAngle(rotation);
    options.setFlat(flat);
    options.draggable(draggable);
    options.zIndex(zIndex);
    options.alpha(opacity);
    options.icon(getIcon());
    return options;
}
 
开发者ID:laoqiu,项目名称:react-native-amap,代码行数:16,代码来源:AMapMarker.java

示例3: initMyPoint

import com.amap.api.maps.model.MarkerOptions; //导入方法依赖的package包/类
private void initMyPoint() {
    MarkerOptions markerOption = new MarkerOptions();
    markerOption.icon(BitmapDescriptorFactory
            .fromResource(R.drawable.location_marker));
    markerOption.title("我的位置")
    ;
    mMyLocation = mAMap.addMarker(markerOption);
    LocationModel.getInstance().registerLocationChange(location -> {
        mMyLocation.setPosition(new LatLng(location.latitude,location.longitude));
        mMyLocation.setSnippet(location.getAddress());
    });
}
 
开发者ID:Jude95,项目名称:Fishing,代码行数:13,代码来源:PlaceMapPathActivity.java

示例4: addMarker

import com.amap.api.maps.model.MarkerOptions; //导入方法依赖的package包/类
private void addMarker(LatLng lt, String des) {
	// TODO Auto-generated method stub
	MarkerOptions markerOptions = new MarkerOptions();
	markerOptions.title(des);
	// 设置Marker的坐标,为我们点击地图的经纬度坐标
	markerOptions.position(lt);
	// 设置Marker的可见性
	markerOptions.visible(true);
	// 设置Marker是否可以被拖拽,这里先设置为false,之后会演示Marker的拖拽功能
	markerOptions.draggable(false);
	// 将Marker添加到地图上去
	aMap.addMarker(markerOptions);
}
 
开发者ID:Extrace,项目名称:Extrace_UserApp,代码行数:14,代码来源:MultyLocationActivity.java

示例5: choose

import com.amap.api.maps.model.MarkerOptions; //导入方法依赖的package包/类
@Override
public void choose(MarkerOptions markerOptions, ClusterPoint clusterPoint) {
	Context context = contextRef.get();
	if (context != null) {
		Resources res = context.getResources();
		boolean isCluster = clusterPoint.size() > 1;
		boolean hasTwoToasters = clusterPoint.containsInputPoint(twoToasters);
		BitmapDescriptor icon;
		String title;
		if (isCluster) {
			title = res.getQuantityString(R.plurals.count_points, clusterPoint.size(), clusterPoint.size());
			int clusterSize = clusterPoint.size();
			if (hasTwoToasters) {
				icon = BitmapDescriptorFactory.fromBitmap(getClusterBitmap(res, R.drawable.ic_map_pin_cluster_toaster, clusterSize));
				title = res.getString(R.string.including_two_toasters, title);
			} else {
				icon = BitmapDescriptorFactory.fromBitmap(getClusterBitmap(res, R.drawable.ic_map_pin_cluster, clusterSize));
				title = res.getQuantityString(R.plurals.count_points, clusterSize, clusterSize);
			}
		} else {
			MarkerData data = (MarkerData)clusterPoint.getPointAtOffset(0).getTag();
			if (hasTwoToasters) {
				icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_map_pin_toaster);
				title = data.getLabel();
			} else {
				icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_map_pin);
				title = res.getString(R.string.point_number_x, data.getLabel());
			}
		}
		markerOptions.icon(icon);
		markerOptions.title(title);
		markerOptions.anchor(0.5f, 1.0f);
	}
}
 
开发者ID:mikezit,项目名称:cluster-amap,代码行数:35,代码来源:ToastedMarkerOptionsChooser.java


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