On Sep 4, 9:36 am, CQR <[EMAIL PROTECTED]> wrote:
> I'm using GMarker
> and have tryed to add the marker.hide like this
>
> function createMarker(point, name, address, type) {
> var marker = new GMarker(point, customIcons[type]);
> markerGroups[type].push(marker);
> marker.hide();
>
> but that dosent work
I wouldn't expect it to, you haven't added the overlay to the map yet
(you can't hide it until it has been added to the map). You didn't
read my previous post carefully enough. Look for the two lines in your
code from my previous post:
var marker = createMarker(point, name, address, type);
map.addOverlay(marker);
and put the call to marker.hide() right after the call to
addOverlay...
-- Larry
>
> On Sep 4, 11:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Sep 4, 6:16 am, CQR <[EMAIL PROTECTED]> wrote:
>
> > > My Google map includes markers that is loaded from a xml file, with
> > > check boxes to hide and show theses markers, then I load the xml file
> > > all the markers is visible but I want then not to show up before the
> > > checkbox is checked, for that I have tried to add a function to with
> > > “marker.hide()” is also hides all the markers except for the last
> > > marker in the xml file, so my conclusion is that my function works,
> > > but maybe placed or called at the wrong time.
> > > Can anyone help me to find a
> > > solution.http://www.houseinchiangmai.net/test/map.asp?lat=18.800500&lng=98.957528
>
> > Hide it when you create it:
> > var marker = createMarker(point, name, address, type);
> > map.addOverlay(marker);
> > marker.hide();
> > -- Larry- 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
-~----------~----~----~----~------~----~------~--~---