Opened 6 years ago
Closed 6 years ago
#18123 closed enhancement (fixed)
[PATCH] Add Yandex as a imagery source in osm-obj-info
Reported by: | taylor.smock | Owned by: | Rub21 |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin osm-obj-info | Version: | |
Keywords: | yandex | Cc: |
Description
Yandex has given permission for OSM use ( see https://wiki.openstreetmap.org/wiki/Contributors#Yandex.Panoramas ).
I've got a pull request here: https://github.com/JOSM/osm-obj-info/pull/9, and I've attached the patch from git format-patch -1 HEAD
.
This is related to https://github.com/JOSM/osm-obj-info/issues/8 .
For the plugins that are on GitHub, should I file bugs and patches github or on trac?
The patch refactors the calls to open a browser to another function (which de-duplicates a significant portion of the code), and looking at it again, it can probably be modified further so that many of the functions no longer exist. For example:
lbLinkYandex.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { OSMObjInfoActions.openImageInBrowser("https://yandex.com/maps/?l=stv,sta&ll={longitude},{latitude}&z=18", lbMapillary.getText()); } });
with OSMObjInfoActions.openImageInBrowser
being
public static void openImageInBrowser(String imageUrl, String coords) { if (coords == null || coords.isEmpty()) return; String[] arrCoords = coords.split(","); openInBrowser(imageUrl.replace("{latitude}", arrCoords[0]).replace("{longitude}", arrCoords[1])); }
instead of
lbLinkYandex.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { OSMObjInfoActions.openInBrowserYandex(lbMapillary.getText()); } });
Attachments (1)
Change History (2)
by , 6 years ago
Attachment: | 0001-Add-Yandex-as-a-possible-imagery-source.patch added |
---|
comment:1 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Done: https://github.com/JOSM/osm-obj-info/releases/tag/v1.3
For GitHub plugins, it's easier for everyone to work exclusively there (unless you need a core change, or we don't see the merge request)
Add Yandex as imagery source, refactor some code for deduplication