android-maps

Google map for android my location custom button

本小妞迷上赌 提交于 2019-11-26 12:12:09
问题 How can I change google map my location default button? I set my location enable and map draw standard image to find location, is it possible to change default image? 回答1: See below xml file to custom button: <?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" android:orientation="vertical" > <fragment android:id="@+id/maps" android:name="pl.mg6.android.maps

Google Maps api v2 class not found

久未见 提交于 2019-11-26 11:30:53
问题 I am using google maps api v2 and everything was working fine . today morning i updated the sdk and now maps are not working. Tried a lot of things like importing the lib project again and all but nothing seems to work . Plz help. This is the logcat output 05-16 08:53:34.327: E/dalvikvm(3422): Could not find class \'com.google.android.gms.maps.model.LatLng\', referenced from method com.apptree.de_luxe.InfoActivity.<clinit> 05-16 08:53:34.327: W/dalvikvm(3422): VFY: unable to resolve new

Creating Custom Overlay on the map

坚强是说给别人听的谎言 提交于 2019-11-26 10:24:44
问题 I am trying to replicate this feature of Maps in Android: You can see that on the map, there\'s a Circle depicting the range that the user has selected. In my application, I\'ll also want a dragger to reside on the perimeter of the circle, which can be dragged to redefine radius. If someone could tell me how to draw custom drawable overlays and 2D graphics over map, I can do other things on my own. Thanks! The full application can be reached at this link 回答1: Okay, I tried to do things on my

How to animate marker in android map api V2?

泄露秘密 提交于 2019-11-26 09:21:47
问题 I want to implement smooth transition to emulate car marker moving on the map. Is it possible to animate marker in android map api v2? 回答1: Try out the below code to animate the marker on Google Map V2. You need to use the Interpolator class to apply the animation on the Marker and handle it in the Handler for the animation as below: public void animateMarker(final Marker marker, final LatLng toPosition, final boolean hideMarker) { final Handler handler = new Handler(); final long start =

MapView inside a ScrollView?

喜夏-厌秋 提交于 2019-11-26 09:07:15
问题 I would like to have a MapView inside a ScrollView, however when I try to scroll the map, the ScrollView takes priority! Is there a way to give the MapView priority when scrolling inside the map, and the ScrollView otherwise? Thanks! 回答1: I have had a same problem for 10 days, but I got a solution a few minutes ago!! Here is the solution. I made a custom MapView and override onTouchEvent() like this. @Override public boolean onTouchEvent(MotionEvent ev) { int action = ev.getAction(); switch

How do I show a marker in Maps launched by geo URI Intent?

半世苍凉 提交于 2019-11-26 07:57:44
问题 I have a application where I want to show different locations (one at the time, picked by user input) by launching Google Maps with their specific geo coordinates. I\'m currently using this (with real lat. and long. values of course): Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"geo:<lat>,<long>?z=17\")); startActivity(intent); It\'s quite exactly what I want, except that it doesn\'t show any indicator or marker for the specified point. It only centers at it\'s location. Is

Using Google Places API

拈花ヽ惹草 提交于 2019-11-26 04:11:08
问题 I want to develop an application in which i want to display information about places nearby (within 1km )the user by getting its current location.. Say for example i want to display information about Restaurants, Shopping Malls, Hospitals located within 1km related to current location of the android device.. I have gone through this link : Using Google Places API in Android.. But didnt get more. Have anyone used Google Places API in android ? 回答1: Some points to keep in mind: In order to use

Google Maps Android API v2 Authorization failure

ⅰ亾dé卋堺 提交于 2019-11-26 01:45:12
问题 My steps: got SHA1 code from debug.keystore create app in google apis console enabled google map api v2 input SHA1;my.package.name get API key created AndroidManifest file: <permission android:name=\"my.package.name.permission.MAPS_RECEIVE\" android:protectionLevel=\"signature\"/> <uses-permission android:name=\"my.package.name.permission.MAPS_RECEIVE\"/> <uses-sdk android:minSdkVersion=\"8\" android:targetSdkVersion=\"15\"/> <uses-permission android:name=\"android.permission.INTERNET\"/>

MapView in a Fragment (Honeycomb)

假如想象 提交于 2019-11-26 01:06:04
问题 now that the final SDK is out with google apis - what is the best way to create a Fragment with a MapView? MapView needs a MapActivity to work right. Having the Activity managing the Fragments inherit from MapActivity (bad solution because it goes against the idea that Fragments are self contained) and use a regular xml based layout does not work. I get a NullPointerException in MapActivity.setupMapView(): E/AndroidRuntime( 597): Caused by: java.lang.NullPointerException E/AndroidRuntime( 597

MapView in a Fragment (Honeycomb)

*爱你&永不变心* 提交于 2019-11-26 00:06:25
now that the final SDK is out with google apis - what is the best way to create a Fragment with a MapView? MapView needs a MapActivity to work right. Having the Activity managing the Fragments inherit from MapActivity (bad solution because it goes against the idea that Fragments are self contained) and use a regular xml based layout does not work. I get a NullPointerException in MapActivity.setupMapView(): E/AndroidRuntime( 597): Caused by: java.lang.NullPointerException E/AndroidRuntime( 597): at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:400) E/AndroidRuntime( 597): at