com.google.maps.gwt.client.StreetViewService 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;
/**
* A
* StreetViewService
*
* object performs searches for Street View data.
*
* THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
*/
public class StreetViewService extends JavaScriptObject {
/**
* Callback type for handling asynchronous responses from getPanoramaByLocation.
*/
public interface Callback {
/**
* Called by the callback handler
*/
void handle(StreetViewPanoramaData a, StreetViewStatus b);
}
/**
* Callback type for handling asynchronous responses from getPanoramaById.
*/
public interface GetPanoramaByIdCallback {
/**
* Called by the callback handler
*/
void handle(StreetViewPanoramaData a, StreetViewStatus b);
}
public static native StreetViewService create()/*-{
return new $wnd.google.maps.StreetViewService();
}-*/;
/**
* Protected constructor avoids default public constructor.
*/
protected StreetViewService() {
/* Java constructor is protected, */
}
/**
* Retrieves the data for the given pano id and passes it to the
* provided callback as a
* StreetViewPanoramaData
*
* object. Pano ids are unique per panorama and stable for the lifetime
* of a session, but are liable to change between sessions.
*/
public final native void getPanoramaById(String pano, GetPanoramaByIdCallback callback)/*-{
var _callback = $entry(function(a, _b) {
var b = (_b == undefined) ?
null : @com.google.maps.gwt.client.StreetViewStatus::fromValue(Ljava/lang/String;)(_b);
callback.@com.google.maps.gwt.client.StreetViewService.GetPanoramaByIdCallback::handle(Lcom/google/maps/gwt/client/StreetViewPanoramaData;Lcom/google/maps/gwt/client/StreetViewStatus;)(a,b);
});
this.getPanoramaById(pano, _callback);
}-*/;
/**
* Retrieves the
* StreetViewPanoramaData
*
* for a panorama within a given radius of the given
* LatLng
*
* . The
* StreetViewPanoramaData
*
* is passed to the provided callback. If the radius is less than 50
* meters, the nearest panorama will be returned.
*/
public final native void getPanoramaByLocation(LatLng latlng, double radius, Callback callback)/*-{
var _callback = $entry(function(a, _b) {
var b = (_b == undefined) ?
null : @com.google.maps.gwt.client.StreetViewStatus::fromValue(Ljava/lang/String;)(_b);
[email protected]::handle(Lcom/google/maps/gwt/client/StreetViewPanoramaData;Lcom/google/maps/gwt/client/StreetViewStatus;)(a,b);
});
this.getPanoramaByLocation(latlng, radius, _callback);
}-*/;
}