Hello,

i have asp.net page with google maps.
I want to create marker and when user click on marker data will be
retrieved from server by ajax call.
My code is here:

code behind:
     <System.Web.Services.WebMethod()> _
    <System.Web.Script.Services.ScriptMethod()> _
    Public Shared Function GetHTML() As String
        Thread.Sleep(2000)
        Return "Hello Map :)."
    End Function

javascript code:

function CreateAjaxInfoMarker(point) {
    var marker = new GMarker(point);
    GEvent.addListener(marker, "click",PageMethods.GetHTML(
                function(result) {
                    marker.openInfoWindowHtml(result);
                }));
    return marker;
};


and code in OnLoad page event
.....
        var point = new GPoint(17.135818, 48.167021);
        var marker = CreateAjaxInfoMarker(point);
        map.addOverlay(marker);
....

but when i load my page message is displayed, and when i click on
marker i have an error:

this.mh is undefined
anonymous([(48.167021, 17.135818) Ye=48.167021 Va=17.135818
x=17.135818 y=48.167021 0=(48.167021, 17.135818)])main.js (riadok 302)
anonymous(Object $b=Object lj=click cP=0 ee=Object Fa=191 __type=[4])
main.js (riadok 282)
p([Object $b=Object lj=click cP=0 ee=Object Fa=191 __type=[4], Object
$b=Object lj=click cP=0 Fa=196 __type=[4] __done=true 0=Object
1=Object], function())main.js (riadok 105)
P(Object oa=(48.167021, 17.135818) Zi=(501, 211) Qa=0, "click")main.js
(riadok 282)
Im(click clientX=513, clientY=198)main.js (riadok 1166)
[Break on this error] m.Rr=function(a){if(this.$b)return this.mh.apply
(this.$b,a)};\nmain.js (riadok 302)

please help me and sorry for my English :)

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to