Hey, I fixed it using $i count... one of those 'doh' moments :)

                // pan map to best view
                if($bestview == 1){
                        if($i < 2){
                $objResponse->script('
                map.setCenter(new GLatLng('.$getlat.','.$getlon.'), 16);
                ');
                }else{
                $objResponse->script('
                map.setZoom(map.getBoundsZoomLevel(bounds));
                map.setCenter(bounds.getCenter());
                ');
        }

                 // Reset bounds
                 $objResponse->script('
                 bounds = null;
                 bounds = new GLatLngBounds();
                 ');
        }

...

alec
http://groups.google.com/group/gtrack

On Jan 22, 11:13 pm, Updater <[email protected]> wrote:
> Hi
>
> Yes, sorry, the example is at
>
> http://demo.gtrack.co.uk
>
> user = demouser
> pass = demouser
>
> click 'CANADA'
>
> :)
>
> On Jan 22, 10:59 pm, Rossko <[email protected]> wrote:
>
>
>
> > I'd still go with checking for a minimum zoom level, that way it'd
> > still work properly with more than point very close together.
>
> > > But its doesn't work, the map still zooms in giving 'sorry.....no
> > > tiles '
>
> > Perhaps there are no tiles at that zoom level just there.
> > If only we could see an example.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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