vue-cesium
Version:
Vue 3.x components for CesiumJS.
623 lines (622 loc) • 25.1 kB
TypeScript
import { VcPickEvent, VcCartesian2, VcColor, VcComponentInternalInstance, VcDistanceDisplayCondition, VcNearFarScalar, VcPosition, VcReadyObject, VcComponentPublicInstance } from 'vue-cesium/es/utils/types';
export declare const labelProps: {
enableMouseEvent: {
type: BooleanConstructor;
default: boolean;
};
verticalOrigin: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
translucencyByDistance: {
type: import("vue").PropType<VcNearFarScalar>; /**
* Specifies whether to respond to mouse pick events.
* Default Value: true
*/
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
totalScale: {
type: NumberConstructor;
default: number;
};
text: import("vue").PropType<string | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
labelStyle: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
showBackground: {
type: (ObjectConstructor | FunctionConstructor | BooleanConstructor)[];
default: boolean;
};
show: {
type: import("vue").PropType<boolean>;
default: boolean;
};
scaleByDistance: {
type: import("vue").PropType<VcNearFarScalar>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
scale: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
position: {
type: import("vue").PropType<VcPosition>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian3;
deep: boolean;
};
};
pixelOffsetScaleByDistance: {
type: import("vue").PropType<VcNearFarScalar>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
pixelOffset: {
type: import("vue").PropType<VcCartesian2>;
default: () => {
x: number;
y: number;
};
validator: (v: any) => boolean;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian2;
};
};
outlineWidth: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
outlineColor: {
type: import("vue").PropType<VcColor>;
default: string;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
id: import("vue").PropType<any>;
horizontalOrigin: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
heightReference: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
};
font: {
type: import("vue").PropType<string | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: string;
};
fillColor: {
type: import("vue").PropType<VcColor>;
default: string;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
eyeOffset: {
type: import("vue").PropType<VcPosition>;
default: () => {
x: number;
y: number;
z: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian3;
};
};
distanceDisplayCondition: {
type: import("vue").PropType<VcDistanceDisplayCondition>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeDistanceDisplayCondition;
};
};
disableDepthTestDistance: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
backgroundPadding: {
type: import("vue").PropType<VcCartesian2>;
default: () => {
x: number;
y: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian2;
};
};
backgroundColor: {
type: import("vue").PropType<VcColor>;
default: () => {
x: number;
y: number;
z: number;
w: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
};
declare const _default: import("vue").DefineComponent<{
enableMouseEvent: {
type: BooleanConstructor;
default: boolean;
};
verticalOrigin: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
translucencyByDistance: {
type: import("vue").PropType<VcNearFarScalar>; /**
* Specifies whether to respond to mouse pick events.
* Default Value: true
*/
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
totalScale: {
type: NumberConstructor;
default: number;
};
text: import("vue").PropType<string | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
labelStyle: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
showBackground: {
type: (ObjectConstructor | FunctionConstructor | BooleanConstructor)[];
default: boolean;
};
show: {
type: import("vue").PropType<boolean>;
default: boolean;
};
scaleByDistance: {
type: import("vue").PropType<VcNearFarScalar>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
scale: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
position: {
type: import("vue").PropType<VcPosition>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian3;
deep: boolean;
};
};
pixelOffsetScaleByDistance: {
type: import("vue").PropType<VcNearFarScalar>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
pixelOffset: {
type: import("vue").PropType<VcCartesian2>;
default: () => {
x: number;
y: number;
};
validator: (v: any) => boolean;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian2;
};
};
outlineWidth: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
outlineColor: {
type: import("vue").PropType<VcColor>;
default: string;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
id: import("vue").PropType<any>;
horizontalOrigin: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
heightReference: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
};
font: {
type: import("vue").PropType<string | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: string;
};
fillColor: {
type: import("vue").PropType<VcColor>;
default: string;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
eyeOffset: {
type: import("vue").PropType<VcPosition>;
default: () => {
x: number;
y: number;
z: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian3;
};
};
distanceDisplayCondition: {
type: import("vue").PropType<VcDistanceDisplayCondition>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeDistanceDisplayCondition;
};
};
disableDepthTestDistance: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
backgroundPadding: {
type: import("vue").PropType<VcCartesian2>;
default: () => {
x: number;
y: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian2;
};
};
backgroundColor: {
type: import("vue").PropType<VcColor>;
default: () => {
x: number;
y: number;
z: number;
w: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
mousedown: (evt: VcPickEvent) => boolean;
mouseup: (evt: VcPickEvent) => boolean;
click: (evt: VcPickEvent) => boolean;
clickout: (evt: VcPickEvent) => boolean;
dblclick: (evt: VcPickEvent) => boolean;
mousemove: (evt: VcPickEvent) => boolean;
mouseover: (evt: VcPickEvent) => boolean;
mouseout: (evt: VcPickEvent) => boolean;
beforeLoad: (instance: VcComponentInternalInstance) => boolean;
ready: (readyObj: VcReadyObject) => boolean;
unready: (e: any) => boolean;
destroyed: (instance: VcComponentInternalInstance) => boolean;
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
enableMouseEvent: {
type: BooleanConstructor;
default: boolean;
};
verticalOrigin: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
translucencyByDistance: {
type: import("vue").PropType<VcNearFarScalar>; /**
* Specifies whether to respond to mouse pick events.
* Default Value: true
*/
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
totalScale: {
type: NumberConstructor;
default: number;
};
text: import("vue").PropType<string | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
labelStyle: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
showBackground: {
type: (ObjectConstructor | FunctionConstructor | BooleanConstructor)[];
default: boolean;
};
show: {
type: import("vue").PropType<boolean>;
default: boolean;
};
scaleByDistance: {
type: import("vue").PropType<VcNearFarScalar>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
scale: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
position: {
type: import("vue").PropType<VcPosition>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian3;
deep: boolean;
};
};
pixelOffsetScaleByDistance: {
type: import("vue").PropType<VcNearFarScalar>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeNearFarScalar;
};
};
pixelOffset: {
type: import("vue").PropType<VcCartesian2>;
default: () => {
x: number;
y: number;
};
validator: (v: any) => boolean;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian2;
};
};
outlineWidth: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
outlineColor: {
type: import("vue").PropType<VcColor>;
default: string;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
id: import("vue").PropType<any>;
horizontalOrigin: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: number;
};
heightReference: {
type: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
};
font: {
type: import("vue").PropType<string | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
default: string;
};
fillColor: {
type: import("vue").PropType<VcColor>;
default: string;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
eyeOffset: {
type: import("vue").PropType<VcPosition>;
default: () => {
x: number;
y: number;
z: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian3;
};
};
distanceDisplayCondition: {
type: import("vue").PropType<VcDistanceDisplayCondition>;
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeDistanceDisplayCondition;
};
};
disableDepthTestDistance: import("vue").PropType<number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>>;
backgroundPadding: {
type: import("vue").PropType<VcCartesian2>;
default: () => {
x: number;
y: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeCartesian2;
};
};
backgroundColor: {
type: import("vue").PropType<VcColor>;
default: () => {
x: number;
y: number;
z: number;
w: number;
};
watcherOptions: {
cesiumObjectBuilder: typeof import("../../../utils/cesium-helpers").makeColor;
};
};
}>> & {
onBeforeLoad?: (instance: VcComponentInternalInstance) => any;
onReady?: (readyObj: VcReadyObject) => any;
onUnready?: (e: any) => any;
onDestroyed?: (instance: VcComponentInternalInstance) => any;
onMousedown?: (evt: VcPickEvent) => any;
onMouseup?: (evt: VcPickEvent) => any;
onClick?: (evt: VcPickEvent) => any;
onClickout?: (evt: VcPickEvent) => any;
onDblclick?: (evt: VcPickEvent) => any;
onMousemove?: (evt: VcPickEvent) => any;
onMouseover?: (evt: VcPickEvent) => any;
onMouseout?: (evt: VcPickEvent) => any;
}, {
show: boolean;
outlineColor: VcColor;
outlineWidth: number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>;
enableMouseEvent: boolean;
labelStyle: number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>;
backgroundColor: VcColor;
scale: number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>;
font: string | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>;
verticalOrigin: number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>;
horizontalOrigin: number | Cesium.CallbackProperty | import("vue-cesium/es/utils/types").VcCallbackPropertyFunction<number>;
eyeOffset: VcPosition;
pixelOffset: VcCartesian2;
fillColor: VcColor;
backgroundPadding: VcCartesian2;
showBackground: boolean | Function | Record<string, any>;
totalScale: number;
}>;
export default _default;
export type VcLabelProps = {
/**
* Specify the background color of this label.
* Default value: { x: 0.165, y: 0.165, z: 0.165, w: 0.8 }
*/
backgroundColor?: VcColor;
/**
* Specify the background padding, in pixels, of this label. The x value controls horizontal padding, and the y value controls vertical padding.
* Default value: { x: 7, y: 5 }
*/
backgroundPadding?: VcCartesian2;
/**
* Specify the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain. When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
*/
disableDepthTestDistance?: number;
/**
* Specify the condition specifying at what distance from the camera that this label will be displayed.
*/
distanceDisplayCondition?: VcDistanceDisplayCondition;
/**
* Specify the 3D VcPosition offset applied to this label in eye coordinates. Eye coordinates is a left-handed coordinate system, where x points towards the viewer's right, y points up, and z points into the screen. Eye coordinates use the same scale as world and model coordinates, which is typically meters.
* Default value: { x: 0, y: 0, z: 0 }
*/
eyeOffset?: VcPosition;
/**
* Specify the fill color of this label.
* Default value: white
*/
fillColor?: VcColor;
/**
* Specify the font used to draw this label. Fonts are specified using the same syntax as the CSS 'font' property.
* Default value: 30px sans-serif
*/
font?: string;
/**
* Specify the height reference of this label.
*/
heightReference?: number;
/**
* Specify the horizontal origin of this label, which determines if the label is drawn to the left, center, or right of its anchor position.
*/
horizontalOrigin?: number;
/**
* Specify the user-defined value returned when the label is picked.
*/
id?: any;
/**
* Specify the outline color of this label.
* Default value: black
*/
outlineColor?: VcColor;
/**
* Specify the outline width of this label.
* Default value: 1.0
*/
outlineWidth?: number;
/**
* Specify the pixel offset in screen space from the origin of this label. This is commonly used to align multiple labels and billboards at the same position, e.g., an image and text. The screen space origin is the top, left corner of the canvas; x increases from left to right, and y increases from top to bottom.
*/
pixelOffset?: VcCartesian2;
/**
* Specify near and far pixel offset scaling properties of a Label based on the Label's distance from the camera. A label's pixel offset will be scaled between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the label's pixel offset scaling remains clamped to the nearest bound. If undefined, pixelOffsetScaleByDistance will be disabled.
*/
pixelOffsetScaleByDistance?: VcNearFarScalar;
/**
* Specify the VcPosition of this label.
*/
position?: VcPosition;
/**
* Specify the uniform scale that is multiplied with the label's size in pixels. A scale of 1.0 does not change the size of the label; a scale greater than 1.0 enlarges the label; a positive scale less than 1.0 shrinks the label.
*/
scale?: number;
/**
* Specify near and far scaling properties of a Label based on the label's distance from the camera. A label's scale will interpolate between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the label's scale remains clamped to the nearest bound. If undefined, scaleByDistance will be disabled.
*/
scaleByDistance?: VcNearFarScalar;
/**
* Determines if this label will be shown. Use this to hide or show a label, instead of removing it and re-adding it to the collection.
*/
show?: boolean;
/**
* Determines if a background behind this label will be shown.
* Default value: false
*/
showBackground?: boolean;
/**
* Specify the style of this label.
*/
labelStyle?: number;
/**
* Specify the text of this label.
*/
text?: string;
/**
* Specify near and far translucency properties of a Label based on the Label's distance from the camera. A label's translucency will interpolate between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the label's translucency remains clamped to the nearest bound. If undefined, translucencyByDistance will be disabled.
*/
translucencyByDistance?: VcNearFarScalar;
/**
* Specify the vertical origin of this label, which determines if the label is to the above, below, or at the center of its anchor position.
*/
verticalOrigin?: number;
/**
* Specifies whether to respond to mouse pick events.
* Default Value: true
*/
enableMouseEvent?: boolean;
/**
* Triggers before the label is loaded.
*/
onBeforeLoad?: (instance: VcComponentInternalInstance) => void;
/**
* Triggers when the label is successfully loaded.
*/
onReady?: (readyObject: VcReadyObject) => void;
/**
* Triggers when the component load failed.
*/
onUnready?: (e: any) => void;
/**
* Triggers when the label is destroyed.
*/
onDestroyed?: (instance: VcComponentInternalInstance) => void;
/**
* Triggers when the mouse is pressed on this label.
*/
onMousedown?: (evt: VcPickEvent) => void;
/**
* Triggers when the mouse bounces up on this label.
*/
onMouseup?: (evt: VcPickEvent) => void;
/**
* Triggers when the mouse clicks on this label.
*/
onClick?: (evt: VcPickEvent) => void;
/**
* Triggers when the mouse clicks outside this label.
*/
onClickout?: (evt: VcPickEvent) => void;
/**
* Triggers when the left mouse button double-clicks this label.
*/
onDblclick?: (evt: VcPickEvent) => void;
/**
* Triggers when the mouse moves on this label.
*/
onMousemove?: (evt: VcPickEvent) => void;
/**
* Triggers when the mouse moves over to this label.
*/
onMouseover?: (evt: VcPickEvent) => void;
/**
* Triggers when the mouse moves out of this label.
*/
onMouseout?: (evt: VcPickEvent) => void;
};
export type VcLabelRef = VcComponentPublicInstance<VcLabelProps>;