Comments (3)
Could you provide some more detail of what you are sending and receiving and how the data differs from what you expect?
from geocoding.net.
I am just sending 2 address in Australia
foreach (string destination_address in destination_addresses)
{
IGeocoder geocoder = new GoogleGeocoder() { ApiKey = "xxxxxx" };
IEnumerable<Address> address = geocoder.Geocode(destination_address);
if (address.Count() != 0)
{
addresses.Add(address.First());
Console.WriteLine("Formatted: " + address.First().FormattedAddress);
Console.WriteLine("Coordinates: " + address.First().Coordinates.Latitude + ", " + addresses.First().Coordinates.Longitude);
//Console.ReadKey();
}
geocoder = null;
address = null;
}
from geocoding.net.
@georgioua You enumerate the IEnumerable 4 times in your loop. Thus, you call the Geocode function 4 times. I suppose you get more than one result and the result from System.Linq.First() delivers the other result on your second query, wether it is because Google returned them in another order or the Geocode function does something with the order.
Please provide the console output from this code: (change ApiKey & destinationAddress)
using (IGeocoder geocoder = new GoogleGeocoder() { ApiKey = "xxxxxx" }){
string destinationAddress = "###";
Console.WriteLine("Query string: ", destinationAddress);
for (int i=0; i<2; i++){
Console.WriteLine("========");
Console.WriteLine("Query #: ", i);
Address[] address = geocoder.Geocode(destinationAddress).ToArray();
for (int j=0; j < address.Length; j++){
Console.WriteLine("Result #: " + j);
Address a = address[j];
Console.WriteLine("Formatted: " + a.FormattedAddress);
Console.WriteLine("Coordinates: " + a.Coordinates.Latitude + ", " + a.Coordinates.Longitude);
}
}
}
from geocoding.net.
Related Issues (20)
- Here Geocoding xml parsing exception on response when account inactive or invalid HOT 4
- Altitude feature request
- address does not contain definition of IsPartialMatch
- Add support for returning Confidence level if available.
- Lastest GeoCoding.NET 3.6.1 on Nuget doesn't support HERE Geocoding HOT 2
- The HERE API now only supports API Keys and OAuth 2.0 Tokens, App Code Credentials are no longer being supported for new account.. HOT 2
- Tasks GeocodeAsync and reverse not marked as async HOT 1
- Localization HOT 1
- ArgumentNullException thrown when address is empty
- Geocoding.Here package is not on Nuget? HOT 2
- Can someone help me figure out how to use this? HOT 1
- Google Geocode returns only one candidate
- Lack of Result Type filters for ReverseGeocode in GoogleGeocoder
- MapQuest requests should include a charset in headers HOT 1
- MapQuestGeocoder does not return addresses where Quality=NEIGHBORHOOD
- Remove Yahoo provider
- Update Geocoding.Here to latest API
- Can't get GoogleGeoLoc to work HOT 1
- geoding:Google doesn't work HOT 5
- Missing Bing EntityType enum value `PointOfInterest` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geocoding.net.