Closed sawcheg closed 2 years ago
There is a much easier way to accomplish this using the standard Microsoft DI library.
Using GeocoderIntegrationTests
as an example, you can simply register a geocoder with an URL override such as this:
serviceCollection.AddScoped(typeof(IForwardGeocoder),
s => new ForwardGeocoder(s.GetService<INominatimWebInterface>(), "https://some.other.url/"));
I can adapt this to use IConfiguration
down the road, but I don't think what you are trying to accomplish merits a major refactoring of the library.
If you run into any other issues, please file an issue and I will be happy to help.
Hi, I use your nuget package in my projects. after updating to version 2.0, I ran into the problem of dynamically changing the base Url.
Therefore, I slightly modified the code, while simplifying the use of the API. Also I fixed the tests.
Please review the changes and include them in the next package update.