Ignore:
Timestamp:
2011-01-28T19:11:36+01:00 (14 years ago)
Author:
bastik
Message:

set timeout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/BingAerialTileSource.java

    r24763 r25172  
    55import java.io.InputStream;
    66import java.net.URL;
     7import java.net.URLConnection;
    78import java.util.ArrayList;
    89import java.util.List;
     
    1314import javax.imageio.ImageIO;
    1415
     16import org.openstreetmap.josm.Main;
    1517import org.xml.sax.Attributes;
    1618import org.xml.sax.InputSource;
     
    104106        try {
    105107            URL u = new URL("http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial/0,0?zl=1&mapVersion=v1&key="+API_KEY+"&include=ImageryProviders&output=xml");
    106             InputStream stream = u.openStream();
     108            URLConnection conn = u.openConnection();
     109            conn.setConnectTimeout(Main.pref.getInteger("imagery.bing.load-attribution-text.timeout", 4000));
     110            InputStream stream = conn.getInputStream();
     111           
    107112            XMLReader parser = XMLReaderFactory.createXMLReader();
    108113            AttrHandler handler = new AttrHandler();
Note: See TracChangeset for help on using the changeset viewer.