Ignore:
Timestamp:
2011-07-14T12:48:27+02:00 (13 years ago)
Author:
bastiK
Message:

see #6532 - add support for xml imagery source format

(todo: the specified server projections aren't used properly in WMSGrabber)

Location:
trunk/src/org/openstreetmap/josm/io/imagery
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java

    r4126 r4240  
    2626    public boolean isLayerSupported(ImageryInfo info) {
    2727        try {
    28             URL url = new URL(this.url + "action=CheckAvailability&id=" + URLEncoder.encode(info.getFullUrl(), "UTF-8"));
     28            URL url = new URL(this.url + "action=CheckAvailability&id=" + URLEncoder.encode(info.getUrl(), "UTF-8"));
    2929            System.out.println(tr("Querying offset availability: {0}", url));
    3030            final BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream(), "UTF-8"));
     
    4242        LatLon ll = Main.getProjection().eastNorth2latlon(en);
    4343        try {
    44             URL url = new URL(this.url + "action=GetOffsetForPoint&lat=" + ll.lat() + "&lon=" + ll.lon() + "&id=" + URLEncoder.encode(info.getFullUrl(), "UTF-8"));
     44            URL url = new URL(this.url + "action=GetOffsetForPoint&lat=" + ll.lat() + "&lon=" + ll.lon() + "&id=" + URLEncoder.encode(info.getUrl(), "UTF-8"));
    4545            System.out.println(tr("Querying offset: {0}", url.toString()));
    4646            final BufferedReader rdr = new BufferedReader(new InputStreamReader(url.openConnection().getInputStream(), "UTF-8"));
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java

    r4228 r4240  
    1919import java.text.NumberFormat;
    2020import java.util.ArrayList;
     21import java.util.List;
    2122import java.util.Map.Entry;
    2223import java.util.Locale;
     
    4748    protected String baseURL;
    4849    private final boolean urlWithPatterns;
     50    private List<String> serverProjections;
    4951    private Map<String, String> props = new HashMap<String, String>();
    5052
     
    5254        super(mv, layer);
    5355        this.baseURL = layer.getInfo().getUrl();
     56        this.serverProjections = layer.getServerProjections();
    5457        /* URL containing placeholders? */
    5558        urlWithPatterns = ImageryInfo.isUrlWithPatterns(baseURL);
     
    139142        } else {
    140143            str += "bbox=" + bbox
    141             + srs
    142             + "&width=" + wi + "&height=" + ht;
     144                    + srs
     145                    + "&width=" + wi + "&height=" + ht;
    143146            if (!(baseURL.endsWith("&") || baseURL.endsWith("?"))) {
    144147                System.out.println(tr("Warning: The base URL ''{0}'' for a WMS service doesn't have a trailing '&' or a trailing '?'.", baseURL));
Note: See TracChangeset for help on using the changeset viewer.