Saturday, June 19, 2010

Re: Driving directions - Hide Show all markers

> Using code from Mike Williams' API tutorial site. I'm trying to
> integrate driving directions as shown on Mike's example page "Get
> Directions on your own map" into my existing map page.
> I have gotten the text directions to display correctly but the graphic
> line connecting the locations does not appear nor does the 2nd marker.

You create the directions object
var gdir=new GDirections(map, ...
before you have created the 'map' variable you need to pass to it to
get a map display.

> Also have a question about integrating "hide/show" feature for all
> markers. I can get all of the check boxes in the menu to clear with a
> javascript button but the map markers still remain visible. Can anyone
> suggest a method that might work in my setup?

Can't see any button to do that.
If you look at your own code, you initially set up the categories with
a block of code like
// == show or hide the categories initially ==
show("this");
hide("that");
have you tried making a little function similarly?
function hideThemAll() {
hide("this"):
hide("that");
etc.
finishing up with
makeSidebar();
}

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate