Setha i-GoogleGeocoder.Proxy ngaphambi kokuthi i-Geocoding.NET iqale isicelo sayo
Hlela i-WebProxy ne-akhawunti ye-geocoder ngokuhlukile kukhiye we-Maps API.
var geocoder = new Geocoding.Google.GoogleGeocoder(apiKey)
{
Proxy = new System.Net.WebProxy("http://proxy.example:8080")
{
Credentials = new System.Net.NetworkCredential(
proxyUser, proxyPassword)
}
};Sebenzisa ukhiye we-API wohlelo kanye ne-akhawunti yomlamuli, bese ushayela GeocodeAsync noma ReverseGeocodeAsync ngaleli geocoder elihleliwe. Shiya i-Credentials uma umlamuli ungadingi ukuqinisekiswa. Uma kunjalo, uhlu lwama-proxy e-HTTP lunikeza abazongenela uma izicelo zomphakathi ze-geocoding zivunyelwe ngabalamuli bomphakathi.
Indlela yesicelo ye-Geocoding.NET idala i-HttpClientHandler futhi yabela impahla yayo yomphakathi i-IWebProxy. Enye i-HttpClient ehlelwe kwenye indawo ayithathi indawo yaleyo ndlela.
Gcina impendulo ye-407 yomlamuli ihlukile empendulweni ye-Google yokhiye ongavumelekile noma isicelo esenqatshiwe. Ekufakazeni okuhlanganisiwe, sebenzisa ubunikazi noma isizinda se-Windows esifanele leyo proxy esikhundleni sokufaka ukhiye we-Maps njengephasiwedi ye-proxy.