android-maps

Action Bar in API Level > 3.0 but Still Support API < 3.0

心不动则不痛 提交于 2019-12-08 06:58:52
问题 Yet another compatibility question. THE PROBLEM I need to use a tabbed action bar in api level 3.0 and greater to switch between fragments . However, I also need to be able to switch between these fragments somehow in api level < 3.0. The spanner in the works is the fact that I have already downloaded a custom compatibility library that allows me to use google maps with fragments and therefore I can't use a library. THE QUESTION How can I implement a tabbed ActionBar solution in 3.0 and

Problem in Getting the Current Location in Android

懵懂的女人 提交于 2019-12-08 06:32:42
问题 I want to display latitude and longitude my current location.. For this rather than searching in Google, i searched in SO. I just want to display my current location latitude and longitude. See my code below : public class LocationGetter extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); LocationManager mlocManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); LocationListener

Customize color scheme of google maps V2 in android

此生再无相见时 提交于 2019-12-07 14:39:44
问题 Currently I'm working with google maps v2 in my android application and i've faced a problem of colour scheme customization of maps. I saw it's possible in web with javascript here https://developers.google.com/maps/customize and http://jsfiddle.net/SQvej/ some example in js var settingsItemsMap = { zoom: 12, center: new google.maps.LatLng(40.768516981, -73.96927308), zoomControlOptions: { style: google.maps.ZoomControlStyle.LARGE }, styles:[ { featureType: "water", stylers: [ { hue: "#F4B741

Google Play Services missing on Android 2.2 emulator while using Google Maps API v2

十年热恋 提交于 2019-12-07 11:13:12
问题 Hey I am trying to use Google Maps on my emulator even though I've installed Google Play Services library when I run the app it says This app won't run without Google Play Services which are missing from your phone on LogCat I get the warning about it but not really sure why I am getting this. my MainActivity.java package com.mapsmaps; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.Menu; import com.google.android.gms.maps.GoogleMap; import com

Views Don't Update Until MapView is Touched

荒凉一梦 提交于 2019-12-07 07:14:58
问题 I have an Activity that mostly consists of a large MapView. On top of that MapView, I have a couple of other Views that I'm attempting to interact with programmatically. My first problem occurred when I tried to use an AnimationListener to animate one of the Views on top of the MapView. The AnimationListener would not fire until I touched the MapView. This was fixed by ditching the AnimationListener and calling setVisibility() and other code sequentially. It's not ideal, but it works fine. My

Action Bar in API Level > 3.0 but Still Support API < 3.0

*爱你&永不变心* 提交于 2019-12-06 16:03:44
Yet another compatibility question. THE PROBLEM I need to use a tabbed action bar in api level 3.0 and greater to switch between fragments . However, I also need to be able to switch between these fragments somehow in api level < 3.0. The spanner in the works is the fact that I have already downloaded a custom compatibility library that allows me to use google maps with fragments and therefore I can't use a library. THE QUESTION How can I implement a tabbed ActionBar solution in 3.0 and greater and also cater for the bigger market that is 3.0 and less? Any help would be grand. What you want is

Multiple map views?

这一生的挚爱 提交于 2019-12-06 16:02:06
问题 I have an application that has two map views one satellite and one street view. They both keep showing up as a satellite view even though one is set to setStreetView(true); and the other is set to setSattelite(true); . How would I get it so that both views show different maps? Thanks in advance. 回答1: Assuming you are talking about showing both at the same time, it doesn't appear to be possible. See How to Make 2 MapView on One Activity Updated to respond to comment. Per the Google Map API

Android Navigation intent

…衆ロ難τιáo~ 提交于 2019-12-06 14:17:55
问题 If you mail a Google Maps direction to your Android phone, you have the possibility to open it in the Maps appliaction, this seems perfectly logical, as does the code behind it. Now, once in the Maps App, you have the possibility to open these directions in the Navigation App, with those exact directions. How does this work? It must not be that difficult to do it, I know about the intent with "google.navigation:q=..." But this only works on some devices and only with coördinates or addresses.

Error when try to add Google Maps

久未见 提交于 2019-12-06 14:08:09
问题 Couple moths ago i testing this app on Android N and all will work correctly, but now i have error. Now i'am using MapFragment and have this error: 05-09 23:22:35.816 11112-11112/pc.dd.sex_startup E/AndroidRuntime: FATAL EXCEPTION: main Process: pc.dd.sex_startup, PID: 11112 java.lang.RuntimeException: Unable to start activity ComponentInfo{pc.dd.sex_startup/pc.dd.sex_startup.LogIn.Maps.Map}: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating

How to make an android app run in background when the screen sleeps?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 13:53:40
问题 I am developing a Tracking app, which keeps tracks of the user by getting his current location for every 3 secs. I am able to fetch the lat long values when the screen is on. but when the screen sleeps. i am unable to fetch the datas. CODE: @Override public void onLocationChanged(Location location) { mLastLocation = location; if (mCurrLocationMarker != null) { mCurrLocationMarker.remove(); } latitude = location.getLatitude(); longitude = location.getLongitude(); latLngcurrent = new LatLng