Osmdroid, how to create a static overlayitem that remains at the center of the map

I've searched high and low to find out how i can put an overlayitem that is not fixed to a GeoPoint (i.e geographical coordinates), but rather stays at a fixed point in the view (e.g. the center of the MapView) regardless of moving/scrolling in the map.

MapView has an .addView() method. I tried creating a view with a drawable but the view will be fixed on the map, exactly like an overlayitem, which is not what i want.

Can anyone help me?


Surely if you just want something fixed to the centre of the display, rather than on the mapView, you're going about it wrong. overlayItems ARE tied to GeoPoints, that's their purpose.

just create whatever it is as a new, normal, android view object of whatever type, and add it to the main view, on top of your MapView, laid out wherever you need it?

Make a framelayout with your map and a View. Fill a background in your view, and center it horizontally and vertically to make the background centered over your map.



         android:background="@drawable/cross" />

Need Your Help

Java: How does a large amount of MouseListeners compare to pixel / grid division?

java performance swing jlabel mouselistener

Let's say for example you have a list of items or a large grid of components, and you want to implement some sort of hover/rollover mechanism. The easy way to do this would simply be to add a

Can UIImagepickercontroller have multiple Instances at a time

iphone ios uiimagepickercontroller

Here I want to use both front cam and back cam at a time in uiimage picker controller to capture a image, so I am planing to use two objects of cam one with front cam and other with back cam , Is it

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.