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

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

Introduction

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

Prototype

int POSTAL_CODE

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

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;/*ww w.  java 2s .c om*/
    } 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  ava 2 s. co m*/
    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;
    }
}