android-maps

ActionBarSherlock + Maps + Loaders = java.lang.NoClassDefFoundError

烂漫一生 提交于 2019-12-18 04:12:55
问题 Edit: For a detailed how-to, check out my answer. I'm struggling with it for two days now, hope someone can help. I'm trying to use the newest ActionBarSherlock (4.0) with a MapView. I knew it's problematic with fragments, but I don't need them in this activity. But I need Loaders and it appears, that to use Loaders I have to extend the FragmentActivity too. No problem, I thought, we have the android-support-v4-googlemaps from Pete Doyle. As suggested on many SO threads and Google Groups I

Map display with release key in android

只愿长相守 提交于 2019-12-18 03:46:51
问题 I've created Release key for my application.But It doesnt show map.What did i wrong on that?i've created release key by Right click of project->Export->Giving alias_name->...like that.Then by the use of Keytool.,i got that release key.i used it on my xml. My code: public class SampleMapActivity extends MapActivity { MapView myMapView = null; MapController myMC = null; GeoPoint geoPoint = null; double latitude = 12.937875, longitude = 77.622313; /** Called when the activity is first created. *

Open Street Map working offline android

孤人 提交于 2019-12-17 22:51:46
问题 I am a newbie to Open Street Map. I made some research and found that we can download and store the map into a folder. But i didn't find any tutorial or sample that provides offline Open Street Map. Can someone provide a step by step tutorial, a guide to implement offline open street map please. I am following this example http://android-coding.blogspot.com/2012/06/example-of-implementing-openstreetmap.html but now i want to make it available when there is no connection. 回答1: Like in the

Draw driving route between 2 GeoPoints on GoogleMap SupportMapFragment

£可爱£侵袭症+ 提交于 2019-12-17 19:27:32
问题 This is a tricky question, been banging my head for a day, please help. I use Google Maps Apis to get the shortest driving distance and its routes, points, etc between 2 GeoPoints that I provide, see code below private JSONObject GetDistance(String src, String dest) throws Exception { StringBuilder urlString = new StringBuilder(); urlString.append("http://maps.googleapis.com/maps/api/directions/json?"); urlString.append("origin=");// from urlString.append(src); urlString.append("&destination=

Google Maps & apps with mapview have different current positions

馋奶兔 提交于 2019-12-17 18:27:28
问题 I have a mapview where I want to track the user's current location. GPS as well as 'use wireless networks' is activated in my phone settings. Nevertheless, since I'm indoor I don't get a GPS fix, therefore the location is determined via network; wifi spot is available. I have the Google Maps app running as well as my application running. Strangely, the current location differes between Google Maps and my application, where the Google Maps is very accurate while in my app the location is

Finding nearest locations using Google Maps API

て烟熏妆下的殇ゞ 提交于 2019-12-17 17:26:57
问题 Hi I'm writing an app that shows the bike stations near an address. I have the list of latitude and longitude locations of each bike station from a service. I can mark my current location, or any address so far. How do I show all the bike stations near my location on map. Do I first get nearest Google places from the current location and then access the database for bike location and make markers on the map? What is the best approach? 回答1: If you already have the coordinates of your bike

You are only allowed to have a single MapView in a MapActivity

独自空忆成欢 提交于 2019-12-17 16:53:46
问题 I have a function that shows a map page so I can get the user to choose their current location. But if you run this function twice it crashes the App with the Single MapView in a MapActivity error (i.e. opening that settings view again). public void showMapSetterPage(View v) { Log.i(DEBUG_TAG, "Settings screen, set map center launched"); // Set which view object we fired off from set_pv(v); // Show Map Settings Screen setContentView(R.layout.set_map_center); // Initiate the center point map

Google Map v2 Marker Animation

你离开我真会死。 提交于 2019-12-17 15:42:12
问题 Do anyone have idea how this animation's implementation is possible in google map api v2. Check out this here. I would like to know how this is done. Please let me know if anyone have any sample code regarding this. Thanks in advance. 回答1: I found a solution that worked for me: final LatLng target = NEW_LOCATION; final long duration = 400; final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = map.getProjection(); Point startPoint = proj

Map API v2 Authorisation Failure

一曲冷凌霜 提交于 2019-12-17 12:42:11
问题 Alright, here is what I did using the example Got the debug key via keytool (made sure it is the the debug key is used by eclipse in Preferences -> Android -> Build) Generated the key by the command $ keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android Copy pasted the SHA1 sum in the Google API Console + my packagename: sum;com.my.package Enabled Google Map API v2 in the same project in Google API Console Copied it to the Manifest application

Google Maps API V2 'Failed to Load Map. Could not contact Google Servers'

僤鯓⒐⒋嵵緔 提交于 2019-12-17 05:07:11
问题 I have checked and double checked my APIkey that I registered on the Google Console however I am still getting the following error: 12-05 16:31:12.940: E/Google Maps Android API(12334): Failed to load map. Could not contact Google servers. What I am seeing is the zoom in/out buttons and the background for the MapView but no Map???!!! Any ideas??? Answer I will post it here because what solved my issue was stated in the comments of the accepted answer below. It was the READ_GSERVICES