Hi Garrett,

There are a few problems in your code, firstly:

var map = new google.maps.Map(document.getElementById("google_map"), myOptions);

Remove 'var' because you have already declared the map variable in the
global scope.


Also as Larry says, change GLatLng to new google.maps.LatLng and the
setCenter function only takes a LatLng, not LatLng and Zoom, ie:

map.setCenter(new google.maps.LatLng(prev_lat, prev_lng)); map.panTo
works the same way. If you also want to set the zoom then call
map.setZoom(13).


Hope this helps.


-- Luke



On Mon, Jan 10, 2011 at 11:43 AM, Garrett Lynch
<[email protected]>wrote:

> Hi
>
> Yes I tried the documentation thats why I thought map.panTo and
> map.setCenter were the issue but I can't find equivalents in V3.
>
> online version
> http://www.asquare.org/in-progress/iphone/watchposition.html
>
> regards
>
> Garrett
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to