android-maps

google map not working on both emulator and device

核能气质少年 提交于 2019-11-28 06:37:33
问题 I am trying to run a simple google map but its not working its showing only map background.checked on both emulator and device. xml file:- <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment"/> Java class import android.os.Bundle; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.SupportMapFragment;

Android google map version 2 shows blank white page?

纵然是瞬间 提交于 2019-11-28 05:47:55
问题 In my application am using Google map version 2.When i run the application in real device through eclipse means it shows the map.but when i export the application as signed apk and am upload my apk in play store.Then i download the uploaded apk file from play store and am run it in my device but it shows only blank white page.i don't know whats the problem.Can any know.please help me to solve this issue. 回答1: You have to require signed apk with SHA-1 Step 1: Now locate to jdk in C drive

Finding nearest locations using Google Maps API

南楼画角 提交于 2019-11-28 03:24:37
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? MrUpsidown If you already have the coordinates of your bike stations and if you trust this data, then just use it to draw your markers. Now you have to define

Google map not show any thing in map

可紊 提交于 2019-11-28 01:46:21
问题 i am showing a map in activity ... but when i run app on device it does not show any thing , it show just white screen and zoom in zoom out options... MAP key is right .. thanks .. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.edxample.finalmap" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <permission android:name="com

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

▼魔方 西西 提交于 2019-11-28 01:43:59
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 if (mapView == null) { mapView = (MapView) findViewById(R.id.mapview); } mapView.setLongClickable(true);

Google Maps V2 shows blank screen on android 2.2

最后都变了- 提交于 2019-11-27 23:43:11
I tried following a tutorial on Android Maps V2 Quick Start But when I run the app, a blank map screen is shown. My phone uses android 2.2.1. This is what shows in logcat: 12-07 18:07:52.479: W/dalvikvm(1654): VFY: unable to resolve instance field 24 12-07 18:07:53.129: W/dalvikvm(1654): Unable to resolve superclass of Lmaps/a/du; (411) 12-07 18:07:53.129: W/dalvikvm(1654): Link of class 'Lmaps/a/du;' failed 12-07 18:07:53.139: W/dalvikvm(1654): Unable to resolve superclass of Lmaps/a/ej; (2363) 12-07 18:07:53.139: W/dalvikvm(1654): Link of class 'Lmaps/a/ej;' failed 12-07 18:07:53.139: W

Google Play Service - SupportMapFragment.getMap() always returning null [duplicate]

*爱你&永不变心* 提交于 2019-11-27 22:05:43
Possible Duplicate: How do I know the map is ready to get used when using the SupportMapFragment? I am currently testing the new Maps API V2 but I'm really having trouble getting it to work correclty. My problem is that getMap() always returns null. I have tested the call in 3 different points: onCreate() onResume() in a Handler that is called some seconds after the map is already visible on the screen Here is the code: public class MapActivity extends FragmentActivity { private SupportMapFragment mMapFragment; @Override protected void onCreate(Bundle arg0) { super.onCreate(arg0); setupMap();

How to move the Android Google Maps API Compass Position

北城余情 提交于 2019-11-27 20:31:23
Does anyone know if you can change the compass position within the map? All I can find is how to enable or disable it. But I need to move it down a bit so my overlay is not obstructing it. Use GoogleMap.setPadding() method: https://developers.google.com/maps/documentation/android/map#map_padding @Override public void onMapReady(GoogleMap map) { try { final ViewGroup parent = (ViewGroup) mMapView.findViewWithTag("GoogleMapMyLocationButton").getParent(); parent.post(new Runnable() { @Override public void run() { try { Resources r = getResources(); //convert our dp margin into pixels int

Google Map v2 Marker Animation

半城伤御伤魂 提交于 2019-11-27 19:32:51
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. D-32 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.toScreenLocation(marker.getPosition()); final LatLng startLatLng = proj.fromScreenLocation(startPoint); final

what makes my map fragment loading slow?

我是研究僧i 提交于 2019-11-27 17:51:38
Performance Enhancement: Previously I saved ALL images in drawable folder, this might be the reason why the map first loads slow, when draw the markers on screen, the image may not fit the screen size. Now I saved images in drawable-mdpi , drawable-hdpi and so on, the app works smoother than before. Hope it helps Original Question: I created a map in a fragment, the source code can be found below. The map fragment is sluggish when the first time it loads. If I go any other fragment and click the map fragment again, it loads fast and no slug anymore. Can anyone tell me what is going on here?