From a87f8f2eee0b894ff5ffd6f0fbbd05bb628c5372 Mon Sep 17 00:00:00 2001 From: ErenOzdemir Date: Fri, 21 Nov 2025 12:16:49 +0300 Subject: [PATCH 1/2] high resolution added --- modules/services/mapilio.js | 49 +++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/modules/services/mapilio.js b/modules/services/mapilio.js index 3533144a7e3..71cd0ce4d19 100644 --- a/modules/services/mapilio.js +++ b/modules/services/mapilio.js @@ -28,6 +28,7 @@ const imgZoom = d3_zoom() const pannellumViewerCSS = 'pannellum/pannellum.css'; const pannellumViewerJS = 'pannellum/pannellum.js'; const resolution = 1080; +const hdResolution = 2080; let _activeImage; let _cache; @@ -364,20 +365,51 @@ export default { let wrap = context.container().select('.photoviewer .mapilio-wrapper'); let attribution = wrap.selectAll('.photo-attribution').text('\u00A0'); - + let _username = ''; + getUserData(d.created_by_id).then((username) => { if (username) { + _username = username; + } + + }).finally(()=>{ + + attribution + .append('input') + .attr('type','checkbox') + .on('click',(e)=>{ + e.stopPropagation(); + let isChecked = e.target.checked; + let parts = _sceneOptions.panorama.split('/'); + + if(isChecked){ + parts[parts.length - 1] = hdResolution; + _sceneOptions.panorama= parts.join('/'); + loadTheImage(); + }else{ + parts[parts.length - 1] = resolution; + _sceneOptions.panorama=parts.join('/'); + loadTheImage(); + } + }) + + attribution + .append('span') + .text('High Resolution') + + attribution + .append('span') + .text('|'); + attribution .append('span') .attr('class', 'captured_by') - .text('@' + username); + .text('@' + _username); attribution .append('span') .text('|'); - } - - }).finally(()=>{ + if (d.capture_time) { attribution .append('span') @@ -414,8 +446,7 @@ export default { .classed('hide', !_cache.images.forImageId.hasOwnProperty(+id + 1)); - getImageData(d.id,d.sequence_id).then(function () { - + function loadTheImage(){ if (d.isPano) { if (!_pannellumViewer) { that.initViewer(); @@ -438,7 +469,9 @@ export default { // make non-panoramic photo viewer that.initOnlyPhoto(context); } - }); + } + + getImageData(d.id,d.sequence_id).then(loadTheImage); function localeDateString(s) { if (!s) return null; From 4b1d8bf24fd0f6514eb5ea4e63a6adbe9dea3471 Mon Sep 17 00:00:00 2001 From: sezerbozibiyik Date: Mon, 18 May 2026 11:52:07 +0300 Subject: [PATCH 2/2] fix conflict --- modules/services/mapilio.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/services/mapilio.js b/modules/services/mapilio.js index b1b496fe088..305dd8b38df 100644 --- a/modules/services/mapilio.js +++ b/modules/services/mapilio.js @@ -339,30 +339,30 @@ export default { _username = username; } - }).finally(()=>{ + }).finally(() => { attribution .append('input') .attr('type','checkbox') - .on('click',(e)=>{ + .on('click',(e) => { e.stopPropagation(); let isChecked = e.target.checked; let parts = _sceneOptions.panorama.split('/'); - if(isChecked){ + if (isChecked){ parts[parts.length - 1] = hdResolution; _sceneOptions.panorama= parts.join('/'); loadTheImage(); - }else{ + } else { parts[parts.length - 1] = resolution; _sceneOptions.panorama=parts.join('/'); loadTheImage(); } - }) + }); attribution .append('span') - .text('High Resolution') + .text('High Resolution'); attribution .append('span') @@ -371,14 +371,11 @@ export default { attribution .append('span') .attr('class', 'captured_by') - .text('@' + username); .text('@' + _username); attribution .append('span') .text('|'); - } - }).finally(() => { if (d.capture_time) { attribution