Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Draw a MapsApp-like Overlay

I'm stuck with an task, that seem's to me not so trivial as i though before. I need to make an app which uses MapActivity, and draw some overlays on it... (that's done), now I have a problem with the onTap() method, I need to make it look like in the original Maps App for Android, Like this http://i.stack.imgur.com/EkZEr.png

I'm new to android, and it seems there's no tutorial which could explain how to write classes for such overlays...

like image 261
Serj Lotutovici Avatar asked Nov 04 '22 00:11

Serj Lotutovici


1 Answers

in onTap()

LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout ll = (LinearLayout)inflater.inflate(R.layout.mylocation_balloon, null);
LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT,mapOverlays.get(index).getPoint(), 0, -70, LayoutParams.MODE_MAP | LayoutParams.CENTER);
like image 114
himanshu Avatar answered Nov 09 '22 08:11

himanshu