Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quality of life improvements (pano preview; open external URL) #241

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private static void runnableCacheSurroundingImages(INode currentImage) {
}
final IWay<?> iWay = MapillaryImageUtils.getSequence(currentImage);
// We prefetch both ways
final Type type = Type.THUMB_256;
final Type type = MapillaryImageUtils.IS_PANORAMIC.test(currentImage) ? Type.THUMB_1024 : Type.THUMB_256; // Prefetch larger pic in case of Pano photo.
if (iWay != null) {
// Avoid CME -- getImage may remove nodes from the way
final List<? extends INode> wayNodes = new ArrayList<>(iWay.getNodes());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ default URI browseImage(String key) {
if (key == null) {
throw new IllegalArgumentException("The image key must not be null!");
}
return string2URL(getBaseUrl(), "app/?pKey=", key);
return string2URL(getBaseUrl(), "app/?pKey=", key, "&focus=photo");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MapillaryURLTest {

@Test
void testBrowseImageURL() {
assertEquals(URI.create("https://www.mapillary.com/app/?pKey=1234567890123456789012"),
assertEquals(URI.create("https://www.mapillary.com/app/?pKey=1234567890123456789012&focus=photo"),
MapillaryConfig.getUrls().browseImage("1234567890123456789012"));
}

Expand Down
Loading