private void OnLableValueChanged(string lable, object value) { CommandChangeState c = new CommandChangeState(Global.control.Objects); switch (lable) { case "Name": marker.ToolTipText = (string)value; break; case "ToolTipMode": marker.ToolTipMode = (MarkerTooltipMode)value; break; case "Lat": case "Lng": marker.Position = property.LocalPosition; PointsArray[0] = property.LocalPosition; break; case "MarkerType": MARKER_TYPE markerType = (MARKER_TYPE)value; if (markerType == MARKER_TYPE.Green) { property.ImageFile = @"image\marker_0.ico"; } else if (markerType == MARKER_TYPE.Yellow) { property.ImageFile = @"image\marker_2.ico"; } else if (markerType == MARKER_TYPE.Red) { property.ImageFile = @"image\marker_1.ico"; } else if (markerType == MARKER_TYPE.Gray) { property.ImageFile = @"image\marker_3.ico"; } marker.SetBitmap(new Bitmap(AppDomain.CurrentDomain.BaseDirectory + property.ImageFile)); this.NotifyImageChanged(this, new EventArgs()); break; } Global.control.UpdateMarkerLocalPosition(marker); Global.control.PropertyChanged(property); Global.control.Refresh(); }
public DrawMarker(long pid, int x, int y, int zoom, TOOL_TYPE type, MARKER_TYPE markerType) : base() { PointLatLng latlng = Global.control.FromLocalToLatLng(x, y); PointsArray.Add(latlng); property = new PropertyMarker(); property.DefaultZoom = zoom; property.LocalPosition = latlng; property.Type = type; property.MarkerType = markerType; if (type == TOOL_TYPE.camera) { property.ImageFile = @"image\camera_0.ico"; } else if (type == TOOL_TYPE.model) { property.ImageFile = @"image\model.ico"; } else if (type == TOOL_TYPE.marker) { if (markerType == MARKER_TYPE.Green) { property.ImageFile = @"image\marker_0.ico"; } else if (markerType == MARKER_TYPE.Yellow) { property.ImageFile = @"image\marker_2.ico"; } else if (markerType == MARKER_TYPE.Red) { property.ImageFile = @"image\marker_1.ico"; } else if (markerType == MARKER_TYPE.Gray) { property.ImageFile = @"image\marker_3.ico"; } } }
/// <summary> /// Adds a quad polygon to the globe on specified location and with custom size. /// </summary> /// <param name="type">Polygon type.</param> /// <param name="position">Sphere coordinates of the center of the quad.</param> /// <param name="size">size of quad measured in differences of latitude/longitudes.</param> /// <param name="color">Color</param> public GameObject AddMarker(MARKER_TYPE type, Vector3 sphereLocation1, Vector3 sphereLocation2, Color fillColor, Color borderColor, float borderWidth) { return(mAddMarkerQuad(type, sphereLocation1, sphereLocation2, fillColor, borderColor, borderWidth)); }
/// <summary> /// Adds a custom circle polygon to the globe on specified location and with custom size in km. /// </summary> /// <param name="type">Polygon type.</param> /// <param name="sphereLocation">Sphere location.</param> /// <param name="kmRadius">Radius in KM.</param> /// <param name="ringWidthStart">Ring inner limit (0..1). Pass 0 to draw a full circle.</param> /// <param name="ringWidthEnd">Ring outer limit (0..1). Pass 1 to draw a full circle.</param> /// <param name="color">Color</param> public GameObject AddMarker(MARKER_TYPE type, Vector3 sphereLocation, float kmRadius, float ringWidthStart, float ringWidthEnd, Color color) { return(mAddMarkerCircle(type, sphereLocation, kmRadius, ringWidthStart, ringWidthEnd, color)); }