<\/P>
Landsat Lens é um aplicativo amigável para toque e mouse para navegar por imagens de satélite Landsat<\/A> passadas e presentes hospedadas pela Esri<\/A>.<\/P>Clique aqui<\/A> para o aplicativo ao vivo.<\/P>Clique aqui<\/A> para o código-fonte.<\/P><\/P>Usando um mouse, uma lente pode ser movida pelo mapa com uma operação padrão de clique esquerdo do mouse e arrastar. Rolando a roda do mouse aumentará ou diminuirá o tamanho da lente dependendo da direção.<\/P><\/P>Com um dispositivo de toque como um iPad, uma lente pode ser movida com um pressionar e arrastar intuitivo. Para redimensionar, faça um movimento de pinça ou expansão com dois ou mais dedos dentro da lente. Da mesma forma, girar uma lente é conseguido torcendo dois ou mais dedos. Ao contrário do mouse, as telas sensíveis ao toque permitem que o usuário manipule duas ou mais lentes simultaneamente.<\/P><\/P>Por padrão, o aplicativo inicia com uma lente datada de 2017 localizada perto da Palm Jebel Ali<\/A> em Dubai<\/A>. Para escolher um local predefinido, selecione uma das entradas no menu suspenso Bookmarks<\/STRONG>. Alternativamente, você pode mover ou dar zoom para qualquer área de interesse.<\/P><\/P>Para um dos locais predefinidos, ou sua própria área de interesse, você pode querer ver mudanças ao longo do tempo. Para isso, use o menu suspenso Windows<\/STRONG> para adicionar uma janela mostrando imagens de 2002, 2005, 2010, 2015 ou 2017. Ao deslizar as lentes sobre o mapa base e umas sobre as outras, você pode facilmente ver mudanças na vegetação, linhas costeiras, rios e atividade humana. Use a última opção no menu suspenso para remover todas as lentes do mapa.<\/P><\/P>Problemas Conhecidos:<\/STRONG><\/P>O suporte para os W3C<\/A>'s touch events<\/A> varia muito entre navegadores e sistemas operacionais. No entanto, o autor observa que o comportamento mais consistente tem sido com navegadores <A href="https:\/\/www.google.com\/chrome\/\
Clique
Usando um mouse, uma lente pode ser movida pelo mapa com uma operação padrão de clique esquerdo do mouse e arrastar. Rolando a roda do mouse aumentará ou diminuirá o tamanho da lente dependendo da direção.<\/P>
Com um dispositivo de toque como um iPad, uma lente pode ser movida com um pressionar e arrastar intuitivo. Para redimensionar, faça um movimento de pinça ou expansão com dois ou mais dedos dentro da lente. Da mesma forma, girar uma lente é conseguido torcendo dois ou mais dedos. Ao contrário do mouse, as telas sensíveis ao toque permitem que o usuário manipule duas ou mais lentes simultaneamente.<\/P>
Por padrão, o aplicativo inicia com uma lente datada de 2017 localizada perto da
rcarmichael-esristaff
That is exactly what I needed thank you
-Rickey
Hi dafiter,
Below is an example of using the text in the dropdown menu as the label in an imagery window.
Hope this helps.
Cheers,
Richie
line ~152 of index.js
if ($(this).parent().parent().hasClass('rc-year')) {
// Get year.
var year = $(this).attr('data-year');
var label = $(this).html();
// Close all popups if user picks last entry.
if (year === 'close-all'){
$('.rc-window').remove();
return;
}
// Add new lens.
addLens(
year,
DEFAULT_SIZE,
label
);
line ~180 of index.js
// Function that adds a new lens.
function addLens(year, size, label) {
line ~278 of index.js
// Add year text
window.append(
$(document.createElement('div')).css({
position: 'absolute',
left: '0',
top: '0',
color: 'rgba(255, 255, 255, 0.5)',
'font-size': '24px',
'font-weight': 700,
'pointer-events': 'none',
'margin-top': '1px',
'margin-left': '5px'
}).html(label)
rcarmichael-esristaff How difficult would it be to change the text on the lens?
I am using data-year to define the lens source. This results in a random folder name being put into the title
Could we use the same text as the drop down or add a new variable?
That works perfectly! Thank you!
I am now planning to add more years imagery and some old maps.
Your imagery is published as map service rather than an image service. This means that some of the url parameters are slightly different. Copy and replace the getImageUrl code block below to show an Ashland imagery lens in your app.
function getImageUrl(year) {
// Calculate scale (if image width or height exceeds maximum).
var max = Math.max(_view.width, _view.height);
var scale = max <= MAX_IMAGE ? 1 : MAX_IMAGE / max;
// Get url/function from user defined selection.
var url = 'http://gis.ashland.or.us/arcgis/rest/services/pictometry3inch_jason/MapServer';
url += '/export?f=image';
url += string.substitute('&bbox=${xmin},${ymin},${xmax},${ymax}', {
xmin: _view.extent.xmin,
ymin: _view.extent.ymin,
xmax: _view.extent.xmax,
ymax: _view.extent.ymax
});
url += '&bboxSR=' + _view.spatialReference.wkid;
url += '&imageSR=' + _view.spatialReference.wkid;
url += string.substitute('&size=${w},${h}', {
w: Math.min(Math.round(scale * _view.width), MAX_IMAGE),
h: Math.min(Math.round(scale * _view.height), MAX_IMAGE)
url += '&format=' + 'jpg';
return url;
//var url = $('.rc-theme li.active a').attr('data-url');
//var fxn = $('.rc-theme li.active a').attr('data-function');
//// Construct map request url.
//url += '/exportImage?f=image';
//url += string.substitute('&bbox=${xmin},${ymin},${xmax},${ymax}', {
// xmin: _view.extent.xmin,
// ymin: _view.extent.ymin,
// xmax: _view.extent.xmax,
// ymax: _view.extent.ymax
//});
//url += '&bboxSR=' + _view.spatialReference.wkid;
//url += '&imageSR=' + _view.spatialReference.wkid;
//url += string.substitute('&size=${w},${h}', {
// w: Math.min(Math.round(scale * _view.width), MAX_IMAGE),
// h: Math.min(Math.round(scale * _view.height), MAX_IMAGE)
//url += string.substitute('&time=${f},${t}', {
// f: 0,
// t: Date.UTC(year, 0, 1)
//url += '&format=' + 'jpg';
//url += '&interpolation=' + 'RSP_BilinearInterpolation';
//url += '&mosaicRule=' + '{mosaicMethod:\'esriMosaicAttribute\',sortField:\'AcquisitionDate\',sortValue:\'2017/02/06, 12:00 AM\',ascending:true,mosaicOperation:\'MT_FIRST\',where:\'CloudCover<=0.1\'}';
//url += '&renderingRule=' + string.substitute('{rasterFunction:\'${rasterFunction}\'}', {
// rasterFunction: fxn
//return url;
Thank you for the quick reply.
I have tried all that you have suggested. I cannot get the layer to display.
Here is the sample Aerial Viewer
There are no errors in the console log so I cannot tell what is wrong.
Hi Rickey,
Yes, it is fairly easy to accommodate alternative imagery. The most significant change would be to the user interface to reflect the display options you want (if any). As a quick test, try the following modifications to "test drive" the app with your imagery.
rcarmichael-esristaff Thank you for sharing this map!
I was wondering how difficult it would be to add my own aerial layers to it?
I want to change the functionality a little and just display aerials from my server?
Thank you sir! This is an INCREDIBLE tool for teaching and learning and research and I will write about this for the education community which I serve. Wonderful!
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.