I solved creating my streetview panorama in a widget after its loading
(override of "onLoad").

Probably the container wasn't already loaded when i tried to assign it
my panorama...

Thanks for your help anyway!!! :)

On 6 Set, 20:52, DartmanX <fergusonja...@gmail.com> wrote:
> I'm not sure, since most of the features I display in my app are
> geographic, so StreetView isn't much help to me.
>
> Does it work again if you clear your cache?
>
> On Sep 2, 3:44 am, Alberto <sturialb...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi, I had your same idea and I tried to write a function (looking at
> > the api v3 documentation) to integrate a StreetView custom panorama:
>
> >         /**
> >          * @param e: element to use for the Street View panorama
> >          * @param path: image path
> >          * @param heading: horizontal angle
> >          * @param zoom: panorama zoom
> >          * @param pitch: vertical angle
> >          * @param imageName: panorama image name
> >          * @param forceSpheric: force panorama to be always spheric
> >          * @return
> >          */
> >         final public native JavaScriptObject streetView(Element e, String
> > path, int heading, int zoom, int pitch, String imageName, boolean
> > forceSpheric)/*-{
>
> >           var panorama;
> >           var mode='html4';
>
> >           if (forceSpheric){
> >                 mode='html5';
> >           }
>
> >           // Return a pano image given the panoID.
> >           function getCustomPanoramaTileUrl(pano,zoom,tileX,tileY) {
>
> >             // Note: robust custom panorama methods would require tiled pano
> > data.
> >             // Here we're just using a single tile, set to the tile size and
> > equal
> >             // to the pano "world" size.
>
> >             return path+imageName;
> >           }
>
> >           // Construct the appropriate StreetViewPanoramaData given
> >           // the passed pano IDs.
> >           function getCustomPanorama(pano,zoom,tileX,tileY) {
>
> >              switch(pano) {
>
> >               case 'reception':
> >                 return {
> >                   location: {
> >                     pano: 'reception',
> >                     description: ""
> >                   },
> >                   links: [],
> >                   // The text for the copyright control.
> >                   copyright: "",
> >                   // The definition of the tiles for this panorama.
> >                   tiles: {
> >                     tileSize: new $wnd.google.maps.Size(e.offsetWidth,
> > e.offsetHeight),
> >                     worldSize: new $wnd.google.maps.Size(e.offsetWidth,
> > e.offsetHeight),
> >                     // The heading in degrees at the origin of the panorama
> >                     // tile set.
> >                     centerHeading: 105,
> >                     getTileUrl: getCustomPanoramaTileUrl
> >                   }
> >                 };
> >                 break;
> >             }
> >           }
>
> >           // Set up Street View and initially set it visible. Register the
> >           // custom panorama provider function. Set the StreetView to 
> > display
> >           // the custom panorama 'reception' which we check for below.
> >           var panoOptions = {
> >             pano: 'reception',
> >             visible: true,
> >             mode: mode,
> >             addressControl: false,
> >             panoProvider: getCustomPanorama
> >           }
>
> > //        panorama = new
> > $wnd.google.maps.StreetViewPanorama($doc.getElementById('panorama'),panoOpt 
> > ­ions);
> > //        panorama = new
> > $wnd.google.maps.StreetViewPanorama(th...@dominio.sito.museov3.client.MapContainer::getElement()
> > (), panoOptions);
> >           panorama = new $wnd.google.maps.StreetViewPanorama(e,panoOptions);
>
> >           panorama.setPov({
> >         heading: heading,
> >                 zoom: zoom,
> >                 pitch: pitch
> >           });
>
> >           return panorama;
>
> >         }-*/;
>
> > *********************************************
>
> > SimplePanel svPanel=new SimplePanel();
> > svPanel.setSize("300px", "200px");
>
> > JavaScriptObject pano= streetView(svPanel.getElement(),"/sv/", 200, 0,
> > 0,"img.jpg", true);
>
> > But there's a problem:
>
> > it works only once! When I try to create a new panorama (after the
> > first time), I see a blank panorama and controls don't work.
>
> > What could be the error???
>
> > Thanks for your time and help! :)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to