geojs 1.10.0 → 1.10.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # GeoJS Change Log
2
2
 
3
+ ## Version 1.10.3
4
+
5
+ ### Performance improvements
6
+
7
+ - Reduce the time it takes to switch texture interpolation ([#1230](../../pull/1230))
8
+
9
+ ## Version 1.10.2
10
+
11
+ ### Improvements
12
+
13
+ - Directly support nearest pixel or bicubic on quad interpolation ([#1229](../../pull/1229))
14
+
15
+ ## Version 1.10.1
16
+
17
+ ### Improvements
18
+
19
+ - Make clamping at the end of a map transition optional ([#1226](../../pull/1226))
20
+
3
21
  ## Version 1.10.0
4
22
 
5
23
  ### Features
package/geo.js CHANGED
@@ -8017,6 +8017,17 @@ var canvas_quadFeature = function canvas_quadFeature(arg) {
8017
8017
 
8018
8018
  var oldAlpha = context2d.globalAlpha;
8019
8019
  var opacity = oldAlpha;
8020
+ var nearestPixel = m_this.nearestPixel();
8021
+
8022
+ if (nearestPixel !== undefined) {
8023
+ if (nearestPixel !== true && util.isNonNullFinite(nearestPixel)) {
8024
+ var curZoom = m_this.layer().map().zoom();
8025
+ nearestPixel = curZoom >= nearestPixel;
8026
+ }
8027
+
8028
+ context2d.imageSmoothingEnabled = !nearestPixel;
8029
+ }
8030
+
8020
8031
  $.each([m_quads.imgQuads, m_quads.vidQuads], function (listidx, quadlist) {
8021
8032
  if (!quadlist) {
8022
8033
  return;
@@ -8086,6 +8097,7 @@ var canvas_quadFeature = function canvas_quadFeature(arg) {
8086
8097
  }
8087
8098
 
8088
8099
  context2d.setTransform(1, 0, 0, 1, 0, 0);
8100
+ context2d.imageSmoothingEnabled = true;
8089
8101
  };
8090
8102
  /**
8091
8103
  * If this returns true, the render will be skipped and tried again on the
@@ -8543,6 +8555,7 @@ var canvas_tileLayer = function canvas_tileLayer() {
8543
8555
 
8544
8556
  this._update = function (request) {
8545
8557
  s_update.call(m_this, request);
8558
+ m_quadFeature.nearestPixel(m_this.nearestPixel());
8546
8559
 
8547
8560
  m_this._addBaseQuadToTiles(m_quadFeature, m_tiles);
8548
8561
 
@@ -16879,13 +16892,15 @@ var map = function map(arg) {
16879
16892
  * center.
16880
16893
  * @param {boolean} [ignoreDiscreteZoom] If `true`, ignore the discreteZoom
16881
16894
  * option when determining the new view.
16895
+ * @param {boolean} [ignoreClampBounds] If `true`, ignore the clampBounds
16896
+ * option when determining the new view.
16882
16897
  * @returns {number|this}
16883
16898
  * @fires geo.event.zoom
16884
16899
  * @fires geo.event.pan
16885
16900
  */
16886
16901
 
16887
16902
 
16888
- this.zoom = function (val, origin, ignoreDiscreteZoom) {
16903
+ this.zoom = function (val, origin, ignoreDiscreteZoom, ignoreClampBounds) {
16889
16904
  if (val === undefined) {
16890
16905
  return m_zoom;
16891
16906
  }
@@ -16894,10 +16909,14 @@ var map = function map(arg) {
16894
16909
  /* If we are zooming around a point, ignore the clamp bounds */
16895
16910
 
16896
16911
  var aroundPoint = origin && (origin.mapgcs || origin.geo) && origin.map;
16897
- var ignoreClampBounds = aroundPoint;
16912
+
16913
+ if (aroundPoint) {
16914
+ ignoreClampBounds = true;
16915
+ }
16898
16916
  /* The ignoreDiscreteZoom flag is intended to allow non-integer zoom values
16899
16917
  * during animation. */
16900
16918
 
16919
+
16901
16920
  val = m_this._fix_zoom(val, ignoreDiscreteZoom);
16902
16921
 
16903
16922
  if (val === m_zoom) {
@@ -16924,7 +16943,7 @@ var map = function map(arg) {
16924
16943
  m_this.pan({
16925
16944
  x: 0,
16926
16945
  y: 0
16927
- }, ignoreDiscreteZoom);
16946
+ }, ignoreDiscreteZoom, ignoreClampBounds);
16928
16947
  }
16929
16948
 
16930
16949
  return m_this;
@@ -17670,6 +17689,8 @@ var map = function map(arg) {
17670
17689
  * a value based on what canceled a transition, `transition`: the current
17671
17690
  * transition that just completed, `next`: a boolean if another transition
17672
17691
  * follows immediately.
17692
+ * @param {boolean} [opts.endClamp=true] If `false`, the last center change
17693
+ * will not clamp to the bounds and zoom values.
17673
17694
  * @param {string|geo.transform|null} [gcs] Input gcs. `undefined` to use
17674
17695
  * the interface gcs, `null` to use the map gcs, or any other transform.
17675
17696
  * Applies only to `opts.center` and to converting zoom values to height,
@@ -17779,7 +17800,8 @@ var map = function map(arg) {
17779
17800
  zCoord: opts.zCoord,
17780
17801
  done: opts.done,
17781
17802
  duration: opts.duration,
17782
- zoomOrigin: opts.zoomOrigin
17803
+ zoomOrigin: opts.zoomOrigin,
17804
+ endClamp: opts.endClamp
17783
17805
  };
17784
17806
  m_transition.interp = opts.interp([m_transition.start.center.x, m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.start.zoom) : m_transition.start.zoom, m_transition.start.rotation], [m_transition.end.center ? m_transition.end.center.x : m_transition.start.center.x, m_transition.end.center ? m_transition.end.center.y : m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.end.zoom) : m_transition.end.zoom, m_transition.end.rotation]);
17785
17807
  /**
@@ -17831,10 +17853,11 @@ var map = function map(arg) {
17831
17853
  if (m_transition.end.center) {
17832
17854
  var needZoom = m_zoom !== m_this._fix_zoom(m_transition.end.zoom);
17833
17855
 
17834
- m_this.center(m_transition.end.center, null, needZoom, needZoom);
17856
+ var noEndClamp = needZoom || opts.endClamp === false;
17857
+ m_this.center(m_transition.end.center, null, noEndClamp, noEndClamp);
17835
17858
  }
17836
17859
 
17837
- m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin);
17860
+ m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin, opts.endClamp === false, opts.endClamp === false);
17838
17861
  m_this.rotation(fix_rotation(m_transition.end.rotation));
17839
17862
  }
17840
17863
 
@@ -17874,7 +17897,7 @@ var map = function map(arg) {
17874
17897
  x: p[0],
17875
17898
  y: p[1]
17876
17899
  }, null);
17877
- m_this.zoom(p[2], m_transition.zoomOrigin, true);
17900
+ m_this.zoom(p[2], m_transition.zoomOrigin, true, true);
17878
17901
  }
17879
17902
 
17880
17903
  m_this.rotation(p[3], undefined, true);
@@ -18618,6 +18641,10 @@ var map = function map(arg) {
18618
18641
  m_autoshareRenderer = arg === null ? undefined : arg;
18619
18642
  return m_this;
18620
18643
  };
18644
+ /* Report the current version on the map object. */
18645
+
18646
+
18647
+ this._version = __webpack_require__(2978);
18621
18648
  /**
18622
18649
  * Draw a layer image to a canvas context. The layer's opacity and transform
18623
18650
  * are applied. This is used as part of making a screenshot.
@@ -18631,7 +18658,6 @@ var map = function map(arg) {
18631
18658
  * @private
18632
18659
  */
18633
18660
 
18634
-
18635
18661
  function drawLayerImageToContext(context, opacity, elem, img, mixBlendMode) {
18636
18662
  context.globalAlpha = opacity;
18637
18663
 
@@ -24190,6 +24216,7 @@ var pixelmapLayer = function pixelmapLayer(arg) {
24190
24216
  this._init = function () {
24191
24217
  // Call super class init
24192
24218
  s_init.apply(m_this, arguments);
24219
+ m_this.nearestPixel(true, true);
24193
24220
  var pixelmapArgs = {
24194
24221
  quadFeature: m_this.features()[0]
24195
24222
  };
@@ -26000,6 +26027,10 @@ var feature = __webpack_require__(6837);
26000
26027
  * call `cacheUpdate` on the data item or for all data.
26001
26028
  * @property {geo.quadFeature.styleSpec} [style] Style object with default
26002
26029
  * style options.
26030
+ * @property {boolean|number} [nearestPixel] If true, image quads are
26031
+ * rendered with near-neighbor sampling. If false, with interpolated
26032
+ * sampling. If a number, interpolate at that zoom level or below and
26033
+ * nearest neighbor at that zoom level or above.
26003
26034
  */
26004
26035
 
26005
26036
  /**
@@ -26063,6 +26094,7 @@ var quadFeature = function quadFeature(arg) {
26063
26094
  var m_this = this,
26064
26095
  s_init = this._init,
26065
26096
  m_cacheQuads,
26097
+ m_nearestPixel = arg.nearestPixel,
26066
26098
  m_nextQuadId = 0,
26067
26099
  m_images = [],
26068
26100
  m_videos = [],
@@ -26745,6 +26777,27 @@ var quadFeature = function quadFeature(arg) {
26745
26777
 
26746
26778
  return null;
26747
26779
  };
26780
+ /**
26781
+ * Get/Set nearestPixel value.
26782
+ *
26783
+ * @param {boolean|number} [val] If not specified, return the current value.
26784
+ * If true, image quads are rendered with near-neighbor sampling. If
26785
+ * false, with interpolated sampling. If a number, interpolate at that
26786
+ * zoom level or below and nearest neighbor at that zoom level or above.
26787
+ * @returns {boolean|number|this}
26788
+ */
26789
+
26790
+
26791
+ this.nearestPixel = function (val) {
26792
+ if (val === undefined) {
26793
+ return m_nearestPixel;
26794
+ } else {
26795
+ m_nearestPixel = val;
26796
+ m_this.modified();
26797
+ }
26798
+
26799
+ return m_this;
26800
+ };
26748
26801
  /**
26749
26802
  * Initialize.
26750
26803
  *
@@ -27813,7 +27866,7 @@ module.exports = sceneObject;
27813
27866
  * @constant
27814
27867
  * @type {string}
27815
27868
  */
27816
- module.exports = "4deaf9194bd7164462cae2b89ec30e85ead7ff6e";
27869
+ module.exports = "8d01f4a68bc4d89c1612e1d19e1805f8e555669b";
27817
27870
 
27818
27871
  /***/ }),
27819
27872
 
@@ -30721,6 +30774,10 @@ var featureLayer = __webpack_require__(3715);
30721
30774
  * any tile layers. If specified, this uses the quad defaults, so this is a
30722
30775
  * ``geo.quadFeature.position`` object with, typically, an ``image`` property
30723
30776
  * added to it. The quad positions are in the map gcs coordinates.
30777
+ * @property {boolean|number} [nearestPixel] If true, image quads are
30778
+ * rendered with near-neighbor sampling. If false, with interpolated
30779
+ * sampling. If a number, interpolate at that zoom level or below and
30780
+ * nearest neighbor at that zoom level or above.
30724
30781
  */
30725
30782
 
30726
30783
  /**
@@ -30884,6 +30941,7 @@ var tileLayer = function tileLayer(arg) {
30884
30941
  m_reference,
30885
30942
  m_exited,
30886
30943
  m_lastBaseQuad,
30944
+ m_nearestPixel = arg.nearestPixel,
30887
30945
  m_this = this; // copy the options into a private variable
30888
30946
 
30889
30947
  this._options = $.extend(true, {}, arg); // set the layer attribution text
@@ -32525,6 +32583,36 @@ var tileLayer = function tileLayer(arg) {
32525
32583
 
32526
32584
  return m_this;
32527
32585
  };
32586
+ /**
32587
+ * Get/Set nearestPixel value.
32588
+ *
32589
+ * @param {boolean|number} [val] If not specified, return the current value.
32590
+ * If true, image quads are rendered with near-neighbor sampling. If
32591
+ * false, with interpolated sampling. If a number, interpolate at that
32592
+ * zoom level or below and nearest neighbor at that zoom level or above.
32593
+ * @param {boolean} [skipUpdate] If specifying val and this value is truthy,
32594
+ * don't update the layer or mark it as modified.
32595
+ * @returns {boolean|number|this}
32596
+ */
32597
+
32598
+
32599
+ this.nearestPixel = function (val, skipUpdate) {
32600
+ if (val === undefined) {
32601
+ return m_nearestPixel;
32602
+ }
32603
+
32604
+ if (m_nearestPixel !== val) {
32605
+ m_nearestPixel = val;
32606
+
32607
+ if (!skipUpdate) {
32608
+ m_this.modified();
32609
+
32610
+ m_this._update();
32611
+ }
32612
+ }
32613
+
32614
+ return m_this;
32615
+ };
32528
32616
  /**
32529
32617
  * Get/set the baseQuad.
32530
32618
  *
@@ -40938,7 +41026,7 @@ module.exports = vectorFeature;
40938
41026
  * @constant
40939
41027
  * @type {string}
40940
41028
  */
40941
- module.exports = "1.10.0";
41029
+ module.exports = "1.10.3";
40942
41030
 
40943
41031
  /***/ }),
40944
41032
 
@@ -43932,7 +44020,8 @@ var webgl_pixelmapFeature = function webgl_pixelmapFeature(arg) {
43932
44020
  m_quadFeature = m_this.layer().createFeature('quad', {
43933
44021
  selectionAPI: false,
43934
44022
  gcs: m_this.gcs(),
43935
- visible: m_this.visible(undefined, true)
44023
+ visible: m_this.visible(undefined, true),
44024
+ nearestPixel: true
43936
44025
  });
43937
44026
  m_quadFeatureInit = false;
43938
44027
  }
@@ -43954,11 +44043,6 @@ var webgl_pixelmapFeature = function webgl_pixelmapFeature(arg) {
43954
44043
  };
43955
44044
 
43956
44045
  m_quadFeature._hookRenderImageQuads = function (renderState, quads) {
43957
- quads.forEach(function (quad) {
43958
- if (quad.image && quad.texture && !quad.texture.nearestPixel()) {
43959
- quad.texture.setNearestPixel(true);
43960
- }
43961
- });
43962
44046
  m_lookupTable.bind(renderState, quads);
43963
44047
  };
43964
44048
 
@@ -43992,6 +44076,7 @@ var webgl_pixelmapFeature = function webgl_pixelmapFeature(arg) {
43992
44076
 
43993
44077
  if (arg.quadFeature) {
43994
44078
  m_quadFeature = arg.quadFeature;
44079
+ m_quadFeature.nearestPixel(true);
43995
44080
  }
43996
44081
 
43997
44082
  this._init(arg);
@@ -45194,6 +45279,8 @@ var quadFeature = __webpack_require__(5017);
45194
45279
 
45195
45280
  var timestamp = __webpack_require__(6618);
45196
45281
 
45282
+ var util = __webpack_require__(4634);
45283
+
45197
45284
  var _memoryCheckLargestTested = 4096 * 4096;
45198
45285
  /**
45199
45286
  * Create a new instance of class quadFeature.
@@ -45598,6 +45685,34 @@ var webgl_quadFeature = function webgl_quadFeature(arg) {
45598
45685
  h,
45599
45686
  quadw,
45600
45687
  quadh;
45688
+ var nearestPixel = m_this.nearestPixel();
45689
+
45690
+ if (nearestPixel !== undefined) {
45691
+ if (nearestPixel !== true && util.isNonNullFinite(nearestPixel)) {
45692
+ var curZoom = m_this.layer().map().zoom();
45693
+ nearestPixel = curZoom >= nearestPixel;
45694
+ }
45695
+
45696
+ m_quads.imgQuads.forEach(function (quad) {
45697
+ if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel) {
45698
+ /* This could just be
45699
+ * quad.texture.setNearestPixel(nearestPixel);
45700
+ * but that needlessly redecodes the image. Instead, just change the
45701
+ * the interpolation flags, then change the nearestPixel value
45702
+ * without triggering a complete re-setup. */
45703
+ renderState.m_context.bindTexture(vgl.GL.TEXTURE_2D, quad.texture.textureHandle());
45704
+ renderState.m_context.texParameteri(vgl.GL.TEXTURE_2D, vgl.GL.TEXTURE_MIN_FILTER, nearestPixel ? vgl.GL.NEAREST : vgl.GL.LINEAR);
45705
+ renderState.m_context.texParameteri(vgl.GL.TEXTURE_2D, vgl.GL.TEXTURE_MAG_FILTER, nearestPixel ? vgl.GL.NEAREST : vgl.GL.LINEAR);
45706
+ renderState.m_context.bindTexture(vgl.GL.TEXTURE_2D, null);
45707
+ var oldmod = quad.texture.modified;
45708
+
45709
+ quad.texture.modified = function () {};
45710
+
45711
+ quad.texture.setNearestPixel(nearestPixel);
45712
+ quad.texture.modified = oldmod;
45713
+ }
45714
+ });
45715
+ }
45601
45716
 
45602
45717
  if (m_this._hookRenderImageQuads) {
45603
45718
  m_this._hookRenderImageQuads(renderState, m_quads.imgQuads);
@@ -45991,6 +46106,7 @@ var webgl_tileLayer = function webgl_tileLayer() {
45991
46106
 
45992
46107
  this._update = function (request) {
45993
46108
  s_update.call(m_this, request);
46109
+ m_quadFeature.nearestPixel(m_this.nearestPixel());
45994
46110
 
45995
46111
  m_this._addBaseQuadToTiles(m_quadFeature, m_tiles);
45996
46112
 
package/geo.lean.js CHANGED
@@ -8017,6 +8017,17 @@ var canvas_quadFeature = function canvas_quadFeature(arg) {
8017
8017
 
8018
8018
  var oldAlpha = context2d.globalAlpha;
8019
8019
  var opacity = oldAlpha;
8020
+ var nearestPixel = m_this.nearestPixel();
8021
+
8022
+ if (nearestPixel !== undefined) {
8023
+ if (nearestPixel !== true && util.isNonNullFinite(nearestPixel)) {
8024
+ var curZoom = m_this.layer().map().zoom();
8025
+ nearestPixel = curZoom >= nearestPixel;
8026
+ }
8027
+
8028
+ context2d.imageSmoothingEnabled = !nearestPixel;
8029
+ }
8030
+
8020
8031
  $.each([m_quads.imgQuads, m_quads.vidQuads], function (listidx, quadlist) {
8021
8032
  if (!quadlist) {
8022
8033
  return;
@@ -8086,6 +8097,7 @@ var canvas_quadFeature = function canvas_quadFeature(arg) {
8086
8097
  }
8087
8098
 
8088
8099
  context2d.setTransform(1, 0, 0, 1, 0, 0);
8100
+ context2d.imageSmoothingEnabled = true;
8089
8101
  };
8090
8102
  /**
8091
8103
  * If this returns true, the render will be skipped and tried again on the
@@ -8543,6 +8555,7 @@ var canvas_tileLayer = function canvas_tileLayer() {
8543
8555
 
8544
8556
  this._update = function (request) {
8545
8557
  s_update.call(m_this, request);
8558
+ m_quadFeature.nearestPixel(m_this.nearestPixel());
8546
8559
 
8547
8560
  m_this._addBaseQuadToTiles(m_quadFeature, m_tiles);
8548
8561
 
@@ -16879,13 +16892,15 @@ var map = function map(arg) {
16879
16892
  * center.
16880
16893
  * @param {boolean} [ignoreDiscreteZoom] If `true`, ignore the discreteZoom
16881
16894
  * option when determining the new view.
16895
+ * @param {boolean} [ignoreClampBounds] If `true`, ignore the clampBounds
16896
+ * option when determining the new view.
16882
16897
  * @returns {number|this}
16883
16898
  * @fires geo.event.zoom
16884
16899
  * @fires geo.event.pan
16885
16900
  */
16886
16901
 
16887
16902
 
16888
- this.zoom = function (val, origin, ignoreDiscreteZoom) {
16903
+ this.zoom = function (val, origin, ignoreDiscreteZoom, ignoreClampBounds) {
16889
16904
  if (val === undefined) {
16890
16905
  return m_zoom;
16891
16906
  }
@@ -16894,10 +16909,14 @@ var map = function map(arg) {
16894
16909
  /* If we are zooming around a point, ignore the clamp bounds */
16895
16910
 
16896
16911
  var aroundPoint = origin && (origin.mapgcs || origin.geo) && origin.map;
16897
- var ignoreClampBounds = aroundPoint;
16912
+
16913
+ if (aroundPoint) {
16914
+ ignoreClampBounds = true;
16915
+ }
16898
16916
  /* The ignoreDiscreteZoom flag is intended to allow non-integer zoom values
16899
16917
  * during animation. */
16900
16918
 
16919
+
16901
16920
  val = m_this._fix_zoom(val, ignoreDiscreteZoom);
16902
16921
 
16903
16922
  if (val === m_zoom) {
@@ -16924,7 +16943,7 @@ var map = function map(arg) {
16924
16943
  m_this.pan({
16925
16944
  x: 0,
16926
16945
  y: 0
16927
- }, ignoreDiscreteZoom);
16946
+ }, ignoreDiscreteZoom, ignoreClampBounds);
16928
16947
  }
16929
16948
 
16930
16949
  return m_this;
@@ -17670,6 +17689,8 @@ var map = function map(arg) {
17670
17689
  * a value based on what canceled a transition, `transition`: the current
17671
17690
  * transition that just completed, `next`: a boolean if another transition
17672
17691
  * follows immediately.
17692
+ * @param {boolean} [opts.endClamp=true] If `false`, the last center change
17693
+ * will not clamp to the bounds and zoom values.
17673
17694
  * @param {string|geo.transform|null} [gcs] Input gcs. `undefined` to use
17674
17695
  * the interface gcs, `null` to use the map gcs, or any other transform.
17675
17696
  * Applies only to `opts.center` and to converting zoom values to height,
@@ -17779,7 +17800,8 @@ var map = function map(arg) {
17779
17800
  zCoord: opts.zCoord,
17780
17801
  done: opts.done,
17781
17802
  duration: opts.duration,
17782
- zoomOrigin: opts.zoomOrigin
17803
+ zoomOrigin: opts.zoomOrigin,
17804
+ endClamp: opts.endClamp
17783
17805
  };
17784
17806
  m_transition.interp = opts.interp([m_transition.start.center.x, m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.start.zoom) : m_transition.start.zoom, m_transition.start.rotation], [m_transition.end.center ? m_transition.end.center.x : m_transition.start.center.x, m_transition.end.center ? m_transition.end.center.y : m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.end.zoom) : m_transition.end.zoom, m_transition.end.rotation]);
17785
17807
  /**
@@ -17831,10 +17853,11 @@ var map = function map(arg) {
17831
17853
  if (m_transition.end.center) {
17832
17854
  var needZoom = m_zoom !== m_this._fix_zoom(m_transition.end.zoom);
17833
17855
 
17834
- m_this.center(m_transition.end.center, null, needZoom, needZoom);
17856
+ var noEndClamp = needZoom || opts.endClamp === false;
17857
+ m_this.center(m_transition.end.center, null, noEndClamp, noEndClamp);
17835
17858
  }
17836
17859
 
17837
- m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin);
17860
+ m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin, opts.endClamp === false, opts.endClamp === false);
17838
17861
  m_this.rotation(fix_rotation(m_transition.end.rotation));
17839
17862
  }
17840
17863
 
@@ -17874,7 +17897,7 @@ var map = function map(arg) {
17874
17897
  x: p[0],
17875
17898
  y: p[1]
17876
17899
  }, null);
17877
- m_this.zoom(p[2], m_transition.zoomOrigin, true);
17900
+ m_this.zoom(p[2], m_transition.zoomOrigin, true, true);
17878
17901
  }
17879
17902
 
17880
17903
  m_this.rotation(p[3], undefined, true);
@@ -18618,6 +18641,10 @@ var map = function map(arg) {
18618
18641
  m_autoshareRenderer = arg === null ? undefined : arg;
18619
18642
  return m_this;
18620
18643
  };
18644
+ /* Report the current version on the map object. */
18645
+
18646
+
18647
+ this._version = __webpack_require__(2978);
18621
18648
  /**
18622
18649
  * Draw a layer image to a canvas context. The layer's opacity and transform
18623
18650
  * are applied. This is used as part of making a screenshot.
@@ -18631,7 +18658,6 @@ var map = function map(arg) {
18631
18658
  * @private
18632
18659
  */
18633
18660
 
18634
-
18635
18661
  function drawLayerImageToContext(context, opacity, elem, img, mixBlendMode) {
18636
18662
  context.globalAlpha = opacity;
18637
18663
 
@@ -24190,6 +24216,7 @@ var pixelmapLayer = function pixelmapLayer(arg) {
24190
24216
  this._init = function () {
24191
24217
  // Call super class init
24192
24218
  s_init.apply(m_this, arguments);
24219
+ m_this.nearestPixel(true, true);
24193
24220
  var pixelmapArgs = {
24194
24221
  quadFeature: m_this.features()[0]
24195
24222
  };
@@ -26000,6 +26027,10 @@ var feature = __webpack_require__(6837);
26000
26027
  * call `cacheUpdate` on the data item or for all data.
26001
26028
  * @property {geo.quadFeature.styleSpec} [style] Style object with default
26002
26029
  * style options.
26030
+ * @property {boolean|number} [nearestPixel] If true, image quads are
26031
+ * rendered with near-neighbor sampling. If false, with interpolated
26032
+ * sampling. If a number, interpolate at that zoom level or below and
26033
+ * nearest neighbor at that zoom level or above.
26003
26034
  */
26004
26035
 
26005
26036
  /**
@@ -26063,6 +26094,7 @@ var quadFeature = function quadFeature(arg) {
26063
26094
  var m_this = this,
26064
26095
  s_init = this._init,
26065
26096
  m_cacheQuads,
26097
+ m_nearestPixel = arg.nearestPixel,
26066
26098
  m_nextQuadId = 0,
26067
26099
  m_images = [],
26068
26100
  m_videos = [],
@@ -26745,6 +26777,27 @@ var quadFeature = function quadFeature(arg) {
26745
26777
 
26746
26778
  return null;
26747
26779
  };
26780
+ /**
26781
+ * Get/Set nearestPixel value.
26782
+ *
26783
+ * @param {boolean|number} [val] If not specified, return the current value.
26784
+ * If true, image quads are rendered with near-neighbor sampling. If
26785
+ * false, with interpolated sampling. If a number, interpolate at that
26786
+ * zoom level or below and nearest neighbor at that zoom level or above.
26787
+ * @returns {boolean|number|this}
26788
+ */
26789
+
26790
+
26791
+ this.nearestPixel = function (val) {
26792
+ if (val === undefined) {
26793
+ return m_nearestPixel;
26794
+ } else {
26795
+ m_nearestPixel = val;
26796
+ m_this.modified();
26797
+ }
26798
+
26799
+ return m_this;
26800
+ };
26748
26801
  /**
26749
26802
  * Initialize.
26750
26803
  *
@@ -27813,7 +27866,7 @@ module.exports = sceneObject;
27813
27866
  * @constant
27814
27867
  * @type {string}
27815
27868
  */
27816
- module.exports = "4deaf9194bd7164462cae2b89ec30e85ead7ff6e";
27869
+ module.exports = "8d01f4a68bc4d89c1612e1d19e1805f8e555669b";
27817
27870
 
27818
27871
  /***/ }),
27819
27872
 
@@ -30721,6 +30774,10 @@ var featureLayer = __webpack_require__(3715);
30721
30774
  * any tile layers. If specified, this uses the quad defaults, so this is a
30722
30775
  * ``geo.quadFeature.position`` object with, typically, an ``image`` property
30723
30776
  * added to it. The quad positions are in the map gcs coordinates.
30777
+ * @property {boolean|number} [nearestPixel] If true, image quads are
30778
+ * rendered with near-neighbor sampling. If false, with interpolated
30779
+ * sampling. If a number, interpolate at that zoom level or below and
30780
+ * nearest neighbor at that zoom level or above.
30724
30781
  */
30725
30782
 
30726
30783
  /**
@@ -30884,6 +30941,7 @@ var tileLayer = function tileLayer(arg) {
30884
30941
  m_reference,
30885
30942
  m_exited,
30886
30943
  m_lastBaseQuad,
30944
+ m_nearestPixel = arg.nearestPixel,
30887
30945
  m_this = this; // copy the options into a private variable
30888
30946
 
30889
30947
  this._options = $.extend(true, {}, arg); // set the layer attribution text
@@ -32525,6 +32583,36 @@ var tileLayer = function tileLayer(arg) {
32525
32583
 
32526
32584
  return m_this;
32527
32585
  };
32586
+ /**
32587
+ * Get/Set nearestPixel value.
32588
+ *
32589
+ * @param {boolean|number} [val] If not specified, return the current value.
32590
+ * If true, image quads are rendered with near-neighbor sampling. If
32591
+ * false, with interpolated sampling. If a number, interpolate at that
32592
+ * zoom level or below and nearest neighbor at that zoom level or above.
32593
+ * @param {boolean} [skipUpdate] If specifying val and this value is truthy,
32594
+ * don't update the layer or mark it as modified.
32595
+ * @returns {boolean|number|this}
32596
+ */
32597
+
32598
+
32599
+ this.nearestPixel = function (val, skipUpdate) {
32600
+ if (val === undefined) {
32601
+ return m_nearestPixel;
32602
+ }
32603
+
32604
+ if (m_nearestPixel !== val) {
32605
+ m_nearestPixel = val;
32606
+
32607
+ if (!skipUpdate) {
32608
+ m_this.modified();
32609
+
32610
+ m_this._update();
32611
+ }
32612
+ }
32613
+
32614
+ return m_this;
32615
+ };
32528
32616
  /**
32529
32617
  * Get/set the baseQuad.
32530
32618
  *
@@ -40938,7 +41026,7 @@ module.exports = vectorFeature;
40938
41026
  * @constant
40939
41027
  * @type {string}
40940
41028
  */
40941
- module.exports = "1.10.0";
41029
+ module.exports = "1.10.3";
40942
41030
 
40943
41031
  /***/ }),
40944
41032
 
@@ -43932,7 +44020,8 @@ var webgl_pixelmapFeature = function webgl_pixelmapFeature(arg) {
43932
44020
  m_quadFeature = m_this.layer().createFeature('quad', {
43933
44021
  selectionAPI: false,
43934
44022
  gcs: m_this.gcs(),
43935
- visible: m_this.visible(undefined, true)
44023
+ visible: m_this.visible(undefined, true),
44024
+ nearestPixel: true
43936
44025
  });
43937
44026
  m_quadFeatureInit = false;
43938
44027
  }
@@ -43954,11 +44043,6 @@ var webgl_pixelmapFeature = function webgl_pixelmapFeature(arg) {
43954
44043
  };
43955
44044
 
43956
44045
  m_quadFeature._hookRenderImageQuads = function (renderState, quads) {
43957
- quads.forEach(function (quad) {
43958
- if (quad.image && quad.texture && !quad.texture.nearestPixel()) {
43959
- quad.texture.setNearestPixel(true);
43960
- }
43961
- });
43962
44046
  m_lookupTable.bind(renderState, quads);
43963
44047
  };
43964
44048
 
@@ -43992,6 +44076,7 @@ var webgl_pixelmapFeature = function webgl_pixelmapFeature(arg) {
43992
44076
 
43993
44077
  if (arg.quadFeature) {
43994
44078
  m_quadFeature = arg.quadFeature;
44079
+ m_quadFeature.nearestPixel(true);
43995
44080
  }
43996
44081
 
43997
44082
  this._init(arg);
@@ -45194,6 +45279,8 @@ var quadFeature = __webpack_require__(5017);
45194
45279
 
45195
45280
  var timestamp = __webpack_require__(6618);
45196
45281
 
45282
+ var util = __webpack_require__(4634);
45283
+
45197
45284
  var _memoryCheckLargestTested = 4096 * 4096;
45198
45285
  /**
45199
45286
  * Create a new instance of class quadFeature.
@@ -45598,6 +45685,34 @@ var webgl_quadFeature = function webgl_quadFeature(arg) {
45598
45685
  h,
45599
45686
  quadw,
45600
45687
  quadh;
45688
+ var nearestPixel = m_this.nearestPixel();
45689
+
45690
+ if (nearestPixel !== undefined) {
45691
+ if (nearestPixel !== true && util.isNonNullFinite(nearestPixel)) {
45692
+ var curZoom = m_this.layer().map().zoom();
45693
+ nearestPixel = curZoom >= nearestPixel;
45694
+ }
45695
+
45696
+ m_quads.imgQuads.forEach(function (quad) {
45697
+ if (quad.image && quad.texture && quad.texture.nearestPixel() !== nearestPixel) {
45698
+ /* This could just be
45699
+ * quad.texture.setNearestPixel(nearestPixel);
45700
+ * but that needlessly redecodes the image. Instead, just change the
45701
+ * the interpolation flags, then change the nearestPixel value
45702
+ * without triggering a complete re-setup. */
45703
+ renderState.m_context.bindTexture(vgl.GL.TEXTURE_2D, quad.texture.textureHandle());
45704
+ renderState.m_context.texParameteri(vgl.GL.TEXTURE_2D, vgl.GL.TEXTURE_MIN_FILTER, nearestPixel ? vgl.GL.NEAREST : vgl.GL.LINEAR);
45705
+ renderState.m_context.texParameteri(vgl.GL.TEXTURE_2D, vgl.GL.TEXTURE_MAG_FILTER, nearestPixel ? vgl.GL.NEAREST : vgl.GL.LINEAR);
45706
+ renderState.m_context.bindTexture(vgl.GL.TEXTURE_2D, null);
45707
+ var oldmod = quad.texture.modified;
45708
+
45709
+ quad.texture.modified = function () {};
45710
+
45711
+ quad.texture.setNearestPixel(nearestPixel);
45712
+ quad.texture.modified = oldmod;
45713
+ }
45714
+ });
45715
+ }
45601
45716
 
45602
45717
  if (m_this._hookRenderImageQuads) {
45603
45718
  m_this._hookRenderImageQuads(renderState, m_quads.imgQuads);
@@ -45991,6 +46106,7 @@ var webgl_tileLayer = function webgl_tileLayer() {
45991
46106
 
45992
46107
  this._update = function (request) {
45993
46108
  s_update.call(m_this, request);
46109
+ m_quadFeature.nearestPixel(m_this.nearestPixel());
45994
46110
 
45995
46111
  m_this._addBaseQuadToTiles(m_quadFeature, m_tiles);
45996
46112