mapactivity

MapView / MapActivity crash on some devices

那年仲夏 提交于 2019-12-11 07:36:01
问题 I have gone through Google's MapView tutorial and it works fine on the emulator and for example on my HTC Flyer. But for some reason it immediately crashes when starting it on my mobile phone (Samsung Galaxy I9000). The crash happens there, because right at the beginning the Bundle that onCreate() receives is null. I'm compiling against Android 2.3.3. This is installed on the phone as well. The Flyer uses Android 3.0 I'd greatly appreciate any help on this weird issue. This is the excact

How to set screen zoom by geopoints?

醉酒当歌 提交于 2019-12-11 06:09:39
问题 I drew a line between 2 geopoints. How do I set screen zoom by these 2 geopoints. What I want to do is to show start and finish points by default. Is there any algorithm for that? 回答1: here what I did : private void centerMap() { int minLat = Integer.MAX_VALUE; int maxLat = Integer.MIN_VALUE; int minLon = Integer.MAX_VALUE; int maxLon = Integer.MIN_VALUE; for (Point point : twoPoints) { int lat = (int) (point.getLatitude() * 1E6); int lon = (int) (point.getLongitude() * 1E6); maxLat = Math

Multiple activity on screen of Android?

隐身守侯 提交于 2019-12-09 03:39:13
问题 So the problem is I need to create a screen where I have a map and a list under it , but to have a map I have a : public class MyMapActivity extends MapActivity{} to have a list i have : class MyListActivity extends ListActivity{} since there is no multiple inheritance ,what is the correct way to do this? Does Android have any Interface for this ? How would you do this? So i did it like this: MapView mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true);

SherlockActionBar in a MapActivity

纵饮孤独 提交于 2019-12-08 15:53:28
问题 I'm using the Sherlock Action Bar extensively throughout my application, but I have an activity which inherits from a MapActivity, and thus I can't make it inherits from SherlockActivity. Is there any way I can make use of the Sherlock Action Bar in the map so I can customize it? Best, Manuel. 回答1: You have to download the Map plugin: https://github.com/JakeWharton/ActionBarSherlock-Plugin-Maps/downloads 来源: https://stackoverflow.com/questions/11341432/sherlockactionbar-in-a-mapactivity

Android MapView:Couldn't find the connection factory client

狂风中的少年 提交于 2019-12-08 05:59:43
问题 As I know, that question is discussed so many time here, but still as I tried I faced the same issue and did all try what I saw here and also by Google but still that issue is unresolved. Also, I tried the sample codes from so many sites and there also the same problem.(Issue that on MapActivity derived class, I can see the grid but map not loading while threw aforesaid exception) I tried with my own API key as well as the keys already present in the sample code. And, also tried in device

Android mapview partially loading tiles

江枫思渺然 提交于 2019-12-08 03:15:45
问题 I have built an android application which has a single mapview. I have a bug where the map view occasionally has missing tiles. The map view is not completely blank some tiles appear but not all of them. All the answers here relate to API Keys or issues with having multiple mapviews in one app. This is not the problem. It occurs intermittently, approximately one in every five times I start the application after clearing all data out of the app. So its typical seen on new installations. It

Android: ClassNotFoundException when running ActionBarSherlock-Plugin-Maps

安稳与你 提交于 2019-12-08 00:47:59
问题 I am trying to setup an example project that uses Jake Wharton's ActionBarSherlock with ActionBarSherlock-Plugin-Maps. I follow the instructions here and here. I do not necessarily need Fragments. Here is the simple class I created. package com.example.actionbarsherlock; import android.os.Bundle; import com.actionbarsherlock.app.SherlockMapActivity; public class MainActivity extends SherlockMapActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate

How to place Multiple MapViews v1 inside a ViewFlipper

你说的曾经没有我的故事 提交于 2019-12-07 23:17:09
问题 Objective - I want to show slide shows of different Map Activities which show data according to database, using view flipper(or something similar). Issues: View Flipper can't be added to an Activity that is not a MapActivity if flipper contains a mapview. View Flipper does not allows adding multiple mapviews as one MapActivity can have only one map view. What I wish to implement Want to show slide show of multiple MapActivities which show markers,route etc based on database data. Want to

Android mapview partially loading tiles

有些话、适合烂在心里 提交于 2019-12-06 16:31:34
I have built an android application which has a single mapview. I have a bug where the map view occasionally has missing tiles. The map view is not completely blank some tiles appear but not all of them. All the answers here relate to API Keys or issues with having multiple mapviews in one app. This is not the problem. It occurs intermittently, approximately one in every five times I start the application after clearing all data out of the app. So its typical seen on new installations. It only occurs on Android 2.2 devices (Samsung Galaxy S definately) Note the logs show: 07-21 17:11:52.274:

Android: ClassNotFoundException when running ActionBarSherlock-Plugin-Maps

浪子不回头ぞ 提交于 2019-12-06 09:27:07
I am trying to setup an example project that uses Jake Wharton's ActionBarSherlock with ActionBarSherlock-Plugin-Maps . I follow the instructions here and here . I do not necessarily need Fragments. Here is the simple class I created. package com.example.actionbarsherlock; import android.os.Bundle; import com.actionbarsherlock.app.SherlockMapActivity; public class MainActivity extends SherlockMapActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override protected boolean isRouteDisplayed() {