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


Java MarkerInfo类代码示例

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


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

示例1: updateMarker

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void updateMarker(MarkerInfo markerInfo, boolean isDraggable) {
    // if the drone hasn't received a gps signal yet
    final LatLong coord = markerInfo.getPosition();
    if (coord == null) {
        return;
    }
    final LatLng position = DroneHelper.CoordToBaiduLatLang(coord);
    Marker marker = mBiMarkersMap.getValue(markerInfo);
    if (marker == null) {
        // Generate the marker
        generateMarker(markerInfo, position, isDraggable);
    } else {
        // Update the marker
        updateMarker(marker, markerInfo, position, isDraggable);
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:18,代码来源:BaiduMapFragment.java

示例2: generateMarker

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
private void generateMarker(MarkerInfo markerInfo, LatLng position, boolean isDraggable) {

        Log.v("123","SSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
        final MarkerOptions markerOptions = new MarkerOptions()
                .position(position)
                .draggable(isDraggable)
                .anchor(markerInfo.getAnchorU(), markerInfo.getAnchorV())
                .title(markerInfo.getSnippet()).title(markerInfo.getTitle());

        final Bitmap markerIcon = markerInfo.getIcon(getResources());
        if (markerIcon != null) {
            markerOptions.icon(BitmapDescriptorFactory.fromBitmap(markerIcon));
        }
        else
        {
            markerOptions.icon(BitmapDescriptorFactory
                    .fromResource(R.drawable.ic_marker_white));
        }

        Marker marker = (Marker)getBaiduMap().addOverlay(markerOptions);
        mBiMarkersMap.put(markerInfo, marker);
    }
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:23,代码来源:BaiduMapFragment.java

示例3: checkForWaypointMarkerMoving

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
private void checkForWaypointMarkerMoving(MarkerInfo markerInfo) {
	if (markerInfo instanceof MissionItem.SpatialItem) {
		LatLong position = markerInfo.getPosition();

		// update marker source
		MissionItem.SpatialItem waypoint = (MissionItem.SpatialItem) markerInfo;
           LatLong waypointPosition = waypoint.getCoordinate();
           waypointPosition.setLatitude(position.getLatitude());
           waypointPosition.setLongitude(position.getLongitude());

		// update flight path
		mMapFragment.updateMissionPath(missionProxy);
	}
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:15,代码来源:EditorMapFragment.java

示例4: checkForWaypointMarker

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
private void checkForWaypointMarker(MarkerInfo markerInfo) {
	if ((markerInfo instanceof MissionItemMarkerInfo)) {
		missionProxy.move(((MissionItemMarkerInfo) markerInfo).getMarkerOrigin(),
				markerInfo.getPosition());
	}else if ((markerInfo instanceof PolygonMarkerInfo)) {
		PolygonMarkerInfo marker = (PolygonMarkerInfo) markerInfo;
		missionProxy.movePolygonPoint(marker.getSurvey(), marker.getIndex(), markerInfo.getPosition());
	}
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:10,代码来源:EditorMapFragment.java

示例5: onMarkerClick

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public boolean onMarkerClick(MarkerInfo info) {
	if (info instanceof MissionItemMarkerInfo) {
		editorListener.onItemClick(((MissionItemMarkerInfo) info).getMarkerOrigin(), false);
		return true;
	} else {
		return false;
	}
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:10,代码来源:EditorMapFragment.java

示例6: newInstance

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
public static List<MarkerInfo> newInstance(MissionItemProxy origin) {
	List<MarkerInfo> markerInfos = new ArrayList<MarkerInfo>();
	switch (origin.getMissionItem().getType()) {
	case LAND:
		markerInfos.add(new LandMarkerInfo(origin));
		break;
	case CIRCLE:
		markerInfos.add(new LoiterMarkerInfo(origin));
		break;

	case REGION_OF_INTEREST:
		markerInfos.add(new ROIMarkerInfo(origin));
		break;

	case WAYPOINT:
		markerInfos.add(new WaypointMarkerInfo(origin));
		break;

	case SPLINE_WAYPOINT:
		markerInfos.add(new SplineWaypointMarkerInfo(origin));
		break;

	case STRUCTURE_SCANNER:
		markerInfos.add(new StructureScannerMarkerInfoProvider(origin));
		break;
		
	case SURVEY:
		markerInfos.addAll(new SurveyMarkerInfoProvider(origin).getMarkersInfos());
		break;

	default:
		break;
	}

	return markerInfos;
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:37,代码来源:MissionItemMarkerInfo.java

示例7: getMarkersInfos

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
/**
 * @return the map markers corresponding to this mission's command set.
 */
public List<MarkerInfo> getMarkersInfos() {
	List<MarkerInfo> markerInfos = new ArrayList<MarkerInfo>();

	for (MissionItemProxy itemProxy : missionItemProxies) {
		List<MarkerInfo> itemMarkerInfos = itemProxy.getMarkerInfos();
		if (itemMarkerInfos != null && !itemMarkerInfos.isEmpty()) {
			markerInfos.addAll(itemMarkerInfos);
		}
	}
	return markerInfos;
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:15,代码来源:MissionProxy.java

示例8: removeMarkers

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void removeMarkers(Collection<MarkerInfo> markerInfoList) {
    Log.v(TAG,"remove marker");
    if (markerInfoList == null || markerInfoList.isEmpty()) {
        return;
    }

    for (MarkerInfo markerInfo : markerInfoList) {
        Marker marker = mBiMarkersMap.getValue(markerInfo);
        if (marker != null) {
            marker.remove();
            mBiMarkersMap.removeKey(markerInfo);
        }
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:16,代码来源:BaiduMapFragment.java

示例9: onMarkerDrag

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDrag(MarkerInfo markerInfo) {
	checkForWaypointMarkerMoving(markerInfo);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:5,代码来源:EditorMapFragment.java

示例10: onMarkerDragStart

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragStart(MarkerInfo markerInfo) {
	checkForWaypointMarkerMoving(markerInfo);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:5,代码来源:EditorMapFragment.java

示例11: onMarkerDragEnd

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragEnd(MarkerInfo markerInfo) {
	checkForWaypointMarker(markerInfo);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:5,代码来源:EditorMapFragment.java

示例12: run

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void run() {
	if (getActivity() == null && mMapFragment == null)
		return;

	final List<MarkerInfo> missionMarkerInfos = missionProxy.getMarkersInfos();

	final boolean isThereMissionMarkers = !missionMarkerInfos.isEmpty();
	final boolean isHomeValid = home.isValid();
	final boolean isGuidedVisible = guided.isVisible();

	// Get the list of markers currently on the map.
	final Set<MarkerInfo> markersOnTheMap = mMapFragment.getMarkerInfoList();

	if (!markersOnTheMap.isEmpty()) {
		if (isHomeValid) {
			markersOnTheMap.remove(home);
		}

		if (isGuidedVisible) {
			markersOnTheMap.remove(guided);
		}

		if (isThereMissionMarkers) {
			markersOnTheMap.removeAll(missionMarkerInfos);
		}

		mMapFragment.removeMarkers(markersOnTheMap);
	}

	if (isHomeValid) {
		mMapFragment.updateMarker(home);
	}

	if (isGuidedVisible) {
		mMapFragment.updateMarker(guided);
	}

	if (isThereMissionMarkers) {
		mMapFragment.updateMarkers(missionMarkerInfos, isMissionDraggable());
	}

	mMapFragment.updateMissionPath(missionProxy);

	mMapFragment.updatePolygonsPaths(missionProxy.getPolygonsPath());

	mHandler.removeCallbacks(this);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:49,代码来源:DroneMap.java

示例13: onMarkerDragStart

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragStart(MarkerInfo markerInfo) {
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:4,代码来源:FlightMapFragment.java

示例14: onMarkerDrag

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDrag(MarkerInfo markerInfo) {
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:4,代码来源:FlightMapFragment.java

示例15: onMarkerDragEnd

import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragEnd(MarkerInfo markerInfo) {
	drone.sendGuidedPoint(markerInfo.getPosition(), false);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:5,代码来源:FlightMapFragment.java


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