001 package com.google.gwt.maps.client.services; 002 003 import com.google.gwt.core.client.JavaScriptObject; 004 import com.google.gwt.maps.client.base.LatLng; 005 006 /** 007 * A service for obtaining the highest zoom level at which satellite imagery is available for a given location. 008 * <br><br> 009 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#MaxZoomService">MaxZoomService API Doc</a> 010 */ 011 public class MaxZoomService extends JavaScriptObject { 012 013 /** 014 * use newInstance(); 015 */ 016 protected MaxZoomService() {} 017 018 /** 019 * A service for obtaining the highest zoom level at which satellite imagery is available for a given location. 020 */ 021 public static final MaxZoomService newInstance() { 022 return createJso().cast(); 023 } 024 025 private static final native JavaScriptObject createJso() /*-{ 026 return new $wnd.google.maps.MaxZoomService(); 027 }-*/; 028 029 /** 030 * Returns the maximum zoom level available at a particular LatLng for the Satellite map type. As this request is asynchronous, you must pass a callback function which will be executed upon completion of the request, being passed a MaxZoomResult. 031 * @param latlng 032 * @param handler 033 */ 034 public final native void getMaxZoomAtLatLng(LatLng latlng, MaxZoomServiceHandler handler) /*-{ 035 var callback = function(result) { 036 @com.google.gwt.maps.client.services.MaxZoomService::getMaxZoomAtLatLngImpl(Lcom/google/gwt/maps/client/services/MaxZoomResult;Lcom/google/gwt/maps/client/services/MaxZoomServiceHandler;)(result, handler); 037 }; 038 this.getMaxZoomAtLatLng(latlng, callback); 039 }-*/; 040 041 private static final void getMaxZoomAtLatLngImpl(MaxZoomResult result, MaxZoomServiceHandler handler) { 042 handler.onCallback(result); 043 } 044 045 }