Changeset 3852 in josm


Ignore:
Timestamp:
2011-02-04T10:16:38+01:00 (11 years ago)
Author:
Upliner
Message:

Offset server bugfixes and debug info

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java

    r3847 r3852  
    269269        public void run() {
    270270            if (!offsetServerSupported) {
    271                 if (!offsetServer.isLayerSupported(getInfo())) return;
     271                if (!offsetServer.isLayerSupported(info)) return;
    272272                offsetServerSupported = true;
    273273            }
  • trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java

    r3847 r3852  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.io.imagery;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.io.BufferedReader;
     
    2527        try {
    2628            URL url = new URL(this.url + "action=CheckAvailability&id=" + URLEncoder.encode(info.getFullUrl(), "UTF-8"));
     29            System.out.println(tr("Querying offset availability: {0}", url));
    2730            final BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream(), "UTF-8"));
    2831            String response = rdr.readLine();
     32            System.out.println(tr("Offset server response: {0}", response));
    2933            if (response.contains("\"offsets_available\": true")) return true;
    3034        } catch (Exception e) {
     
    3842        LatLon ll = Main.proj.eastNorth2latlon(en);
    3943        try {
    40             URL url = new URL(this.url + "action=GetOffsetForPoint&lat=" + ll.lat() + "&lon=" + ll.lon() + "&id=" + URLEncoder.encode(info.getUrl(), "UTF-8"));
     44            URL url = new URL(this.url + "action=GetOffsetForPoint&lat=" + ll.lat() + "&lon=" + ll.lon() + "&id=" + URLEncoder.encode(info.getFullUrl(), "UTF-8"));
     45            System.out.println(tr("Querying offset: {0}", url.toString()));
    4146            final BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream(), "UTF-8"));
    4247            String s = rdr.readLine();
Note: See TracChangeset for help on using the changeset viewer.