-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tile cover images and status improvements
- Loading branch information
Showing
3 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Overview images | ||
|
||
The plot in this directory document the steady growth in coverage by on-demand rendered tiles. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
(function() { | ||
// add thumbs | ||
var thumbs = []; | ||
var map = null; | ||
var current = null; | ||
for (let i = 8; i <= 12; ++i) | ||
{ | ||
var img = | ||
$('<img/>') | ||
.attr({'src': 'overview/overview_' + i + '.png', 'width': '200px'}) | ||
.click(function(e) { | ||
if (this == current) | ||
{ | ||
var x = e.offsetX; | ||
var y = e.offsetY; | ||
var w = e.target.offsetWidth; | ||
var h = e.target.offsetHeight; | ||
lon = x/w*360.0; | ||
lat = (0.5-y/h)*180.0; | ||
if (lon > 180) { | ||
lon = lon - 360.0; | ||
} | ||
if (map == null) { | ||
map = $('<iframe/>').attr({'width': '800', 'height': '600'}).appendTo('#map') | ||
} | ||
var lang = 'en'; | ||
map.attr('src', 'iframe_dev.html?wma='+lat+'_'+lon+'_800_600_' + lang + '_3_' + lang + '&globe=Earth&lang=' + lang); | ||
} | ||
else | ||
{ | ||
$.each(thumbs, (i, e) => { e.attr('width', '200px'); }); | ||
$(this).removeAttr('width'); | ||
current = this; | ||
} | ||
}); | ||
|
||
thumbs.push(img); | ||
|
||
$('<span/>').css('padding', '1em').append(img).appendTo('#overview'); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters