Just to add since doing some research...  :)

I'm using parseFloat instead of parseInt for accurancy to allow
decimals numbers.

Thanks again to Larry for pointing me in the right direction,  (no pun
intended).  ;)




On Jul 12, 1:39 pm, Maptastic <[email protected]> wrote:
> Larry,
>
> To be honest with you I wasn't aware of the function.
>
> With a bit of trial and error I manged to get it to work with the
> follow:-
>
> var newYaw = parseInt( document.getElementById('field_yaw').value);
> var newPitch =
> parseInt( document.getElementById('field_pitch').value);
> var newZoom = parseInt( document.getElementById('field_zoom').value);
>
> Larry, thank you so much, I really wished I posted earlier now, I've
> spent days on this.  <grin>.
>
> Thanks once again, it's very much appreciated.
>
> On Jul 12, 11:48 am, "[email protected]" <[email protected]>
> wrote:
>
> > On Jul 11, 6:25 pm, Maptastic <[email protected]> wrote:
>
> > > Hi,
>
> > > I'm not a programmer so my research is done mainly from reading these
> > > groups, the Google examples and reading source code.  I have been
> > > stumped on a issue for a couple of days now that I cannot find the
> > > answer for.
>
> > > I'm testing this on a local Wamp server but I don't think this is the
> > > issue.  I'm going to try and put this live somewhere should it be
> > > necessary.
>
> > > Consider the following code, pretty straight forward.
>
> > > var newyaw = document.getElementById('field_yaw').value;
> > > var newpitch = document.getElementById('field_pitch').value;
> > > var newzoom = document.getElementById('field_zoom').value;
> > > panoramaOptions = {latlng:center, pov:
> > > {yaw:newyaw,pitch:newpitch,zoom:newzoom}};
> > > pano = new GStreetviewPanorama(document.getElementById('streetcanva'),
> > > panoramaOptions);
>
> > > The street view is loading correctly with the correct latlng.  The
> > > problem I'm having is with the POV's, they don't seem to be applying.
>
> > > If I override the panoramaOptions with
>
> > > panoramaOptions = {latlng:center, pov: {yaw:newyaw,pitch:newpitch,zoom:
> > > 2}};
>
> > > The zoom level works correctly.  Likewise if I do:-
>
> > > var newzoom = 2
> > > panoramaOptions = {latlng:center, pov:
> > > {yaw:newyaw,pitch:newpitch,zoom:newzoom}};
>
> > > This would suggest to me that -   var newzoom =
> > > document.getElementById('field_zoom').value;   -  isn't working
> > > correctly.  However If I do the following.
>
> > > var newzoom = document.getElementById('field_zoom').value;
> > > document.write(newzoom);
>
> > > I see the correct value.
>
> > > I know I can improve my code here but I'm just trying to get it to
> > > work first.  I have tried many variants of the code always with the
> > > same result.
>
> > > I am using firebug console whilst testing but my limited knowledge
> > > prevent me from going any further.
>
> > > Looking through firebug I can see the newzoom variable as "2"  but I'm
> > > wondering whether this should be just 2 without the quotes.
>
> > > Maybe related to this post?
>
> > >http://groups.google.com/group/google-maps-api/browse_thread/thread/7...
>
> > > I would be interested if anybody has seen something like this before
> > > or even notifying me if I am applying something incorrectly.  I'll try
> > > and get a live site to point to.
>
> > That would help.  Did you try using parseInt() to make the strings
> > into numbers?
>
> >   -- Larry
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to