Hi,
I have added a custom control like below:
var searchControlDiv = document.createElement('DIV');
var searchControl = new SearchControl(searchControlDiv,
map);
searchControlDiv.index = 1;
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(searchControlDiv);
Using the example here:
http://code.google.com/apis/maps/documentation/javascript/controls.html#CustomControls
When I try to remove using removeAt, I get error message:
>> Uncaught TypeError: Cannot read property 'parentNode' of undefined
Below is the line of code I am using to remove.
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].removeAt(1);
clear works fine though:
map.controls[google.maps.ControlPosition.BOTTOM_CENTER].clear();
Please advice what am I doing wrong.
Thanks.
--
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.