On Jan 2, 8:37 am, ss ss <[email protected]> wrote:
> Dear Lary,
>                Here is the sample
http://e-response.com.my/maps/viewMapDetails.php?associateID=537
> The problem now I focus and zoom only on the start point.

OK. So you aren't using the directions service.  You have been around
long enough that you should know that you get better answers and avoid
wasting people's time if you follow the posting guidelines and provide
a link to your map.

> So  I want to zoom where it show the whole journey.

You need to add all the lat/lng objects that you use to display the
route (markers and those in the polyline, everything you want to be in
view) to a GLatLngBounds object, then use that object to get the
center (call getCenter() on it) and getBoundsZoomLevel (a method of
the map object) to calculate the correct zoom.

You may find examples here:
http://groups.google.com/group/google-maps-api/search?group=google-maps-api&q=getBoundsZoomLevel&qt_g=Search+this+group

  -- Larry


>
> On Tue, Jan 3, 2012 at 12:05 AM, [email protected]
> <[email protected]>wrote:
>
>
>
>
>
>
>
> >  On Jan 2, 8:01 am, ss <[email protected]> wrote:
> > > Dear All,
> > >             I would have a series of point with one start and end
> > > point. At times the distance is short and at times is hundreds of
> > > kilometers. What I want is that based on the start and end point I
> > > want show the whole journey with varying zoom level. How to control
> > > the zoom point based on this two points? Thank you.
>
> > Where is your map?  Last I checked the directions service (which I
> > assume you are using to show the "journey"), automatically zooms and
> > centers the map based on the result returned.
>
> >  -- Larry
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps API V2" 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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