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

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

Introduction

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

Prototype

int SUB_REGION

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

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;//from ww  w .  j  ava2s  .c o  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://w  w  w.  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;
    }
}