Closed GoogleCodeExporter closed 8 years ago
Issue 516 has been merged into this issue.
Original comment by kurtzm...@gmail.com
on 20 Jan 2014 at 5:21
This issue was updated by revision r1401.
Add user-agent field to TileSource.
Set proper user-agent for some tile sources like Mapnik.
Added createHttpClient() method to MapTileDownloader.
Original comment by kurtzm...@gmail.com
on 20 Jan 2014 at 5:34
I think the proper way to implement this is to associate the user-agent with
the TileSource (which define the "instructions" for how to pull tiles from the
server). However, I think it's worth it to add a createHttpClient() protected
method for overriding for further customization if needed.
We will probably post a new version soon.
Original comment by kurtzm...@gmail.com
on 20 Jan 2014 at 5:39
Hi,
May I ask why the change of aBaseUrl parameter from varargs to String[] ?
Best regards, Emux
https://play.google.com/store/apps/details?id=gr.talent.cruiser
Original comment by devemu...@gmail.com
on 20 Jan 2014 at 7:03
Sure - that was an intentional change. The problem is that the TileSource
constructor parameters were taking a bunch of String arguments followed by a
varargs String parameter(s). So if I add a new String parameter before the
varargs parameter, then all existing TileSources would continue to compile
without any error but now they would be incorrect since the first "url" would
now be used as the User-Agent. By changing to String[] we force implementors to
deal with the change and force them to address the new userAgent parameter
(this also applies to any String parameters we add in the future). I hope that
makes sense.
Original comment by kurtzm...@gmail.com
on 20 Jan 2014 at 7:09
This issue was updated by revision r1402.
Rolled back some of the previous changes. Instead of per-tile source
user-agents, use a global one which better meets the definition/use of
user-agent.
Added global user-agent to HttpClientFactory. Custom user-agents can easily be
installed here at run-time.
Original comment by kurtzm...@gmail.com
on 20 Jan 2014 at 8:35
I rolled back some of those changes. By definition, the user-agent should be
one value and not a per-tile source value. So instead we set the default
user-agent in the HttpClientFactory (where it really belongs).
If you want to set a custom user-agent, then simply create your own factory for
HttpClientFactory.
Finally, I left in the varargs to String[] change. If we want to add parameters
to that class later it will be a problem and I feel like it's better to change
it now.
Original comment by kurtzm...@gmail.com
on 20 Jan 2014 at 8:41
Original comment by neilboyd
on 21 Jan 2014 at 8:34
Issue 517 has been merged into this issue.
Original comment by neilboyd
on 21 Jan 2014 at 8:36
Fixed in release 4.1
Original comment by neilboyd
on 25 Jan 2014 at 6:08
Original issue reported on code.google.com by
sto...@gmail.com
on 20 Jan 2014 at 1:24