mapfragment

Pulse ring animation around a Google Maps marker in Android

允我心安 提交于 2019-12-18 12:00:28
问题 I want to add a pulse ring animation on blue dot current user location in Android google mapFragment (like Uber). Can anybody help me with this thing? 回答1: I have found a solution to add pulsating animation to a marker. Here is the map part, Here variable "map" denotes your map. private Circle lastUserCircle; private long pulseDuration = 1000; private ValueAnimator lastPulseAnimator; private void addPulsatingEffect(LatLng userLatlng){ if(lastPulseAnimator != null){ lastPulseAnimator.cancel();

Google mapfragment not working in android

为君一笑 提交于 2019-12-18 09:49:40
问题 I have made a very simple demo program for android map view (api v2) by referring the following link,But my program doesn't shows map.its not running.Please help me,My code is as below: main.xml <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google.android.gms.maps.MapFragment"/> main.java package com.example.mymap;

Mapfragment findFragmentById always null

丶灬走出姿态 提交于 2019-12-18 07:39:11
问题 I have problems to access the fragment of the map. getFragmentManager().findFragmentById(R.id.map)) returns always null. I don't know why. What's the problem? Thank you! <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:id="@+id/tvNombreCentro" android:layout_width="wrap_content" android:layout_height="wrap_content" android

Should I use MapView or MapFragment

你。 提交于 2019-12-17 15:29:29
问题 I am not sure whether I should be using MapView or stick to using a MapFragment . My application is an app that finds the nearest set of places that are closest to you. I want to be able to add locations, display details of a marker when I press a marker and when the user moves along the map I want to be able to get the coordinates of the center of the map and display the nearest locations within a defined radius. Would I be at a disadvantage if I continue to use MapFragments or should I

Google Map Android API v2 getMap() error

主宰稳场 提交于 2019-12-13 09:07:42
问题 Hi I'm trying to implement Google Maps display in my app using Google Map Android API v2, and I am trying to follow the solution in here. Codes seem to be okay except when I tried this part: public class MapFragment extends SherlockMapFragment { private GoogleMap mMap; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = super.onCreateView(inflater, container, savedInstanceState); mMap = getMap(); return root; } } The getMap

how to call interface from TouchableWrapper class in android

柔情痞子 提交于 2019-12-12 06:49:00
问题 I need to call interface while double tap on google mapFragment. I am able to detect double tap on map now. This is my TouchableWrapper class public class TouchableWrapper extends FrameLayout { GestureDetectorCompat mGestureDetector; public TouchableWrapper(Context context) { super(context); mGestureDetector = new GestureDetectorCompat(context, mGestureListener); } private final GestureDetector.SimpleOnGestureListener mGestureListener = new GestureDetector.SimpleOnGestureListener() {

Android MapFragment within a Fragment

感情迁移 提交于 2019-12-11 11:47:00
问题 I found many threads related to adding a map fragment within a fragment. But they didn't help me solve my problem. Im trying to add a map fragment to a fragment. But Im getting Null pointer exception as below : 11-25 10:19:55.222 9101-9101/com.uma.mobile E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.uma.mobile, PID: 9101 java.lang.NullPointerException at com.uma.mobile.subview.ShopDetails.<init>(ShopDetails.java:122) at com.uma.mobile.activity.Shop.onCreateView(Shop.java:119) at

Capture double tap from map fragment

允我心安 提交于 2019-12-11 08:27:20
问题 I am trying to capture the double tap event using a gesture detector. I have an overlay frame that is placed on top of my map fragment, and implements ontouch and ongesture listeners. The problem is I can only seem to get one layer to capture the events. If I change onDown to return true the overlay consumes all events and the map is not usable. If I have it return false the map instead also uses the double tap event, and zooms in when I do not want it to do that. Here is the relevant code

Android DrawerLayout with MapFragment black screen when returning to map

喜欢而已 提交于 2019-12-11 01:04:04
问题 I've been experimenting with android.support.v4.widget.DrawerLayout and have 4 fragments to choose from the drawer. The map initially loads with no problems however when I open the drawer and change fragments I am unable to then go back to the map. I just get a black screen. Logcat is showing the fragment is re-created but yet I get nothing. Just a blank black screen. I can switch between the other fragments with no problem. What am I doing wrong? My project has a Min API of 14. I load the

MapFragment Styled as Dialog causes TextView to be transparent

可紊 提交于 2019-12-11 00:55:35
问题 Here's the setup: I'm constructing and displaying Activities that are styled as centered Dialogs. This is to show hierarchical content that shouldn't be full-screen on the device. One type of content is a map. So i've successfully loaded a MapFragment into a Dialog-styled FragmentActivity. This works really well. The problem is when I attempt to place a new TextView (acting as a custom title bar) above the map. The issue is that the TextView's content seems to become transparent and the