Directory

← Back

Street View Extension for GoogleMaps Add-on

Server-side Street View control support for GoogleMaps Add-on

Author

Rating

Popularity

<100

Street View support for GoogleMaps Add-on for Vaadin 7!

The extension allows controlling Street View of Google Maps from the server-side of Vaadin. It also provides a listener interface that can be used to follow client-side actions.

Usage

Add the extension to your project, compile your widgetset and finally extend an existing Google Maps instance:

GoogleMapStreetView view = new GoogleMapStreetView(map);

In order to follow user actions while using Street View, add a GoogleMapStreetViewListener to the StreetView instance:

streetView.addStreetViewListener(
    new GoogleMapStreetViewListener() {
    public void visibilityChanged(boolean v) {
        System.out.println(
            String.format(
                "StreetView visible: %s",
                String.valueOf(v))
        );
    }

    public void positionChanged(LatLon p) {
        System.out.println(
            String.format("New position"
                + " with lat: %.14f, lon: %.14f",
                p.getLat(), p.getLon())
        );
    }

    public void povChanged(int h, int p, int z) {
        System.out.println(
            String.format("New POV with"
                + " heading: %d°,"
                + " pitch: %d°,"
                + " zoom %d",
                h, p, z)
        );
    }

Sample code

GoogleMap googleMap = new GoogleMap(null, null, null);
googleMap.setCenter(new LatLon(60.44875000000000, 22.27702299999999));
googleMap.setZoom(10);
googleMap.setSizeFull();
mapLayout.addComponent(googleMap);

GoogleMapStreetView streetView = new GoogleMapStreetView(googleMap);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Modified the extension so that it implements properly the updated GoogleMapInitListener of Maps Add-on 1.1.2.

Released
2015-06-28
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.4+
Browser
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Internet Explorer
iOS Browser
Android Browser
Internet Explorer
Internet Explorer
Windows Phone

Street View Extension for GoogleMaps Add-on - Vaadin Add-on Directory

Server-side Street View control support for GoogleMaps Add-on Street View Extension for GoogleMaps Add-on - Vaadin Add-on Directory
Street View support for [GoogleMaps Add-on for Vaadin 7](https://vaadin.com/addon/googlemaps-add-on)! The extension allows controlling Street View of Google Maps from the server-side of Vaadin. It also provides a listener interface that can be used to follow client-side actions. ## Usage ## Add the extension to your project, compile your widgetset and finally extend an existing Google Maps instance: GoogleMapStreetView view = new GoogleMapStreetView(map); In order to follow user actions while using Street View, add a `GoogleMapStreetViewListener` to the `StreetView` instance: streetView.addStreetViewListener( new GoogleMapStreetViewListener() { public void visibilityChanged(boolean v) { System.out.println( String.format( "StreetView visible: %s", String.valueOf(v)) ); } public void positionChanged(LatLon p) { System.out.println( String.format("New position" + " with lat: %.14f, lon: %.14f", p.getLat(), p.getLon()) ); } public void povChanged(int h, int p, int z) { System.out.println( String.format("New POV with" + " heading: %d°," + " pitch: %d°," + " zoom %d", h, p, z) ); }
Online Demo
Issue Tracker
Source Code
Discussion Forum

Street View Extension for GoogleMaps Add-on version 0.1.2
Modified the extension so that it implements properly the updated `GoogleMapInitListener` of Maps Add-on 1.1.2.

Online