poiclick event works randomly
I need to click the poi icon several times and I get a poiclick event after a random number of retries. The code is:
[CODE]window.map = new nokia.mh5.components.Map({
infoBubble: {
content: ["title"],
listeners: {
click: function () {
//window.SelectedPlaceID = poi.data.tag.toString();
//$("#map_marker_popup" ).popup( "open" );
}
}
},
//tracking: false,
listeners: {
poiclick: function (e) {
var poi = e.data[0];
SelectedPlaceID = poi.data.tag.toString();
$("#map_marker_popup" ).popup( "open" );
},
ready: function () {
guide_obj.map_control.showPois(guide_obj.places.placesList,true);
initSearch();
}
}
});[/CODE]
Any ideas?
I'm using JQuery Mobile, and I don't know if that is causing it or not.
Thanks
Tom
Re: poiclick event works randomly
Hi,
it's probably caused by JQuery Mobile because we haven't experienced such kind of issues. I'd recommend you to create a simple test with MH5 only showing a map with some pois and test if the clicks work fine.
Leo
Re: poiclick event works randomly
I think it was caused by my code which was using poi = map.createPoi and then storing the pois into an array (poisarray) and then using map.pois = poisarray.
It's working now that I don't assign map.pois
Thanks
Tom