On Feb 26, 11:28 am, Rick Donohoe <[email protected]> wrote:
> Definitely did and it was a big help!
>
> Ok, my map is looking nice, although it seems to set itself on the
> other side of the world!?
>
> I used the poly line stuff, that's actualy what i wanted, without the
> markers. I've commented out the marker.setMap(map) lines, although the
> markers are still appearing :s

In these lines:
        marker = new google.maps.Marker({
                        position: latlng,
                        map: map
                  });

The "map: map" is the same as calling marker.setMap(map).

>
> Can you give a quick explanationof the bounds thing? Does thatjust
> ensure the map area and zoom level always accomodate all the markers
> in view??

As it says in the documentation:
http://code.google.com/apis/maps/documentation/javascript/reference.html#Map
fitBounds(bounds:LatLngBounds)  Sets the map to fit to the given
bounds.

map.fitBounds(bounds)
centers and zooms them map so that the area defined by the bounds
object is completely displayed

If the bounds object covers all the markers on the map (or all the
vertices in your polyline), then it will zoom and center the map on
them.

You seem to have lost the bounds.extend(latlng).

  -- Larry

>
> Rick

-- 
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