| Issue 2449: | event maptypeid_changed fires twice | |
| 7 people starred this issue and may be notified of changes. | Back to list |
var g = google.maps;
g.event.addListener(map, "maptypeid_changed", function() {
alert ("fired");
});
The listener fires twice when the map type is changed. Especially annoying
when something will be added to the map when the map type is being changed:
It will be added twice.
Jun 3, 2010
#1
[email protected]
Jun 7, 2010
My tests are not showing that it is firing twice. Can you supply a link to your example that shows this happening.
Status:
NeedsMoreInfo
Jun 13, 2010
Yes, when map.setMapTypeId() is called from another function the listener fires twice. Here is a demonstrator http://www.wolfpil.de/maptypeid_changed.html
Nov 8, 2010
i still get the same problem in the current version (3.2). please fix this.
Nov 15, 2010
Thanks for the report.
Status:
Confirmed
Labels: Internal-3198699
Nov 20, 2010
It appears the maptypeid_changed event is fired when the maptypeid is set whether it is changed or not. That would explain why it is firing twice, once when it is set and once when it is changed. See http://alttag.org/maps/maptypeid_changed.html and click the "Set to Roadmap" button while the map is already set to be a roadmap. The maptype does not change but the event is still fired.
Nov 28, 2010
(No comment was entered for this change.)
Status:
Fixed
Labels: Fixed-3.3 |
|
| ► Sign in to add a comment |