Ignore:
Timestamp:
2005-12-22T23:54:50+01:00 (20 years ago)
Author:
imi
Message:
  • fixed bug in movement that lat/lon was not updated
  • upload of nodes (disabled since untested)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/io/OsmServerReader.java

    r31 r34  
    1010
    1111import org.jdom.JDOMException;
     12import org.openstreetmap.josm.Main;
    1213import org.openstreetmap.josm.data.GeoPoint;
    1314import org.openstreetmap.josm.data.osm.DataSet;
     
    2122
    2223        /**
    23          * The url string of the desired map data.
     24         * The boundings of the desired map data.
    2425         */
    25         private String urlStr;
    2626        private final double lat1;
    2727        private final double lon1;
     
    3232         * Construct the reader and store the information for attaching
    3333         */
    34         public OsmServerReader(String server,
    35                         double lat1, double lon1, double lat2, double lon2) {
     34        public OsmServerReader(double lat1, double lon1, double lat2, double lon2) {
    3635                this.lon2 = lon2;
    3736                this.lat2 = lat2;
    3837                this.lon1 = lon1;
    3938                this.lat1 = lat1;
    40                 urlStr = server.endsWith("/") ? server : server+"/";
    4139        }
    4240
     
    4947         */
    5048        public Collection<Collection<GeoPoint>> parseRawGps() throws IOException, JDOMException {
    51                 String url = urlStr+"trackpoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page=";
     49                String url = Main.pref.osmDataServer+"/trackpoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page=";
    5250                Collection<Collection<GeoPoint>> data = new LinkedList<Collection<GeoPoint>>();
    5351                Collection<GeoPoint> list = new LinkedList<GeoPoint>();
     
    8078         */
    8179        public DataSet parseOsm() throws JDOMException, IOException {
    82                 Reader r = getReader(urlStr+"map?bbox="+lon1+","+lat1+","+lon2+","+lat2);
     80                Reader r = getReader(Main.pref.osmDataServer+"/map?bbox="+lon1+","+lat1+","+lon2+","+lat2);
    8381                if (r == null)
    8482                        return null;
     
    9593        private Reader getReader(String urlStr) throws IOException {
    9694                initAuthentication();
     95                System.out.println(urlStr);
    9796                URL url = new URL(urlStr);
    9897                HttpURLConnection con = (HttpURLConnection)url.openConnection();
Note: See TracChangeset for help on using the changeset viewer.