You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
Hi
I have created some buttons on my map with the following code:
map.controls[google.maps.ControlPosition.RIGHT_TOP].push(oButton);
How can I hide this control, and show it again?
I did the following, but this deletes the button from the map:
oEl = document.getElementById('btnPathLength');
if (oEl && oEl.parentNode) oEl.parentNode.removeChild(oEl);
Thank you for tips.
Sammy
unread,
Jun 18, 2011, 12:03:56 PM6/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
Sorry, I think I found a way already. I've been trying with this and
it never worked
if (oEl) oEl.display = 'none';
and then found out that I need "style", the one below works:
if (oEl) oEl.style.display = 'none';