Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps API - geocoding accuracy chart?

Where in the Google Maps API docs can I find a table explaining the accuracy values of Geocode lookups?

Has the range of values changed in between V2 and V3?

like image 510
Pekka Avatar asked May 18 '10 17:05

Pekka


2 Answers

Here are the Google Maps API Docs. It contains a table with accuracy values...

http://code.google.com/apis/maps/documentation/reference.html#GGeoAddressAccuracy

Constant | Description
0 Unknown location.
1 Country level accuracy.
2 Region (state, province, prefecture, etc.) level accuracy.
3 Sub-region (county, municipality, etc.) level accuracy.
4 Town (city, village) level accuracy.
5 Post code (zip code) level accuracy.
6 Street level accuracy.
7 Intersection level accuracy.
8 Address level accuracy.
9 Premise (building name, property name, shopping center, etc.) level accuracy.

like image 196
John Himmelman Avatar answered Nov 14 '22 18:11

John Himmelman


Here are the real status answers from geocoder:

You can output the status inside your geocoding function:

myMap.geocoder.geocode( 
    { address: someAdress } ), 
    function ( responses, status ) { 
        console.log( status );
    }
);

When passing the status, you can switch those four values:

    switch ( status )
    {
        case 'ROOFTOP' :
            var precision = 'precise';
            break;
        case 'RANGE_INTERPOLATED' :
            var precision = 'interpolated';
            break;
        case 'APPROXIMATE' :
            var precision = 'approximately';
            break;
        case 'ZERO_RESULTS' :
            var precision = 'no address';
            break;
    }
like image 39
kaiser Avatar answered Nov 14 '22 20:11

kaiser