Example usage for com.google.gwt.maps.client.geocode GeoAddressAccuracy COUNTRY

List of usage examples for com.google.gwt.maps.client.geocode GeoAddressAccuracy COUNTRY

Introduction

In this page you can find the example usage for com.google.gwt.maps.client.geocode GeoAddressAccuracy COUNTRY.

Prototype

int COUNTRY

To view the source code for com.google.gwt.maps.client.geocode GeoAddressAccuracy COUNTRY.

Click Source Link

Usage

From source file:org.maps.client.Maps.java

License:Apache License

private int getZoom(int accuracy) {
    int answer = 0;
    if (accuracy == GeoAddressAccuracy.ADDRESS) {
        answer = 15;//w  ww  . jav  a  2s . co  m
    } else if (accuracy == GeoAddressAccuracy.COUNTRY) {
        answer = 4;
    } else if (accuracy == GeoAddressAccuracy.INTERSECTION) {
        answer = 11;
    } else if (accuracy == GeoAddressAccuracy.POSTAL_CODE) {
        answer = 11;
    } else if (accuracy == GeoAddressAccuracy.REGION) {
        answer = 5;
    } else if (accuracy == GeoAddressAccuracy.SUB_REGION) {
        answer = 8;
    } else if (accuracy == GeoAddressAccuracy.TOWN) {
        answer = 12;
    }
    //System.out.println("zoom: " + answer);
    return answer;
}

From source file:org.onebusaway.webapp.gwt.where_library.GeocoderAccuracyToBounds.java

License:Apache License

public static int getZoomLevelForAccuracy(int accuracy) {
    switch (accuracy) {
    case 10://from w w  w.j a  v  a2s  .c om
    case 9:
    case GeoAddressAccuracy.ADDRESS:
    case GeoAddressAccuracy.INTERSECTION:
        return 17;
    case GeoAddressAccuracy.STREET:
        return 15;
    case GeoAddressAccuracy.POSTAL_CODE:
        return 14;
    case GeoAddressAccuracy.TOWN:
        return 12;
    case GeoAddressAccuracy.SUB_REGION:
        return 11;
    case GeoAddressAccuracy.REGION:
        return 7;
    case GeoAddressAccuracy.COUNTRY:
        return 4;
    default:
        return 13;
    }
}