Hello. I have been trying to use events using the addEventListener() but I am unable. as in the sandbox I keep getting "API ID not available", mapstraction.addEventListener(''markerAdded'', function() { alert("markerAdded") }); I get nothing not even an error. tried debigging, but I cant seem to figure it out, as far as I can tell line 226 in mxn.js var sApiId = oOptions.overrideApi ? args[0] : fnApiIdGetter.apply(obj); does not set the Id. Any pointers will be appreciated. thank you. _________________________________________________________________ Windows Live Hotmail gives you a free,exclusive gift. http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_7:092009 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20091201/95e674c3/attachment.htm>
You can try to do this: map.markerAdded.addListener(*function() { alert("markerAdded") }*); I think this will work!! 2009/12/1 jokie36688 Tom <joram5911 at hotmail.com>> Hello. > > I have been trying to use events using the *addEventListener() *but I am > unable. as in the sandbox I keep getting > > "*API ID not available*", > > *mapstraction.addEventListener(''markerAdded'', function() { alert( > "markerAdded") })**;* > > I get nothing not even an error. > tried debigging, but I cant seem to figure it out, as far as I can tell > line 226 in mxn.js > > *var sApiId = oOptions.overrideApi ? args[0] : fnApiIdGetter.apply(obj);* > ** > does not set the Id. > > Any pointers will be appreciated. > > thank you. > > ------------------------------ > Windows Live Hotmail gives you a free,exclusive gift. Click here to > download.<http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_7:092009> > > _______________________________________________ > Mapstraction mailing list > Mapstraction at lists.mapstraction.com > http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com > >-- Saludos, Pablo L?pez Escob?s -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20091201/2e5567bf/attachment.htm>
Sorry the correct function is: map.markerAdded.addHandler(*function() { alert("markerAdded") }*); El 1 de diciembre de 2009 18:15, Pablo L?pez Escob?s <plopesc at gmail.com>escribi?:> You can try to do this: > > map.markerAdded.addListener(*function() { alert("markerAdded") }*); > > I think this will work!! > > 2009/12/1 jokie36688 Tom <joram5911 at hotmail.com> > >> Hello. >> >> I have been trying to use events using the *addEventListener() *but I am >> unable. as in the sandbox I keep getting >> >> "*API ID not available*", >> >> *mapstraction.addEventListener(''markerAdded'', function() { alert( >> "markerAdded") })**;* >> >> I get nothing not even an error. >> tried debigging, but I cant seem to figure it out, as far as I can tell >> line 226 in mxn.js >> >> *var sApiId = oOptions.overrideApi ? args[0] : fnApiIdGetter.apply(obj);* >> ** >> does not set the Id. >> >> Any pointers will be appreciated. >> >> thank you. >> >> ------------------------------ >> Windows Live Hotmail gives you a free,exclusive gift. Click here to >> download.<http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_7:092009> >> >> _______________________________________________ >> Mapstraction mailing list >> Mapstraction at lists.mapstraction.com >> http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com >> >> > > > -- > Saludos, > Pablo L?pez Escob?s >-- Saludos, Pablo L?pez Escob?s -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20091201/03cc577a/attachment.htm>
The original form you were using for adding your handler was for v1 of mapstraction where as the sandbox is v2. Marker added is one of the new events in v2 so it definitely doesn''t support the old style. Derek On Dec 1, 2009 5:19 PM, "Pablo L?pez Escob?s" <plopesc at gmail.com> wrote: Sorry the correct function is: map.markerAdded.addHandler(*function() { alert("markerAdded") }*); El 1 de diciembre de 2009 18:15, Pablo L?pez Escob?s <plopesc at gmail.com>escribi?:> > You can try to do this: > > map.markerAdded.addListener(function() {alert("markerAdded") }); >... -- Saludos, Pablo L?pez Escob?s _______________________________________________ Mapstraction mailing list Mapstraction at lists.mapstraction.com http://lists.mapstraction.com/listinfo.cgi/mapstraction-mapstraction.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20091201/f3366960/attachment.htm>