[Commits] r1515 - in sandbox/cmoullet/ux/StreetViewPanel: examples ux/widgets
commits at geoext.org
commits at geoext.org
Sun Nov 29 07:02:01 CET 2009
Author: cmoullet
Date: 2009-11-29 07:02:00 +0100 (Sun, 29 Nov 2009)
New Revision: 1515
Modified:
sandbox/cmoullet/ux/StreetViewPanel/examples/StreetViewPanelExample.js
sandbox/cmoullet/ux/StreetViewPanel/ux/widgets/StreetViewPanel.js
Log:
Smooth transition in video mode
Modified: sandbox/cmoullet/ux/StreetViewPanel/examples/StreetViewPanelExample.js
===================================================================
--- sandbox/cmoullet/ux/StreetViewPanel/examples/StreetViewPanelExample.js 2009-11-28 23:15:04 UTC (rev 1514)
+++ sandbox/cmoullet/ux/StreetViewPanel/examples/StreetViewPanelExample.js 2009-11-29 06:02:00 UTC (rev 1515)
@@ -23,8 +23,6 @@
layer = new OpenLayers.Layer.Google(
"Google Street", {sphericalMercator: true});
- //extent.transform(new OpenLayers.Projection("EPSG:4326"), options.projection);
-
var map = new OpenLayers.Map(options);
var mouse = new OpenLayers.Control.MousePosition();
Modified: sandbox/cmoullet/ux/StreetViewPanel/ux/widgets/StreetViewPanel.js
===================================================================
--- sandbox/cmoullet/ux/StreetViewPanel/ux/widgets/StreetViewPanel.js 2009-11-28 23:15:04 UTC (rev 1514)
+++ sandbox/cmoullet/ux/StreetViewPanel/ux/widgets/StreetViewPanel.js 2009-11-29 06:02:00 UTC (rev 1515)
@@ -143,6 +143,7 @@
this.panorama.videoPlay = false;
this.panorama.videoReady = true;
this.panorama.videoTimeInterval = this.videoTimeInterval;
+ this.panorama.transitionYaw = null;
// Draw navigation tool in map
this.panorama.drawNavigationTool = function(panorama, position) {
@@ -223,8 +224,13 @@
}
alert(OpenLayers.i18n('Google Street View: Server error'));
} else if (data.code == 200) {
- var POV = {yaw: this.panorama.yaw, pitch: this.panorama.pitch, zoom: this.panorama.zoom};
- this.panorama.setLocationAndPOV(data.location.latlng, POV);
+ if (this.panorama.transitionYaw) {
+ this.panorama.followLink(this.panorama.transitionYaw);
+ this.panorama.transitionYaw = null;
+ } else {
+ var POV = {yaw: this.panorama.yaw, pitch: this.panorama.pitch, zoom: this.panorama.zoom};
+ this.panorama.setLocationAndPOV(data.location.latlng, POV);
+ }
// Add the navigation tool
if (this.panorama.showTool) {
if (this.panorama.map) {
@@ -394,6 +400,7 @@
feature = this.panorama.nextFeature;
this.panorama.previousYawVideo = feature.attributes.angle;
}
+ this.panorama.transitionYaw = feature.attributes.angle;
//console.log("PlayVideo: previousYawVideo: "+ this.panorama.previousYawVideo);
if (this.panorama.videoReady) {
this.streetviewclient.getPanoramaById(feature.attributes.panoId, this.panorama.callback.createDelegate(this));
@@ -413,6 +420,7 @@
clearInterval(this.panorama.videoInterval);
}
} else {
+ this.panorama.transitionYaw = feature.attributes.angle;
this.streetviewclient.getPanoramaById(feature.attributes.panoId, this.panorama.callback.createDelegate(this));
}
},
More information about the Commits
mailing list