Get annotation position
When an annotation right button is clicked a mapview click gets fired it is supposed to send the X & Y of the click. It doesn't. I have tried checking the e.x and e.y, e.annotation.left, e.source.x, e.globalPoint.x and other combinations with no luck.
What I'm trying to do is create a popover where the annotation is when the right button is clicked. It can be done on the iPad in the Google Maps app. Do a search and click on the right button and it will hide the annotation flyout and replace it with a popover.
Anyone have any suggestions?
3 Answers
-
I ended up writing code to convert the lat/lng of the annotation to a pixel location within the mapview and then creating a popover at that position. If anyone else needs to do something like that, let me know and I can post some sample code.
-
YES YES YES I would love to have this code please…trying to do the same myself!!!
-
this might help: http://developer.appcelerator.com/question/32291/attaching-a-popover-to-a-map-annotation-title