android-mapview

Android Mapview: Control ordering of multiple types of OverlayItems?

只谈情不闲聊 提交于 2019-12-24 08:52:37
问题 I have searched for a while on this problem but have come up trumps. I have a simple mapview that makes use of custom overlay items on a ManagedOverlay, let's call them redOverlayItem and blueOverlayItem . All the ManagedOverlay does is query my database for a set of locations of varying types and then place them on a map asynchronously. My managed overlay works fine, however I can't seem to be able to control the "z" ordering. For instance, sometimes I have redOverlayItem 's covering

Using Android MapView without the MapActivity?

删除回忆录丶 提交于 2019-12-24 08:39:15
问题 I'm in the process of encapsulating Android features and services, and I was trying to find the code of the MapActivity of Android to see how it is managing the MapView it contains, in order to implement this out side of this darn MapActivity which collides with my Android wrapper architecture... Is it even possible to use the MapView without the MapActivity? Does anyone know about legal limitations of using the MapView, as I see fit in my application? (for example to display four friend on a

Open Activity from OverlayItem

谁说我不能喝 提交于 2019-12-24 06:47:45
问题 How can I open an Activity from a OverlayItem: Here is my code now: @Override protected boolean onBalloonTap(int index) { if (index == 0) { c.startActivity(new Intent (c.getApplicationContext(), QuoteDetail.class)); This code works well to open a new Activity but I want to add this code to the code above: public void onClick(View view) { Intent i = new Intent(Test.this, QuoteDetail.class); i.putExtra("position", 1); startActivity(i); How can I do this. Sorry for that stupid question, I´m a

Can panning/zooming be disabled in an android MapView while allowing users to click on an ItemizedOverlay?

只愿长相守 提交于 2019-12-24 05:22:15
问题 Is there a way of disabling panning/zooming and keeping map overlays clickable? I am specifically thinking about an ItemizedOverlay that I want to be tappable while denying users from moving around the map's viewport (It's for a game). I've seen the same question answered but the answer sadly doesn't allow for overlay items to be clicked. Thanks alot, best regards, Alex 回答1: I know this question is a little old but I had the same problem and found a workaround, it's not a graceful solution

ClassNotFoundException Thrown using MapView

爷,独闯天下 提交于 2019-12-24 04:13:09
问题 I am struggling with finding the reason why this code locks up. As far as I know, I am declaring the correct permissions in my manifest file as shown below. I have tried running it on an actual device(Droid x w./ 2.3.3) and an AVD to no avail. I've attached the logcat as well which brought me to the classnotfound exception. I have cleaned the project, and verified that the maps.jar is included in the googleapi's package, which I've also used as the target for the application. (Google API's 2

using mutliple drawables on a mapview

╄→гoц情女王★ 提交于 2019-12-24 01:29:11
问题 I have very limited experience with Mapview, Overlay and ItemizedOverlay. I've seen some simple code examples that use one drawable for overlays and itemizedOverlays but I'm unsure how to approach these requirements: I want more than one drawable on my map view (example: a star-icon for the map center and some other icon for other overlay items) but I want one to be unclickable (the star). Should I use both Overlay and ItemizedOverlay to achieve this? Also, my next problem is a matter of

How can I add a TextView below a MapView?

匆匆过客 提交于 2019-12-24 01:22:12
问题 I followed Hello Views, Google Map View and now I want to add a TextView under below the MapView . I have only changed the layout file main.xml and placed the MapView and the TextView in a vertical LinearLayout . My Eclipse is set to build this automatically, but when I run the application in the emulator, I can only see the MapView . How can I add a TextView below a MapView ? Here is my layout main.xml : <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas

Calculating zoomToSpan() degrees based on min/max lat/lng to be in the mapView

那年仲夏 提交于 2019-12-23 21:31:35
问题 I have a cluster of items on an overlay in a mapView. I know where the top/bottom/left/right most objects are. I want to use the zoomToSpan() method to zoom onto that area. What is the proper way to calculate the lat/lng degrees for this method ? 回答1: I found someone else posting a good solution to this problem here: http://www.anddev.org/zoom_and_span_on_a_cluster_of_points-t464.html Good luck! 回答2: This question has been asked before, and there's an excellent answer, with code, here:

Android::Extending MapActivity => classNotFound Exception

时光怂恿深爱的人放手 提交于 2019-12-23 19:31:07
问题 I'd like to make a MapView, but extending the MapActivity throws a classNotFoundException: /AndroidRuntime( 374): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585) E/AndroidRuntime( 374): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) E/AndroidRuntime( 374): at android.app.ActivityThread.access$2300(ActivityThread.java:125) E/AndroidRuntime( 374): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) E/AndroidRuntime(

Limiting the MapView to half the screen

老子叫甜甜 提交于 2019-12-23 16:41:59
问题 I am trying to get the map to fill in only the upper half of the screen and some other layout in the bottom half. Now I know that this should be possible using weights in combination with a tablelayout. But the same piece of XML code works perfectly with say buttons but not with map. Screenshots here. The XML code: <TableLayout android:id="@+id/tableLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TableRow android:id="@+id/tableRow1" android:layout_width=