本文整理汇总了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);
}
}
示例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);
}
示例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);
}
}
示例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());
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例9: onMarkerDrag
import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDrag(MarkerInfo markerInfo) {
checkForWaypointMarkerMoving(markerInfo);
}
示例10: onMarkerDragStart
import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragStart(MarkerInfo markerInfo) {
checkForWaypointMarkerMoving(markerInfo);
}
示例11: onMarkerDragEnd
import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragEnd(MarkerInfo markerInfo) {
checkForWaypointMarker(markerInfo);
}
示例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);
}
示例13: onMarkerDragStart
import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragStart(MarkerInfo markerInfo) {
}
示例14: onMarkerDrag
import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDrag(MarkerInfo markerInfo) {
}
示例15: onMarkerDragEnd
import com.playuav.android.maps.MarkerInfo; //导入依赖的package包/类
@Override
public void onMarkerDragEnd(MarkerInfo markerInfo) {
drone.sendGuidedPoint(markerInfo.getPosition(), false);
}