Changeset 3852 in josm
- Timestamp:
- 2011-02-04T10:16:38+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java
r3847 r3852 269 269 public void run() { 270 270 if (!offsetServerSupported) { 271 if (!offsetServer.isLayerSupported( getInfo())) return;271 if (!offsetServer.isLayerSupported(info)) return; 272 272 offsetServerSupported = true; 273 273 } -
trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java
r3847 r3852 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.io.imagery; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.io.BufferedReader; … … 25 27 try { 26 28 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)); 27 30 final BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream(), "UTF-8")); 28 31 String response = rdr.readLine(); 32 System.out.println(tr("Offset server response: {0}", response)); 29 33 if (response.contains("\"offsets_available\": true")) return true; 30 34 } catch (Exception e) { … … 38 42 LatLon ll = Main.proj.eastNorth2latlon(en); 39 43 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())); 41 46 final BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream(), "UTF-8")); 42 47 String s = rdr.readLine();
Note:
See TracChangeset
for help on using the changeset viewer.