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)
);
}