All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.maps.gwt.client.MaxZoomStatus Maven / Gradle / Ivy

/*
 * Copyright 2011 The Google Web Toolkit Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.maps.gwt.client;

import com.google.gwt.core.client.JavaScriptObject;
import java.util.HashMap;
import java.util.Map;

/**
 * The status returned by the 
 * MaxZoomService
 * 
 * on the completion of a call to 
 * getMaxZoomAtLatLng()
 * 
 * .
 *
 * THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
 */
public class MaxZoomStatus extends JavaScriptObject {

  /**
   * There was a problem contacting the Google servers.
   */ 
  public static final MaxZoomStatus ERROR = getError();

  /**
   * The request was successful.
   */ 
  public static final MaxZoomStatus OK = getOk();

  /**
   * Internal registry for value types.
   */ 
  private static Map registry;

  /**
   * Access the enum instance using the underlying value of the type.
   */ 
  public static final MaxZoomStatus fromValue(String value){
    return registry.get(value);
  }

  /**
   * Internal initialization method.
   */ 
  private static final native MaxZoomStatus getError()/*-{
    var instance = { 'value' : $wnd.google.maps.MaxZoomStatus.ERROR };
    @com.google.maps.gwt.client.MaxZoomStatus::register(Lcom/google/maps/gwt/client/MaxZoomStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal initialization method.
   */ 
  private static final native MaxZoomStatus getOk()/*-{
    var instance = { 'value' : $wnd.google.maps.MaxZoomStatus.OK };
    @com.google.maps.gwt.client.MaxZoomStatus::register(Lcom/google/maps/gwt/client/MaxZoomStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal registration of type for future access.
   */ 
  private static final void register(MaxZoomStatus value){
    if (registry == null) {
      registry = new HashMap();
    }
    registry.put(value.getValue(),value);
  }


  /**
   * Protected constructor avoids default public constructor.
   */
  protected MaxZoomStatus() {
    /* Java constructor is protected, */
  }

  /**
   * Access the underlying value of the type.
   */ 
  public final native String getValue()/*-{
    return this.value;
  }-*/;

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy