furby wrote:
> Perhaps I am going about this the wrong way... it seems like a lot of
> shifting of code around to get a simple message to display in google
> maps.

Not really.

> Let me rephrase the question : Is there a simple way to get the two
> String parameters to display (That are sent to the OverlayItem class)
> when a point is clicked on? I would assume that google maps woudl have
> somethign built in (I am used to using maps in Javascript where it's
> pretty much just a onClick event handler...).

You are using the simple way. You just have the wrong type for the first
parameter to the makeText() method. It would similarly fail if you tried
passing an integer for the first parameter, or a boolean.

You can see an example of using a Toast from an ItemizedOverlay in one
of my book examples. I don't have these examples up on github just yet
(probably this weekend), so I can't directly link to it. For now, visit:

http://commonsware.com/Android/

Scroll down and click on the Source Code link opposite the table of
contents. In the ZIP file, you will see Maps/NooYawk/. Look for the
onTap() implementation there.

Since my ItemizedOverlay is an inner class of my MapActivity, I already
have access to a suitable Context to provide to makeText().

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

Android Development Wiki: http://wiki.andmob.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