Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/// <reference types="jquery" />
/// <reference types="jqueryui" />
/**
* Created by gavorhes on 11/3/2015.
*/
import MapInteractionBase from './mapInteractionBase';
import ol = require('custom-ol');
import { LayerBaseVector } from "../layers/LayerBaseVector";
import LayerEsriMapServer from "../layers/LayerEsriMapServer";
export interface popupChangedFunction {
($popContent: JQuery): any;
}
/**
*
*/
export interface popupCallback {
/**
* Callback function for the popup
* @param featureProperties
* @param jqRef
*/
(featureProperties: Object, jqRef?: JQuery): string | boolean;
}
export declare class FeatureLayerProperties {
feature: ol.Feature;
layer: LayerBaseVector | LayerEsriMapServer;
layerIndex: number;
selectionLayer: ol.layer.Vector;
popupContent: string;
esriLayerName: string;
/**
*
* @param feature the feature
* @param layer - the layer in the popup
* @param layerIndex - index of the layer
* @param selectionLayer - the ol selection layer
* @param [esriLayerName=undefined] - esri layer name
*/
constructor(feature: ol.Feature, layer: LayerBaseVector | LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string);
readonly layerName: string;
}
/**
* map popup class
* @augments MapInteractionBase
*/
export declare class MapPopupCls extends MapInteractionBase {
private _popupOpen;
private _passThroughLayerFeatureArray;
private _currentPopupIndex;
private _popupContentLength;
private _esriMapServiceLayers;
private _$popupCloser;
private _$popupContent;
private _$popupContainer;
private _popupOverlay;
private _arrPopupLayers;
private _popupCoordinate;
private _popupChangedFunctions;
private _mapClickFunctions;
private _selectionLayerLookup;
private _arrPopupLayerIds;
private _arrPopupContentFunction;
private _selectionLayers;
/**
* Definition for openlayers style function
* @callback olStyleFunction
* ¶m feature the openlayers vector feature
* $param
*/
/**
* map popup constructor
*/
constructor();
/**
* map popup initialization
* @param {ol.Map} theMap - the ol map
*/
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/**
* helper to select features
* @private
*/
_triggerFeatSelect(): void;
/**
*
* @param feature - the ol feature
* @param {LayerEsriMapServer} lyr - the map server layer
* @param {string} popupContent - popup content
* @param {string} esriName - esri layer name
*/
addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string): void;
/**
*
* @param pixel - the ol pixel
* @returns feature layer properties
* @private
*/
_featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties>;
closePopup(): boolean;
/**
*
* @param chgFunction - popup change function
*/
addPopupChangedFunction(chgFunction: popupChangedFunction): void;
/**
*
* @param {LayerBase|*} lyr - the layer being acted on
* @param {object} [selectionStyle={}] the selection style configuration
* @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color
* @param {number} [selectionStyle.width=10] the selection width for linear features
* @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function
* @returns the new selection layer
* @private
*/
_addPopupLayer(lyr: LayerBaseVector | LayerEsriMapServer, selectionStyle: {
color?: string;
width?: number;
olStyle?: ol.style.Style;
}): ol.layer.Vector;
/**
* Add popup to the map
* @param {LayerBase|*} lyr The layer that the popup with act on
* @param {popupCallback} popupContentFunction - popup content function that makes popup info
* @param {object} [selectionStyle={}] the selection style configuration
* @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color
* @param {number} [selectionStyle.width=10] the selection width for linear features
* @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function
* @returns {object} a reference to the ol selection layer
*/
addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback, selectionStyle?: {
color?: string;
width?: number;
olStyle?: ol.style.Style;
}): ol.layer.Vector;
/**
*
* @param {LayerBase} lyr - layer
*/
removeVectorPopup(lyr: LayerBaseVector): void;
/**
*
* @param {LayerEsriMapServer} lyr - map server layer
* @param {object} [selectionStyle={}] the selection style configuration
* @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color
* @param {number} [selectionStyle.width=10] the selection width for linear features
* @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function
* @returns {object} a reference to the ol selection layer
*/
addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style | Array<ol.style.Style> | ol.StyleFunction): ol.layer.Vector;
clearSelection(): void;
/**
* Add a function to be called when the map is clicked but before any popups are implemented
* @param {function} func - the map click function
*/
addMapClickFunction(func: Function): void;
}
export default MapPopupCls;