Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

Hooking up event when overlay added problem

Last post 01-05-2009, 2:17 by chucky. 0 replies.
Sort Posts: Previous Next
  •  01-05-2009, 2:17 2207

    Hooking up event when overlay added problem

    Hi,

    If you on the Page_Load event add an overlay using

    GoogleMap1.Overlays.Add(new GoogleTrafficOverlay());

    and also hook up an event like

    GoogleMap1.Click += ClickHandler(GoogleMap1_Click);

    When you click on the map, the callback fails (endless progress bar on the map)

    If you comment out the add of the overlay then the callback will work.

    If you add the overlay on a callback using

    GoogleMap1.AddOverlay(new GoogleTrafficOverlay());

    then future callbacks work fine.

    Pretty strange, it must be the javascript that is generated to add the overlays.

    Cheers,

    Chucky

    Filed under:
View as RSS news feed in XML