android-maps-v2

Set Location Center of Map - GMaps v2 - Android

谁说胖子不能爱 提交于 2019-12-30 08:12:31
问题 How do I set the center of the map to a specific location using GMaps v2? This is how I did it using GMaps v1: public void setCenter( LatLng point ) { if( point.latitude*1000000 != 0 && point.longitude*1000000 != 0 ) { if( mMapController != null ) { mMapController.setCenter( point ); } /*else if( mOpenStreetMapViewControllerSource != null ) { mOpenStreetMapViewControllerSource.getController().setCenter( new org.osmdroid.util.GeoPoint( point.getLatitudeE6(), point.getLongitudeE6() ) );

Google Maps Android API v2: My location marker always over other markers?

半腔热情 提交于 2019-12-30 02:29:09
问题 Currently migrating an Android app using Google Maps to Google Maps Android v2; I want the map to display the built-in location marker, as well as custom markers. With the previous library, I used to draw the location marker 'below' custom markers, with mapView.setReticleDrawMode(ReticleDrawMode.DRAW_RETICLE_UNDER); I can't find a similar option in the new API. Did I miss something? 回答1: After a bit a searching, I couldn't find such an option. I finally removed the location pin, and added a

GroundOverlay made with a Canvas in Google Maps Android API v2

六月ゝ 毕业季﹏ 提交于 2019-12-29 08:22:18
问题 I'm also try to draw arc (I'm referencing on this and this questions). I'll get from web service following: Lat and Lng Radius (in meters) Start angle (end angle is startA + 60 degrees) Now I encounter on following problem because I do not have two LatLng, just one, and in new map api v2 there is no radius = Projection.metersToEquatorPixels method for providing to RectF.set(point.x - radius,...) Do you have code example, links, etc? Also what about performances of App, because I'll have up to

What is difference between 'debug.keystore' and 'release.keystore' in Android?

半城伤御伤魂 提交于 2019-12-29 03:21:06
问题 Recently, I was working with Android Maps V2. I came across debug.keystore and release.keystore . What is the difference between them? Why do we have to use both? 回答1: The Android build process signs your application differently depending on which build mode you use to build your application. There are two build modes: debug mode and release mode . You use debug mode when you are developing and testing your application. You use release mode when you want to build a release version of your

What is difference between 'debug.keystore' and 'release.keystore' in Android?

有些话、适合烂在心里 提交于 2019-12-29 03:20:48
问题 Recently, I was working with Android Maps V2. I came across debug.keystore and release.keystore . What is the difference between them? Why do we have to use both? 回答1: The Android build process signs your application differently depending on which build mode you use to build your application. There are two build modes: debug mode and release mode . You use debug mode when you are developing and testing your application. You use release mode when you want to build a release version of your

Android Google Maps: XML layout errors

China☆狼群 提交于 2019-12-29 02:01:44
问题 I am trying to get google maps v2 to work in android using android studio. I got all my keys and manifest setup. When I try and create xml for the actual activity that the map will show up on I get errors. My xml looks like this: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <fragment xmlns:android="http://schemas

MapFragment - NullPointerException - Google Maps V2 - Android

和自甴很熟 提交于 2019-12-29 01:48:25
问题 I'm getting an NullPointerException with the following code: private ProjectionProxy proxy = new ProjectionProxy(); private GoogleMap mMap = null; private Context context = this; @Override protected void onCreate(Bundle load) { super.onCreate(load); setContentView(R.layout.fragment_ride_tracking); //mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.myMapView)).getMap(); mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); int result =

update polyline according to the user moving android googleMaps v2

岁酱吖の 提交于 2019-12-28 06:45:17
问题 I have googleMap (v2) with polyline that presents a route between the user current location and the destination point. Now, I want to update the polyline according to the user moving. I tried to redrawing the whole polyline when location is changed but the polyline is flickering. I didn't find any appropriate function in the PolylineOptions class (the function add() is only to add a vertex but not to update or remove) do you have any idea how to update the polyline ??? thank you for giving

Unable to instantiate android.gms.maps.SupportMapFragment

余生长醉 提交于 2019-12-25 10:57:29
问题 I have a view with a facebook style side bar navigation. On the main view I want to display my map. I have followed Google's tutorial exactly! But I keep running into the error Unable to instantiate android.gms.maps.SupportMapFragment. I did manage to run this on a plain project but when I merge it with my main project this error pops up: 07-25 13:27:53.778: E/AndroidRuntime(24841): Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment com.google

How to inject a Maps Android v2 API Key into an application?

痞子三分冷 提交于 2019-12-25 10:54:10
问题 It seems that is not possible to set an API v2 key programatically, so is there any other method to set this value after build. 回答1: i think its not possible because, During the build process, your Android projects are compiled and packaged into an .apk file, so you can't change it after build ! official documentation: http://developer.android.com/tools/building/index.html 来源: https://stackoverflow.com/questions/17594737/how-to-inject-a-maps-android-v2-api-key-into-an-application