Thanks for your help, but in your code:
public function zoomToFit() {
$zoom = 21;
$found = false;
while ($found == false) {
$this->setZoom($zoom);
$map_bounds = $this->getBounds();
$found = true;
foreach ($this->getMarkers() as $marker) {
if ($map_bounds->contains($marker)) {
} else {
$found = false;
break;
}
}
$zoom--;
}
return $zoom;
}
I don't know how to implement the function "contains".
On 30 oct, 16:15, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> On Oct 29, 2008, at 11:34 PM, Alejo83 wrote:
>
>
>
> > I see you haven't readen the code nor the title of the post... It says
> > "server-side", so I think it's a bit impossible to use there the
> > Google API. I need to calculate it on the server because otherwise the
> > map doesn't load the tiles until it has received all the positions and
> > calculated the corresponding bounds.
>
> > I do not want to be impolite, but please take time to do other things
> > rather than answering without reading before...
>
> Don't mind the trolls. This is not really a friendly mailinglist. Just
> ignore them.
>
> Anyways did you check the code PHP I mailed you? Did it help?
>
> --
> Mika Tuupolahttp://www.appelsiini.net/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---