Open GoogleCodeExporter opened 8 years ago
Issue 200 has been merged into this issue.
Original comment by kurtzm...@gmail.com
on 15 May 2011 at 11:06
Looks okay, but I have some questions.
1. What's the difference between NUMBER_OF_TILE_DOWNLOAD_THREADS and
MAX_HTTP_CONNECTION?
2. Why do you set a fake user agent?
3. Did you copy HttpClientFactory from somewhere? Does it have a license?
Original comment by neilboyd
on 17 May 2011 at 9:50
NUMBER_OF_TILE_DOWNLOAD_THREADS limits the number of fetching threads, so as
not to block other
MAX_HTTP_CONNECTION is basically useless ;) i forgot to remove
User-Agent is useful when using other maps servers, Bing Ovi etc...
HttpClientFactory copied code from another of my project
HttpClientFactory should look like this
public class HttpClientFactory implements OpenStreetMapTileProviderConstants {
public static DefaultHttpClient getThreadSafeClient() {
final SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
final HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, HTTP.UTF_8);
HttpProtocolParams.setUseExpectContinue(params, false);
final ThreadSafeClientConnManager manager = new ThreadSafeClientConnManager(params, schemeRegistry);
final DefaultHttpClient mClient = new DefaultHttpClient(manager, params);
return mClient;
}
}
Original comment by 828...@gmail.com
on 17 May 2011 at 10:58
Seems a little over-complicated and it's hard for me to say whether that's
justified, so I'll say it's okay.
@Marc, do you want to commit this since you're the owner?
Original comment by neilboyd
on 19 May 2011 at 8:31
See also issue 273
Original comment by neilboyd
on 12 Nov 2011 at 12:32
Original issue reported on code.google.com by
kurtzm...@gmail.com
on 15 May 2011 at 10:48Attachments: