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

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

Introduction

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

Prototype

int INTERSECTION

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

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 .ja  va  2s.  com*/
    } 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 ww .j a va  2  s. c  o 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;
    }
}