Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

Accuracy is alway UnknownLocation

Last post 02-13-2010, 20:04 by jjrdk. 7 replies.
Sort Posts: Previous Next
  •  07-09-2009, 15:57 2623

    Accuracy is alway UnknownLocation

    Doing a geocoding I get all Locations details fine (address, point, etc) while Accuracy is always = UnknownLocation even when the address has full details (i.e. Street).

    A bug?

     

    P.S. This is the third .net gamp control that I change to develop my app and yours is by far the best! Congrats and thanks to make it available to all.
    This Accuracy problem is not serious, we can work with some workaround, I really hope you can look into the other bug I posted about (<div> in OpenInfoWindowHTML), that one would prevent me from using your control :( 

  •  07-09-2009, 16:45 2624 in reply to 2623

    Re: Accuracy is alway UnknownLocation

    Can you possibly post the whole geocode response? If Google marks the result as UnkownLocation, that is what gets passed on.

    Regarding your other question, then I will have a look at it later today. 

  •  07-13-2009, 9:57 2641 in reply to 2624

    Re: Accuracy is alway UnknownLocation

    This is the code I use:
    string Key = ConfigurationManager.AppSettings["gmkey"];
    Reimers.Map.Geocoding.GoogleResult result = Reimers.Map.Geocoding.GoogleGeocoder.Geocode("viale romagna, milano", Key);

    result contains:
    Accuracy = UnknownLocation
    Address = {Viale Romagna, 20133, Milan, Lombardy, IT}
    Error = ""
    Point = {GLatLng(45.4742049, 9.2239901)}

    while with http://maps.google.com/maps/geo?q=viale+romagna,+milano&output=json&oe=utf8&sensor=false&key=mykey I get:

    {
    "name": "viale romagna, milano",
    "Status": {
    "code": 200,
    "request": "geocode"
    },
    "Placemark": [ {
    "id": "p1",
    "address": "Viale Romagna, 20133 Milano, Italia",
    "AddressDetails": {"Country": {"CountryNameCode": "IT","CountryName": "Italia","AdministrativeArea": {"AdministrativeAreaName": "Lombardia","SubAdministrativeArea": {"SubAdministrativeAreaName": "Milano","Locality": {"LocalityName": "Milano","Thoroughfare":{"ThoroughfareName": "Viale Romagna"},"PostalCode": {"PostalCodeNumber": "20133"}}}}},"Accuracy": 6},
    "ExtendedData": {
    "LatLonBox": {
    "north": 45.4797998,
    "south": 45.4686502,
    "east": 9.2272719,
    "west": 9.2209767
    }
    },
    "Point": {
    "coordinates": [ 9.2239901, 45.4742049, 0 ]
    }
    } ]
    }

    where accuracy is 6.

  •  07-13-2009, 10:10 2642 in reply to 2641

    Re: Accuracy is alway UnknownLocation

    It looks like the accuracy is now inside the AddressDetails object and not in the general response object. So you would need to update the AddressConverter to read the accuracy as well and take it out of the LocationConverter.
  •  07-13-2009, 10:17 2645 in reply to 2642

    Re: Accuracy is alway UnknownLocation

    I'll look into sources trhen, thanks!

    I think this is the right chance to ask you a question. The control is now OpenSource, does this mean that other can contribute? I mean, if I manage to fix this bug I'd like to submit you the fix, is that possible / an option?

      

  •  07-13-2009, 10:22 2647 in reply to 2645

    Re: Accuracy is alway UnknownLocation

    I'm always happy to implement contributions from users, and I will write credits in the source code.
  •  02-12-2010, 18:27 3003 in reply to 2642

    Re: Accuracy is alway UnknownLocation

    jjrdk,

    having similar issue as pmonte.  getting the georesults but how do i get addressdetail obj.

    can you provide sample code as to how to extract the accuracy from the addressdetails obj?

     

     

  •  02-13-2010, 20:04 3007 in reply to 3003

    Re: Accuracy is alway UnknownLocation

    Can you be a bit clearer about what you want to do? The Address class has an Accuracy property which is the easiest way to get the accuracy.
View as RSS news feed in XML