Map view click event not firing (in Kitchen Sink or my own app)
Hi,
I'm writing an application that uses annotations on a map view. I'm retrieving data from a remote server and plotting it on a map with no problems. If you click a map pin it will show some information just like in the Kitchen Sink map view example.
Each time the user performs a new search I remove all existing annotations and then add the new ones. Unfortunately, if the user left an annotation info popup open this remains on the map even when all annotations are removed using "removeAllAnnotations". To work round this I decided to use the click event of the map view to track which annotation was the last one to be clicked and then use "deselectAnnotation" to deselect before calling "removeAllAnnotations".
The problem I have now come across is that the map view click event simply isn't firing. Having failed to get it to work in my app I ran the Kitchen Sink map view example and it doesn't work in there either. Its my understanding that the following line in the Kitchen Sink example should cause debug to be written to the output every time the map is clicked but it doesn't and the rest of the code in the click event doesn't get executed either:
"Ti.API.info('mapview click clicksource = ' + clickSource)"
Can anyone help with this (or that "removeAllAnnotations" doesn't remove an open annotation popup)?
Thanks for your time in advance