Is there anyway to get the values that created this overlay and compare them with the values of GeoPoint geo ? My code is aproximmating values so I never get the numbers right... I don't know which values can I use from the onTap method to compare with the ones that created the overlay itself besides the latitude and longitude values...

                protected boolean onTap(int i) {
                        OverlayItem item=getItem(i);
                        GeoPoint geo=item.getPoint();
                        Point pt=map.getProjection().toPixels(geo, null);

                        View view=panel.getView();

                        ((TextView)view.findViewById(R.id.latitude))
                                
.setText(String.valueOf(geo.getLatitudeE6()/1000000.0));
                        ((TextView)view.findViewById(R.id.longitude))
                                
.setText(String.valueOf(geo.getLongitudeE6()/1000000.0));
                        ((TextView)view.findViewById(R.id.x))
                                                                                
                                        .setText(String.valueOf(pt.x));
                        ((TextView)view.findViewById(R.id.y))
                                                                                
                                        .setText(String.valueOf(pt.y));

                        panel.show(pt.y*2>map.getHeight());

                        return(true);
                }



On Jul 5, 2010, at 11:03 PM, Mark Murphy wrote:

On Mon, Jul 5, 2010 at 5:58 PM, Pedro Teixeira
<[email protected]> wrote:
Any news on how to implement this ? Is overriding the class that
extends itemizedOverlay on the onTap method enough?
I need to show information when the user clicks a marker and cant seem
to find possibilities

Here are examples of how I've done it:

http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/
http://github.com/commonsguy/cw-advandroid/tree/master/Maps/EvenNooerYawk/

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Consulting: http://commonsware.com/consulting

--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en

Pedro Teixeira

www.pedroteixeira.org

--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en

Reply via email to