Object of type 'System.EventArgs' cannot be converted to type 'Artem.Web.UI.Controls.GoogleEventArgs'.

May 28, 2010 at 2:12 PM

Hello everyone,

Cannot use 

GoogleMap1.GeoLocationLoaded += new EventHandler<GoogleEventArgs>(GoogleMap1_GeoLocationLoaded);

Am I missing something?

Tried using AutoEventWireup="false" and "true", with either 

protected override void OnLoad
or the default page load event:
protected void Page_Load

Tried the:

GoogleMap1.MarkerEvents.GeoLocationLoaded += new EventHandler<GoogleEventArgs>(MarkerEvents_GeoLocationLoaded);
and it doesn't fire up when adding markers by addresses!

The reason I want to be able to use one of those events, is because I would like to get the location of markers after adding them by their addresses.  I need to center map and set the zoom accordingly to all the markers on the map.

I also noticed that adding a marker in the aspx directly with:

<Markers>
    <artem:GoogleMarker Address="my address" Text="my text" Title="my title" />
</Markers>

and then trying to add markers in code-behind:

        GoogleMarker marker = new GoogleMarker("Address #1");
        marker.Text = "Text #1";
        marker.Title = "Title #1";
        GoogleMap1.Markers.Add(marker);

        GoogleMarker marker = new GoogleMarker("Address #2");
        marker.Text = "Text #2";
        marker.Title = "Title #2";
        GoogleMap1.Markers.Add(marker);

map doesn't include markers adding in the aspx htlm code!  Although the first video (setup) shows the this is not the behavior it is supposed to have.

what am I doing wrong or missing again?

Anyway, thank you very much for your help (this is my first post here), and congratulation for this great wrap up of the googlemap engine!

René