geojs 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/geo.js +90 -22
- package/geo.lean.js +90 -22
- package/geo.lean.min.js +1 -1
- package/geo.min.js +1 -1
- package/package.json +1 -1
- package/src/annotation/annotation.js +3 -0
- package/src/map.js +50 -12
- package/src/osmLayer.js +1 -1
- package/src/pixelmapLayer.js +1 -1
- package/src/tileLayer.js +3 -2
- package/src/util/color.js +1 -0
- package/src/util/common.js +2 -1
- package/src/util/mesh.js +1 -0
- package/src/util/polyops.js +8 -0
- package/src/webgl/layer.js +5 -0
- package/src/webgl/lookupTable2D.js +1 -0
- package/src/webgl/pointUtil.js +1 -0
- package/src/webgl/tileLayer.js +8 -0
package/package.json
CHANGED
|
@@ -1252,6 +1252,7 @@ var annotation = function (type, args) {
|
|
|
1252
1252
|
/**
|
|
1253
1253
|
* Return actions needed for the specified state of this annotation.
|
|
1254
1254
|
*
|
|
1255
|
+
* @private
|
|
1255
1256
|
* @param {object} m_this The current annotation instance.
|
|
1256
1257
|
* @param {function} s_actions The parent actions method.
|
|
1257
1258
|
* @param {string|undefined} state The state to return actions for. Defaults
|
|
@@ -1285,6 +1286,7 @@ function continuousVerticesActions(m_this, s_actions, state, name, originalArgs)
|
|
|
1285
1286
|
/**
|
|
1286
1287
|
* Process actions to allow drawing continuous vertices for an annotation.
|
|
1287
1288
|
*
|
|
1289
|
+
* @private
|
|
1288
1290
|
* @param {object} m_this The current annotation instance.
|
|
1289
1291
|
* @param {geo.event} evt The action event.
|
|
1290
1292
|
* @param {string} name The name of this annotation.
|
|
@@ -1346,6 +1348,7 @@ function continuousVerticesProcessAction(m_this, evt, name) {
|
|
|
1346
1348
|
* that the aspect ratio of a rectangle-like selection is a specific value or
|
|
1347
1349
|
* range of values.
|
|
1348
1350
|
*
|
|
1351
|
+
* @private
|
|
1349
1352
|
* @param {number|number[]|geo.geoSize|geo.geoSize[]} ratio Either a single
|
|
1350
1353
|
* aspect ratio, a single size, or a list of allowed aspect ratios and sizes.
|
|
1351
1354
|
* For instance, 1 will require that the selection square, 2 would require
|
package/src/map.js
CHANGED
|
@@ -409,11 +409,13 @@ var map = function (arg) {
|
|
|
409
409
|
* option when determining the new view.
|
|
410
410
|
* @param {boolean} [ignoreClampBounds] If `true`, ignore the clampBounds
|
|
411
411
|
* option when determining the new view.
|
|
412
|
+
* @param {boolean} [noTrigger] If truthy, do not trigger a pan or zoom
|
|
413
|
+
* event. If 'pan', only trigger the zoom event.
|
|
412
414
|
* @returns {number|this}
|
|
413
415
|
* @fires geo.event.zoom
|
|
414
416
|
* @fires geo.event.pan
|
|
415
417
|
*/
|
|
416
|
-
this.zoom = function (val, origin, ignoreDiscreteZoom, ignoreClampBounds) {
|
|
418
|
+
this.zoom = function (val, origin, ignoreDiscreteZoom, ignoreClampBounds, noTrigger) {
|
|
417
419
|
if (val === undefined) {
|
|
418
420
|
return m_zoom;
|
|
419
421
|
}
|
|
@@ -442,19 +444,49 @@ var map = function (arg) {
|
|
|
442
444
|
zoomLevel: m_zoom,
|
|
443
445
|
screenPosition: origin ? origin.map : undefined
|
|
444
446
|
};
|
|
445
|
-
|
|
447
|
+
if (!noTrigger || noTrigger === 'pan') {
|
|
448
|
+
m_this.geoTrigger(geo_event.zoom, evt);
|
|
449
|
+
}
|
|
446
450
|
|
|
447
451
|
if (aroundPoint) {
|
|
448
452
|
var shifted = m_this.gcsToDisplay(origin.mapgcs || origin.geo,
|
|
449
453
|
origin.mapgcs ? null : undefined);
|
|
450
454
|
m_this.pan({x: origin.map.x - shifted.x, y: origin.map.y - shifted.y},
|
|
451
|
-
ignoreDiscreteZoom, true);
|
|
455
|
+
ignoreDiscreteZoom, true, noTrigger);
|
|
452
456
|
} else {
|
|
453
|
-
m_this.pan({x: 0, y: 0}, ignoreDiscreteZoom, ignoreClampBounds);
|
|
457
|
+
m_this.pan({x: 0, y: 0}, ignoreDiscreteZoom, ignoreClampBounds, noTrigger);
|
|
454
458
|
}
|
|
455
459
|
return m_this;
|
|
456
460
|
};
|
|
457
461
|
|
|
462
|
+
/**
|
|
463
|
+
* Set zoom level and center of the map.
|
|
464
|
+
*
|
|
465
|
+
* @param {number} zoom The new zoom level to set.
|
|
466
|
+
* @param {geo.geoPosition} center The new center of the
|
|
467
|
+
* @param {string|geo.transform|null} [gcs] `undefined` to use the interface
|
|
468
|
+
* gcs, `null` to use the map gcs, or any other transform. The center is
|
|
469
|
+
* converted from this gcs to the map projection.
|
|
470
|
+
* @param {geo.geoPosition} origin.geo The gcs coordinates of the zoom
|
|
471
|
+
* center.
|
|
472
|
+
* @param {geo.screenPosition} origin.map The display coordinates of the zoom
|
|
473
|
+
* center.
|
|
474
|
+
* @param {boolean} [ignoreDiscreteZoom] If `true`, ignore the discreteZoom
|
|
475
|
+
* option when determining the new view.
|
|
476
|
+
* @param {boolean} [ignoreClampBounds] If `true`, ignore the clampBounds
|
|
477
|
+
* option when determining the new view.
|
|
478
|
+
* @param {boolean} [noTrigger] If truthy, do not trigger a pan or zoom
|
|
479
|
+
* event.
|
|
480
|
+
* @returns {this}
|
|
481
|
+
* @fires geo.event.zoom
|
|
482
|
+
* @fires geo.event.pan
|
|
483
|
+
*/
|
|
484
|
+
this.zoomAndCenter = function (zoom, center, gcs, ignoreDiscreteZoom, ignoreClampBounds, noTrigger) {
|
|
485
|
+
this.zoom(zoom, undefined, ignoreDiscreteZoom, ignoreClampBounds, noTrigger || 'pan');
|
|
486
|
+
this.center(center, gcs, ignoreDiscreteZoom, ignoreClampBounds, noTrigger);
|
|
487
|
+
return this;
|
|
488
|
+
};
|
|
489
|
+
|
|
458
490
|
/**
|
|
459
491
|
* Pan the map by a number of display pixels.
|
|
460
492
|
*
|
|
@@ -468,10 +500,11 @@ var map = function (arg) {
|
|
|
468
500
|
* view. When `'limited'`, the `clampBoundsX` and `clampBoundsY` options
|
|
469
501
|
* are selectively enforced so that the map will not end up more out of
|
|
470
502
|
* bounds than its current state.
|
|
503
|
+
* @param {boolean} [noTrigger] If truthy, do not trigger a pan event.
|
|
471
504
|
* @returns {this}
|
|
472
505
|
* @fires geo.event.pan
|
|
473
506
|
*/
|
|
474
|
-
this.pan = function (delta, ignoreDiscreteZoom, ignoreClampBounds) {
|
|
507
|
+
this.pan = function (delta, ignoreDiscreteZoom, ignoreClampBounds, noTrigger) {
|
|
475
508
|
var evt = {
|
|
476
509
|
screenDelta: delta
|
|
477
510
|
};
|
|
@@ -510,7 +543,9 @@ var map = function (arg) {
|
|
|
510
543
|
y: m_height / 2
|
|
511
544
|
});
|
|
512
545
|
|
|
513
|
-
|
|
546
|
+
if (!noTrigger) {
|
|
547
|
+
m_this.geoTrigger(geo_event.pan, evt);
|
|
548
|
+
}
|
|
514
549
|
|
|
515
550
|
m_this.modified();
|
|
516
551
|
return m_this;
|
|
@@ -575,7 +610,7 @@ var map = function (arg) {
|
|
|
575
610
|
/**
|
|
576
611
|
* Get or set the center of the map in the given geographic coordinates.
|
|
577
612
|
*
|
|
578
|
-
* @param {geo.geoPosition} coordinates If specified, the new center of the
|
|
613
|
+
* @param {geo.geoPosition} [coordinates] If specified, the new center of the
|
|
579
614
|
* map.
|
|
580
615
|
* @param {string|geo.transform|null} [gcs] `undefined` to use the interface
|
|
581
616
|
* gcs, `null` to use the map gcs, or any other transform. If setting the
|
|
@@ -588,10 +623,11 @@ var map = function (arg) {
|
|
|
588
623
|
* view. When `'limited'`, the `clampBoundsX` and `clampBoundsY` options
|
|
589
624
|
* are selectively enforced so that the map will not end up more out of
|
|
590
625
|
* bounds than its current state.
|
|
626
|
+
* @param {boolean} [noTrigger] If truthy, do not trigger a pan event.
|
|
591
627
|
* @returns {geo.geoPosition|this}
|
|
592
628
|
* @fires geo.event.pan
|
|
593
629
|
*/
|
|
594
|
-
this.center = function (coordinates, gcs, ignoreDiscreteZoom, ignoreClampBounds) {
|
|
630
|
+
this.center = function (coordinates, gcs, ignoreDiscreteZoom, ignoreClampBounds, noTrigger) {
|
|
595
631
|
var center;
|
|
596
632
|
if (coordinates === undefined) {
|
|
597
633
|
center = Object.assign({}, m_this.worldToGcs(m_center, gcs));
|
|
@@ -606,9 +642,11 @@ var map = function (arg) {
|
|
|
606
642
|
ignoreClampBounds), m_rotation);
|
|
607
643
|
m_this.modified();
|
|
608
644
|
// trigger a pan event
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
645
|
+
if (!noTrigger) {
|
|
646
|
+
m_this.geoTrigger(geo_event.pan, {
|
|
647
|
+
screenDelta: {x: 0, y: 0}
|
|
648
|
+
});
|
|
649
|
+
}
|
|
612
650
|
return m_this;
|
|
613
651
|
};
|
|
614
652
|
|
|
@@ -1383,7 +1421,7 @@ var map = function (arg) {
|
|
|
1383
1421
|
|
|
1384
1422
|
// This might have consequences in terms of bounds/zoom clamping.
|
|
1385
1423
|
// What behavior do we expect from this method in that case?
|
|
1386
|
-
m_this.zoom(nav.zoom);
|
|
1424
|
+
m_this.zoom(nav.zoom, undefined, undefined, undefined, 'pan');
|
|
1387
1425
|
m_this.center(nav.center, null);
|
|
1388
1426
|
}
|
|
1389
1427
|
|
package/src/osmLayer.js
CHANGED
|
@@ -79,7 +79,7 @@ var osmLayer = function (arg) {
|
|
|
79
79
|
overlap: m_this._options.tileOverlap,
|
|
80
80
|
scale: m_this._options.tileScale,
|
|
81
81
|
url: m_this._options.url.call(
|
|
82
|
-
m_this, urlParams.x, urlParams.y, urlParams.level || 0,
|
|
82
|
+
m_this, urlParams.x, urlParams.y, Math.max(urlParams.level || 0, 0),
|
|
83
83
|
m_this._options.subdomains),
|
|
84
84
|
crossDomain: m_this._options.crossDomain
|
|
85
85
|
});
|
package/src/pixelmapLayer.js
CHANGED
|
@@ -81,7 +81,7 @@ var pixelmapLayer = function (arg) {
|
|
|
81
81
|
overlap: m_this._options.tileOverlap,
|
|
82
82
|
scale: m_this._options.tileScale,
|
|
83
83
|
url: m_this._options.url.call(
|
|
84
|
-
m_this, urlParams.x, urlParams.y, urlParams.level || 0,
|
|
84
|
+
m_this, urlParams.x, urlParams.y, Math.max(urlParams.level || 0, 0),
|
|
85
85
|
m_this._options.subdomains),
|
|
86
86
|
crossDomain: m_this._options.crossDomain
|
|
87
87
|
});
|
package/src/tileLayer.js
CHANGED
|
@@ -102,6 +102,7 @@ function modulo(a, b) {
|
|
|
102
102
|
/**
|
|
103
103
|
* Pick a subdomain from a list of subdomains based on a the tile location.
|
|
104
104
|
*
|
|
105
|
+
* @private
|
|
105
106
|
* @param {number} x The x tile coordinate.
|
|
106
107
|
* @param {number} y The y tile coordinate.
|
|
107
108
|
* @param {number} z The tile layer.
|
|
@@ -121,9 +122,9 @@ function m_getTileSubdomain(x, y, z, subdomains) {
|
|
|
121
122
|
* all equivalent. The comma-separated list can have subdomains that are of
|
|
122
123
|
* any length; the string and range both use one-character subdomains.
|
|
123
124
|
*
|
|
125
|
+
* @private
|
|
124
126
|
* @param {string} base The tile format string
|
|
125
127
|
* @returns {function} A conversion function.
|
|
126
|
-
* @private.
|
|
127
128
|
*/
|
|
128
129
|
function m_tileUrlFromTemplate(base) {
|
|
129
130
|
var xPattern = /\$?\{[xX]\}/g,
|
|
@@ -600,7 +601,7 @@ var tileLayer = function (arg) {
|
|
|
600
601
|
size: {x: m_this._options.tileWidth, y: m_this._options.tileHeight},
|
|
601
602
|
queue: m_this._queue,
|
|
602
603
|
url: m_this._options.url.call(
|
|
603
|
-
m_this, urlParams.x, urlParams.y, urlParams.level || 0,
|
|
604
|
+
m_this, urlParams.x, urlParams.y, Math.max(urlParams.level || 0, 0),
|
|
604
605
|
m_this._options.subdomains)
|
|
605
606
|
});
|
|
606
607
|
};
|
package/src/util/color.js
CHANGED
|
@@ -76,6 +76,7 @@ var m_memoizeConvertColor = {maxCount: 1000, count: 0, memo: {}};
|
|
|
76
76
|
* be returned quickly. If the memoization table gets over a certain size,
|
|
77
77
|
* just reset it.
|
|
78
78
|
*
|
|
79
|
+
* @private
|
|
79
80
|
* @param {geo.geoColor} origColor The original color specification.
|
|
80
81
|
* @param {geo.geoColorObject} resultColor The result of the conversion.
|
|
81
82
|
* @returns {geo.geoColorObject} The `resultColor`.
|
package/src/util/common.js
CHANGED
|
@@ -569,6 +569,7 @@ var util = {
|
|
|
569
569
|
};
|
|
570
570
|
var layerParams = {
|
|
571
571
|
maxLevel: maxLevel,
|
|
572
|
+
minLevel: Math.min(0, maxLevel),
|
|
572
573
|
wrapX: false,
|
|
573
574
|
wrapY: false,
|
|
574
575
|
tileOffset: function () {
|
|
@@ -998,7 +999,7 @@ var util = {
|
|
|
998
999
|
* @param {object} target target object to modify.
|
|
999
1000
|
* @param {object} sources object(s) to merge into the target.
|
|
1000
1001
|
* @returns {object} The merged object.
|
|
1001
|
-
* @
|
|
1002
|
+
* @memberof geo.util
|
|
1002
1003
|
*/
|
|
1003
1004
|
deepMerge: function (target, ...sources) {
|
|
1004
1005
|
for (const source of sources) {
|
package/src/util/mesh.js
CHANGED
package/src/util/polyops.js
CHANGED
|
@@ -82,6 +82,7 @@ const AlternateOpNames = {
|
|
|
82
82
|
*
|
|
83
83
|
* @param {object[]} seglist A PolyBool segment list.
|
|
84
84
|
* @returns {geo.polygonList|undefined} A polygon list.
|
|
85
|
+
* @private
|
|
85
86
|
*/
|
|
86
87
|
function seglistToPolygonList(seglist) {
|
|
87
88
|
// This single line doesn't arrange holes correctly
|
|
@@ -157,6 +158,7 @@ function seglistToPolygonList(seglist) {
|
|
|
157
158
|
* around 0.11 mm in ground distance.
|
|
158
159
|
* @param {object} seglist A seglist array as used by the polybool library.
|
|
159
160
|
* @returns {object} A seglist array.
|
|
161
|
+
* @private
|
|
160
162
|
*/
|
|
161
163
|
function polygonOperationSeglist(op, epsilon, seglist) {
|
|
162
164
|
op = 'select' + op.charAt(0).toUpperCase() + op.slice(1);
|
|
@@ -223,6 +225,7 @@ function polygonOperationSeglist(op, epsilon, seglist) {
|
|
|
223
225
|
* @param {geo.util.polyop.spec} [opts] Options for the operation. Only used
|
|
224
226
|
* if poly is an object with a toPolygonList method.
|
|
225
227
|
* @returns {geo.polygonList} A list of polygons.
|
|
228
|
+
* @memberof geo.util.polyops
|
|
226
229
|
*/
|
|
227
230
|
function toPolygonList(poly, mode, opts) {
|
|
228
231
|
mode = mode || {};
|
|
@@ -292,6 +295,7 @@ function toPolygonList(poly, mode, opts) {
|
|
|
292
295
|
* @param {geo.util.polyop.spec} [opts] Options for the operation. Only used
|
|
293
296
|
* if ``mode.style`` is an object with a fromPolygonList method.
|
|
294
297
|
* @returns {geo.polygonAny} A polygon in one of several formats.
|
|
298
|
+
* @memberof geo.util.polyops
|
|
295
299
|
*/
|
|
296
300
|
function fromPolygonList(poly, mode, opts) {
|
|
297
301
|
if (mode.style.fromPolygonList) {
|
|
@@ -316,6 +320,7 @@ function fromPolygonList(poly, mode, opts) {
|
|
|
316
320
|
/**
|
|
317
321
|
* Use a minimum style for output to include all of the results.
|
|
318
322
|
*
|
|
323
|
+
* @private
|
|
319
324
|
* @param {geo.polygonList} polylist A list of polygons.
|
|
320
325
|
* @param {string} style the proposed style.
|
|
321
326
|
* @returns {string} The preferred style.
|
|
@@ -346,6 +351,7 @@ function minimumPolygonStyle(polylist, style) {
|
|
|
346
351
|
* Generate the correspondence between the source polygons and the output
|
|
347
352
|
* polygons. A polygon corresponds if it has at least two points in common.
|
|
348
353
|
*
|
|
354
|
+
* @private
|
|
349
355
|
* @param {geo.polygonList} poly1 First set of source polygons.
|
|
350
356
|
* @param {geo.polygonList} poly2 Second set of source polygons.
|
|
351
357
|
* @param {geo.polygonList} newpoly Output polygons.
|
|
@@ -408,6 +414,7 @@ function generateCorrespondence(poly1, poly2, newpoly, results) {
|
|
|
408
414
|
/**
|
|
409
415
|
* Perform a general operation of a set of polygons.
|
|
410
416
|
*
|
|
417
|
+
* @private
|
|
411
418
|
* @param {string} op The operation to handle. One of union, intersect,
|
|
412
419
|
* difference, or xor.
|
|
413
420
|
* @param {geo.polygonAny|geo.util.polyop.spec} poly1 Either the first polygon
|
|
@@ -483,6 +490,7 @@ function generalOperationProcess(op, poly1, poly2, opts) {
|
|
|
483
490
|
/**
|
|
484
491
|
* Generate a polygon function for a specific operation.
|
|
485
492
|
*
|
|
493
|
+
* @private
|
|
486
494
|
* @param {string} op The operation to handle. One of union, intersect,
|
|
487
495
|
* difference, or xor.
|
|
488
496
|
* @returns {function} a function for the polygons.
|
package/src/webgl/layer.js
CHANGED
|
@@ -20,6 +20,7 @@ var webgl_layer = function () {
|
|
|
20
20
|
* @param {number} [opacity] If specified, set the opacity. Otherwise,
|
|
21
21
|
* return the opacity.
|
|
22
22
|
* @returns {number|this} The current opacity or the current layer.
|
|
23
|
+
* @memberof geo.webgl.layer
|
|
23
24
|
*/
|
|
24
25
|
this.opacity = function (opacity) {
|
|
25
26
|
var result = s_opacity.apply(m_this, arguments);
|
|
@@ -36,6 +37,7 @@ var webgl_layer = function () {
|
|
|
36
37
|
* get it.
|
|
37
38
|
* @returns {boolean|this} either the visibility (if getting) or the layer
|
|
38
39
|
* (if setting).
|
|
40
|
+
* @memberof geo.webgl.layer
|
|
39
41
|
*/
|
|
40
42
|
this.visible = function (val) {
|
|
41
43
|
if (val === undefined) {
|
|
@@ -60,6 +62,7 @@ var webgl_layer = function () {
|
|
|
60
62
|
* truthy, allow other layers to have the same z-index. Otherwise,
|
|
61
63
|
* ensure that other layers have distinct z-indices from this one.
|
|
62
64
|
* @returns {number|this}
|
|
65
|
+
* @memberof geo.webgl.layer
|
|
63
66
|
*/
|
|
64
67
|
this.zIndex = function (zIndex, allowDuplicate) {
|
|
65
68
|
var result = s_zIndex.apply(m_this, arguments);
|
|
@@ -84,6 +87,7 @@ var webgl_layer = function () {
|
|
|
84
87
|
* @param {geo.webgl.webglRenderer} newRenderer The renderer to move to.
|
|
85
88
|
* @param {boolean} [rerender=false] If truthy, rerender after the switch.
|
|
86
89
|
* @returns {this}
|
|
90
|
+
* @memberof geo.webgl.layer
|
|
87
91
|
*/
|
|
88
92
|
this.switchRenderer = function (newRenderer, rerender) {
|
|
89
93
|
if (newRenderer instanceof webglRenderer && newRenderer !== m_this.renderer()) {
|
|
@@ -122,6 +126,7 @@ var webgl_layer = function () {
|
|
|
122
126
|
* Initialize after the layer is added to the map.
|
|
123
127
|
*
|
|
124
128
|
* @returns {this}
|
|
129
|
+
* @memberof geo.webgl.layer
|
|
125
130
|
*/
|
|
126
131
|
this._init = function () {
|
|
127
132
|
|
|
@@ -8,6 +8,7 @@ var vgl = require('../vgl');
|
|
|
8
8
|
* @param {vgl.renderState} renderState An object that contains the context
|
|
9
9
|
* used for drawing.
|
|
10
10
|
* @param {number} textureUnit The number of the texture unit [0-15].
|
|
11
|
+
* @private
|
|
11
12
|
*/
|
|
12
13
|
function activateTextureUnit(renderState, textureUnit) {
|
|
13
14
|
if (textureUnit >= 0 && textureUnit <= 31) {
|
package/src/webgl/pointUtil.js
CHANGED
|
@@ -6,6 +6,7 @@ var pointFeature = require('../pointFeature');
|
|
|
6
6
|
* @param {this} m_this The point-like feature.
|
|
7
7
|
* @param {object} [arg] Feature definition object that might specify the
|
|
8
8
|
* primitive shape.
|
|
9
|
+
* @memberof geo.webgl
|
|
9
10
|
*/
|
|
10
11
|
function pointUtil(m_this, arg) {
|
|
11
12
|
arg = arg || {};
|
package/src/webgl/tileLayer.js
CHANGED
|
@@ -20,6 +20,7 @@ var webgl_tileLayer = function () {
|
|
|
20
20
|
* Add a tile to the list of quads.
|
|
21
21
|
*
|
|
22
22
|
* @param {geo.tile} tile The tile to add and draw.
|
|
23
|
+
* @memberof geo.webgl.tileLayer
|
|
23
24
|
*/
|
|
24
25
|
this._drawTile = function (tile) {
|
|
25
26
|
if (!m_quadFeature) {
|
|
@@ -108,6 +109,7 @@ var webgl_tileLayer = function () {
|
|
|
108
109
|
* @param {boolean} [val] If specified, change the visibility, otherwise
|
|
109
110
|
* return it.
|
|
110
111
|
* @returns {boolean|this} The current visibility or the layer.
|
|
112
|
+
* @memberof geo.webgl.tileLayer
|
|
111
113
|
*/
|
|
112
114
|
this.visible = function (val) {
|
|
113
115
|
if (val === undefined) {
|
|
@@ -132,6 +134,7 @@ var webgl_tileLayer = function () {
|
|
|
132
134
|
* truthy, allow other layers to have the same z-index. Otherwise,
|
|
133
135
|
* ensure that other layers have distinct z-indices from this one.
|
|
134
136
|
* @returns {number|this}
|
|
137
|
+
* @memberof geo.webgl.tileLayer
|
|
135
138
|
*/
|
|
136
139
|
this.zIndex = function (zIndex, allowDuplicate) {
|
|
137
140
|
if (zIndex !== undefined) {
|
|
@@ -146,6 +149,7 @@ var webgl_tileLayer = function () {
|
|
|
146
149
|
*
|
|
147
150
|
* @param {geo.event} [evt] If specified, the layer add or remove event that
|
|
148
151
|
* triggered this. If `undefined`, clear the quads but don't redraw.
|
|
152
|
+
* @memberof geo.webgl.tileLayer
|
|
149
153
|
*/
|
|
150
154
|
this._clearQuads = function (evt) {
|
|
151
155
|
if (evt && (!evt.layer || !(evt.layer instanceof tileLayer) || !evt.layer.autoshareRenderer() || (
|
|
@@ -168,6 +172,7 @@ var webgl_tileLayer = function () {
|
|
|
168
172
|
*
|
|
169
173
|
* @param {object} request A value to pass to the parent class.
|
|
170
174
|
* @returns {this}
|
|
175
|
+
* @memberof geo.webgl.tileLayer
|
|
171
176
|
*/
|
|
172
177
|
this._update = function (request) {
|
|
173
178
|
s_update.call(m_this, request);
|
|
@@ -180,6 +185,7 @@ var webgl_tileLayer = function () {
|
|
|
180
185
|
|
|
181
186
|
/**
|
|
182
187
|
* Cleanup. This purges the texture and tile cache.
|
|
188
|
+
* @memberof geo.webgl.tileLayer
|
|
183
189
|
*/
|
|
184
190
|
this._cleanup = function () {
|
|
185
191
|
var tile;
|
|
@@ -197,6 +203,7 @@ var webgl_tileLayer = function () {
|
|
|
197
203
|
|
|
198
204
|
/**
|
|
199
205
|
* Destroy.
|
|
206
|
+
* @memberof geo.webgl.tileLayer
|
|
200
207
|
*/
|
|
201
208
|
this._exit = function () {
|
|
202
209
|
var map = m_this.map();
|
|
@@ -211,6 +218,7 @@ var webgl_tileLayer = function () {
|
|
|
211
218
|
|
|
212
219
|
/**
|
|
213
220
|
* Initialize after the layer is added to the map.
|
|
221
|
+
* @memberof geo.webgl.tileLayer
|
|
214
222
|
*/
|
|
215
223
|
this._init = function () {
|
|
216
224
|
s_init.apply(m_this, arguments);
|