google-maps-android-api-2

Google map V2 and navigation drawer

心已入冬 提交于 2019-12-10 12:16:17
问题 PROBLEM I want to use Google Map V2 in Navigate Drawer but I can't disable Navigate Drawer and give touch handler to the map when it was touched. What should I do ??? NOTE I have experience the similar problem like this before... I would like to use SeekBar in Navigate Drawer and it can't scroll the SeekBar. At that time, I can archive it by using onTouchListener() for SeekBar directly but now it cannot. 回答1: SOLUTION So, here is my solution thank to this post, I have adapt some code to

Geocoding API vs Geocoder

吃可爱长大的小学妹 提交于 2019-12-10 10:55:36
问题 In my application I need to use the geocoding, but I am not quite clear which method to use. Until yesterday I added the parameters to the URL maps.googleapis.com/maps/api/geocode/json?address=myparameter&sensor=false , but Google blocked my requests for a day, making the application crash because it did not return any results from the request for geocoding. Now I am using the Geocoder class that does the same thing and also I have seen that you can create and use an API key for Geocoding.

Change language in google maps v2 api

旧巷老猫 提交于 2019-12-10 10:35:24
问题 Is it possible to change the google map language displayed in my android app? My app uses api v2. I have changed the locale via settings to different languages but it doesn't have any effect on the maps displayed in my app. When i use google maps app , it displays the translations correctly. I think it uses api v3. 来源: https://stackoverflow.com/questions/24531604/change-language-in-google-maps-v2-api

How to place a Marker on center of the screen on google map

青春壹個敷衍的年華 提交于 2019-12-10 10:08:15
问题 Place marker on center of the screen on google map android same as like in uber and ola apps. When moving or scrolling a google map marker should not move and it should give latlng coordinates 回答1: You need to use frame layout to align your marker in this case a image like this at center. and then fetch location using googleMap.getCameraPosition().target for more info see http://developer.android.com/reference/com/google/android/gms/maps/model/CameraPosition.html#target 回答2: You need to put

Google Maps Android v2 not working with ActionBarSherlock Fragment Activity

本小妞迷上赌 提交于 2019-12-10 09:28:46
问题 I've followed the steps on Using ActionBarSherlock With the New SupportMapFragment to use the new Google Maps Android v2 API, but I'm getting some errors that is causing the application to crash on startup. I'm using Maven on my application, so I'm posting my AndroidManifest and POM files too. Can you help me please? Here's the error from logcat: 12-22 14:35:41.319: ERROR/AndroidRuntime(8565): FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable at com

Google Map Gradient Polylines for Android?

可紊 提交于 2019-12-10 02:46:53
问题 The question of how to do gradient polylines has been asked a number of times, however, I want to know if this comes built in for Android. In the following post, this question is poised and someone answered that as of May 2015, there was still no gradient polylines for Android: colourful polylines in android maps api v2 I have combed through all the documentation I can find and do not see anything about a gradient polyline function. Am I missing it? Because iOS has had this capability for

Change marker icon during runtime

做~自己de王妃 提交于 2019-12-10 01:35:01
问题 Is there a way to change Google Maps Android API v2 marker's icon during runtime without removing/re-adding the marker I want to change its icon? Can I apply transformations to it (like rotation)? Thanks. 回答1: Currently you can't change the marker at runtime, neither apply rotation to it. You can use a workaround though - I'm working on a BlinkingMarker class where I have to adjust the opacity of the marker image at runtime. The only solution right now is to create Bitmaps with different

How to specify onMarkerclick() for different types of markers in android

╄→гoц情女王★ 提交于 2019-12-09 19:23:59
问题 On google map i am placing different colors of markers for different purposes, here i want different functionality for onMarkerclick() for each marker( ex:all green color markers).How to make condition for this.here is my code to create one set of markers @Override public void onMapLongClick(LatLng touchlocation) { // TODO Auto-generated method stub googleMap.addMarker(new MarkerOptions() .position(touchlocation) .title("Event") .icon(BitmapDescriptorFactory .defaultMarker

Determine if Polygon is Within Map Bounds

不问归期 提交于 2019-12-09 19:00:54
问题 I have a big list of polygons (consisting of google maps polygon options) which I would like to check if they are within the bounds of the screen before drawing them. How do I determine if the polygon is within the screen bounds. Something like this: List<PolygonOptions> polygons = getPolygons(); LatLngBounds bounds = map.getProjection().getVisibleRegion().latLngBounds; for (int l = 1; l <= polygons.size(); l++) { if (bounds.Contains(polygons.get(l))) { map.addPolygon(polygons.get(l)); } }

Google Maps remove marker route context menu

荒凉一梦 提交于 2019-12-09 17:10:02
问题 I started a new project with the Google Maps template of Android Studio and just added a marker to the map. LatLng location = new LatLng(lat, lng); Marker marker = mMap.addMarker(new MarkerOptions() .position(location) .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker))); When I click the Marker there comes a little menu with a Google Maps icon on the bottom right corner: How can I get rid of this thing? I couldn't find anything I even don't know how to call it but I really need to