Example usage for com.google.gwt.maps.client.streetview StreetViewStatus OK

List of usage examples for com.google.gwt.maps.client.streetview StreetViewStatus OK

Introduction

In this page you can find the example usage for com.google.gwt.maps.client.streetview StreetViewStatus OK.

Prototype

StreetViewStatus OK

To view the source code for com.google.gwt.maps.client.streetview StreetViewStatus OK.

Click Source Link

Document

The request was successful.

Usage

From source file:com.google.gwt.maps.testing.client.maps.StreetViewSideBySideMapWidget.java

License:Apache License

private void processPanoSearch(LatLng latlng, final StreetViewPanoramaData data, StreetViewStatus status) {
    if (status != StreetViewStatus.OK) {
        // TODO error
        return;/*from ww w  . j  a v  a 2  s .  co m*/
    }

    if (data == null) {
        // TODO error
        return;
    }

    // setup marker for location clicked
    MarkerOptions options = MarkerOptions.newInstance();
    options.setClickable(true);
    options.setPosition(latlng);
    options.setMap(mapWidget);
    options.setTitle(data.getLocation().getDescription());

    Marker marker = Marker.newInstance(options);

    // move back on click
    marker.addClickHandler(new ClickMapHandler() {
        public void onEvent(ClickMapEvent event) {
            moveStreetView(data);
        }
    });

    // move
    moveStreetView(data);
}