I am making a map application in which i have 20 restaurant data and i want to show all restaurant in Map using overlay pin.Now my actual problem is I want to show index number on each and every pin (eg if 20 pin is there ,all pin should be with index no 1,2 ,3 which represent restaurant no from list). can anyone tell me how can i put index number on single pin image..??i want to use same image for overlay
Share
This is a fact I discovered later in my project:
MapViewis actually aViewGroup(also mentioned here). So instead of using the somehow complicated Overlay and attaching drawables, you can just create a button (or a textview, or some nested layout, or whatever you want to display above a map), assign it aMapView.LayoutParamsinstance, and add it to theMapView.In code:
Let’s say you want to place the pin on geo coordinates -60, 30.
In this way you can have only one graphic asset for the background of the pin, and use a
TextViewfor the numbering.