android-mapview

Google map inside another fragment - Function like onLocationChanged is not working

岁酱吖の 提交于 2019-12-08 09:48:15
问题 My previous question Google map inside another fragment - Error when calling getMapAsync was answered. The google map is showing and the getMapAsync is now working. And I'm now finding the solution to the other functions like public void onLocationChanged(Location location) {...} public void onConnected(Bundle bundle) {...} Note: I'm trying to convert a google map activity to work inside a fragment that will be called in NavigationView. samplemapFragment.java package com.sample.samplemap;

How put put one transparent button over mapview?

跟風遠走 提交于 2019-12-08 09:31:08
问题 I would like to put transparent (map visible under it) button over mapview? How can i achieve that? 回答1: Try using this on the button android:background="@null" or android:background="@android:color/transparent" EDIT: to place over use a relative layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.maps.MapView android:id="@+id

Intercept two fingers touch on MapView inside ViewPager

我的梦境 提交于 2019-12-08 09:12:05
问题 So I'm trying to catch a two fingers gesture which the user should perform in order to PAN a MapView around. The given MapView is located inside a Fragment , and the fragment is a ViewPager 's page. The expected behavior is the ViewPager default, so swiping with one finger should change page, no matter which page the user is facing. The only exception is that if the fragment containing the MapView is showing, the user should be able to pan the map with two fingers (and with two fingers only).

Destroy MapView

假如想象 提交于 2019-12-08 08:49:21
问题 I have a MapActivity where you can switch between MapView (Google Maps) and OfflineMapView (my class, shows a map previously downloaded to SD card). When switching between maps I want to completely destroy and create the map views so that only one map view is in the memory. I want this for 2 reasons: My OfflineMapView takes most of available memory for caching tiles. Google MapView has some attached threads which I don't want running when OfflineMapView is visible. I tried to remove the

Android Google Map not loading in activity small layout

扶醉桌前 提交于 2019-12-08 08:26:56
问题 In my application i'm using map view in activity at bottom side.but map doesn't load properly.after clicking on map 2-3 time its shows clear map.& when same map if load in full view it's loading clearly. What is the solution for this? screen shot is- <com.google.android.gms.maps.MapView android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="200dp" android:layout_margin="10dp" /> java code- try { MapsInitializer.initialize(getApplicationContext()); } catch

How to know when activity is laid out?

浪子不回头ぞ 提交于 2019-12-08 07:37:41
问题 I've got a mapview that I want to put some markers on top of. I'll retrieve these from a webservice when I start the activity, so I need to know the minimum and maximum lat/lng pairs for the current viewport. I'm calling mMapView.getWidth() mMapView.getHeight() But they both return 0 while the activity is starting. I tried putting it in onAttachedToWindow, onResume, onPostCreate, onPostResume, onStart and so on, but to no avail. How can I know that the activity has finished laying out all the

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

How to get 3D building view in map view in Android?

点点圈 提交于 2019-12-08 04:44:51
问题 I used the map setting, googleMap.setBuildingsEnabled(true); But it's not working. About a month ago, it was working fine. Attaching the screenshot for ref. This is the view I was getting a month ago. Now map shows 2D view. 来源: https://stackoverflow.com/questions/44268824/how-to-get-3d-building-view-in-map-view-in-android

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

Getting xml data in DetailView from a map view (Iphone IOS)

馋奶兔 提交于 2019-12-08 03:12:23
问题 We are trying to create a mapview with annotations loaded from a xml file. This works so far, and is making use of the KMLViewer code on the apple developer library. Now we are trying to load the data from the XML file into the detailview but only the corresponding entry. So when you click on details on a city for instance, details must be loaded from the xml file of that city. We are trying for days now but just don't know where to start. We have the following code now: detailviewcontroller