Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Merge branch 'palette-replacement' into testing-1.4.0

Benjamina0ff6b567fd2
diff --cc bin/wv-options-colormap
index be1bf5c43,1bc4e225c..4c0917afd
--- a/bin/wv-options-colormap
+++ b/bin/wv-options-colormap
@@@ -65,8 -130,8 +132,9 @@@ def process_entries(colormap)
colors = []
values = []
tooltips = []
+ matches = []
transparent_map = "true"
+
for entry in entries:
if entry["@transparent"] == "false":
transparent_map = "false"
diff --cc package.json
index 783d8382d,cdb3ab93c..9a10aa352
--- a/package.json
+++ b/package.json
@@@ -34,8 -34,7 +34,9 @@@
"jshint": "2.9.x",
"lodash": "^4.15.0",
"moment": "2.13.x",
+ "openlayers": "3.19.x",
+ "gifshot": "https://github.com/nasa-gibs/gifshot/archive/4.2.0.tar.gz",
+ "openlayers": "3.20.x",
"phantomjs": "2.1.x",
"promise-queue": "^2.2.3",
"react": "^15.3.1",
diff --cc web/js/map/wv.map.ui.js
index 148aaa35d,e3e33bf6f..fdb1bd705
--- a/web/js/map/wv.map.ui.js
+++ b/web/js/map/wv.map.ui.js
@@@ -23,15 -20,8 +23,14 @@@ wv.map.ui = wv.map.ui || function(model
var cache = new Cache(400); // Save layers from days visited
var animationDuration = 250;
var self = {};
- var rotation = self.rotate = new Rotation(self, models);
- var dataRunner = self.runningdata = new DataRunner(models);
+ var rotation = new components.Rotation(self, models);
+ var layerBuilder;
+ var dateline = components.Dateline(models, config);
+ var layerKey;
+ var createLayer;
+ var precache = components.Precache(models, config, cache, self);
+
- //var dataRunner = new components.Runningdata(models);
- self.mapIsbeingDragged = false;
++ var dataRunner = self.runningdata = new components.Runningdata(models);
var hiDPI = ol.has.DEVICE_PIXEL_RATIO > 1;
var pixelRatio = hiDPI ? 2 : 1;
@@@ -593,16 -823,24 +593,28 @@@
map.getView().on("change:rotation", _.throttle(rotation.updateRotation, 300));
map.on('pointerdrag', function() {
self.mapIsbeingDragged = true;
+ self.events.trigger('drag');
});
+ map.getView().on('propertychange', function(e) {
+ switch (e.key) {
+ case 'resolution':
+ self.mapIsbeingZoomed = true;
+ break;
+ }
+ });
map.on('moveend', function(e) {
++<<<<<<< HEAD
+ self.events.trigger('moveend');
+ setTimeout(function(){
++=======
+ setTimeout(function() {
++>>>>>>> palette-replacement
self.mapIsbeingDragged = false;
+ self.mapIsbeingZoomed = false;
}, 200);
});
-
return map;
};
-
/*
* Creates map zoom buttons
*
@@@ -792,29 -1024,19 +804,32 @@@
});
function onMouseMove(e) {
var coords;
- var pixelValue;
var pixels;
+ var outside;
+
+ // if mobile return
+ if(wv.util.browser.small) {
+ return;
+ }
+ // if over coords return
if($(e.relatedTarget).hasClass('map-coord') ||
$(e.relatedTarget).hasClass('coord-btn')) {
return;
}
- pixels = [e.pageX,e.pageY];
+ pixels = map.getEventPixel(e.originalEvent);
coords = map.getCoordinateFromPixel(pixels);
+ if(!ol.extent.containsCoordinate(extent, coords)) {
+ outside = true;
+ }
+
+ if(Math.abs(coords[0]) > 180 ) {
+ if(coords[0] > 0) {
+ coords[0] = coords[0] - 360;
+ } else {
+ coords[0] = coords[0] + 360;
+ }
+ }
- pixelValue = [pixels[0] * pixelRatio, pixels[1] * pixelRatio];
$('#' + mapId).show();
$('#' + mapId + ' span.map-coord').each(function(){
var format = $(this).attr('data-format');