He're的MaxZoomService的源代碼,好像沒有選項或任何其他功能允許你這樣做:/
http://grepcode.com/file/repo1.maven.org/maven2/com.lynden/GMapsFX/1.1.1/com/lynden/gmapsfx/zoom/MaxZoomService.java#MaxZoomService.%3Cinit%3E%28%29
public class More ...MaxZoomService extends JavascriptObject {
private MaxZoomServiceCallback callback;
public MaxZoomService() {
super(GMapObjectType.MAX_ZOOM_SERVICE);
}
public void getMaxZoomAtLatLng(LatLong loc, MaxZoomServiceCallback callback) {
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("document");
doc.setMember(getVariableName(), this);
StringBuilder r = new StringBuilder(getVariableName())
.append(".")
.append("getMaxZoomAtLatLng(")
.append(loc.getVariableName())
.append(", ")
.append("function(result) {document.")
.append(getVariableName())
.append(".processResponse(result);});");
System.out.println("MaxZoomService direct call: " + r.toString());
getJSObject().eval(r.toString());
}
}
我想你有將其硬編碼爲18,另一種選擇是檢查19,20,21,但這太慢了,因爲您必須等待Google的響應。