android-maps-v2

Android google maps marker disable navigation option

断了今生、忘了曾经 提交于 2019-12-18 10:18:30
问题 Im creating an app where users need to walk to a point on a map. But they need to find a route to the point by them selves. Ive created a map with markers but by default if a user clicks on the marker a "start navigation" and "view in google maps" option is shown. Is it possible to disable these options ? The options that are shown on marker click 回答1: This thing is called Map Toolbar. You can disable it by calling UiSettings.setMapToolbarEnabled(false): GoogleMap map; ....... //init map map

Android - Google Maps inside CircleView

懵懂的女人 提交于 2019-12-18 09:08:57
问题 I wanted to show map inside a circle view where circle's outside area filled with a color. I referred a post Draw transparent circle filled outside. But now the problem is touch events. Map can be touched through outside circle view while I need map can be touched (zoom or move) only form inside Circle view (where the map is visible). What I tried, setEnabled=false clickable=false but still map is touched from outside circle view. Is that possible to achieve that map can be touched from

Open Street Map working offline android

孤人 提交于 2019-12-17 22:51:46
问题 I am a newbie to Open Street Map. I made some research and found that we can download and store the map into a folder. But i didn't find any tutorial or sample that provides offline Open Street Map. Can someone provide a step by step tutorial, a guide to implement offline open street map please. I am following this example http://android-coding.blogspot.com/2012/06/example-of-implementing-openstreetmap.html but now i want to make it available when there is no connection. 回答1: Like in the

mapFragment.getMapAsync(this) - NullPointerException

扶醉桌前 提交于 2019-12-17 22:36:05
问题 I am using com.google.android.gms:play-services-maps:7.5.0 version of Google Maps services. When trying to call the below I get java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.SupportMapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference . @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { SupportMapFragment mapFragment =

Google Maps Error - Android app ¦¦ v2

守給你的承諾、 提交于 2019-12-17 20:51:38
问题 I'm trying to add a map to my layout on an android app but I get the below code: 06-16 20:51:06.142 17581-17581/wk.gon250.dublinbike E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{wk.gon250.dublinbike/wk.gon250.dublinbike.StationDetailsActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class fragment at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2266) at android.app

How to constantly detect nearby marker locations from current location in Google Maps android?

社会主义新天地 提交于 2019-12-17 19:27:55
问题 I am trying to display a TextView at the top left corner of Google Maps that inform users if they are x distances from particular marker point locations, i.e. "You are close to location A", but only display the TextView if within range. If they move out of range, the TextView will disappear. I understand that the Google Places API shows you all the nearby locations, but I only want to show nearby locations of the markers I have on the map if users are x distances close to them. How can I

Animate a car(Marker) along a path in google map android

纵饮孤独 提交于 2019-12-17 17:58:33
问题 I am going to share a solution of moving a marker along the path if you have List.The Bitmap will move along the path from using LatLng list. 回答1: public static void setAnimation(GoogleMap myMap, final List<LatLng> directionPoint, final Bitmap bitmap) { Marker marker = myMap.addMarker(new MarkerOptions() .icon(BitmapDescriptorFactory.fromBitmap(bitmap)) .position(directionPoint.get(0)) .flat(true)); myMap.animateCamera(CameraUpdateFactory.newLatLngZoom(directionPoint.get(0), 10));

Android Maps API v2 Change MyLocation Icon

让人想犯罪 __ 提交于 2019-12-17 04:29:18
问题 I would like to replace the default icon that Android Maps V2 uses for 'My Location' (The little blue dot/arrow) with my own image. I've created my own tile provider that brings in a few maps which are predominantly blue and as such the default My Location icon is very hard to see. Previously I would have just overridden the draw method of the MyLocationOverlay , but there doesn't seem to be one in the new api. Any help would be great! EDIT: I also need the icon to be able to rotate, the same

Android Maps API v2 Change MyLocation Icon

元气小坏坏 提交于 2019-12-17 04:29:04
问题 I would like to replace the default icon that Android Maps V2 uses for 'My Location' (The little blue dot/arrow) with my own image. I've created my own tile provider that brings in a few maps which are predominantly blue and as such the default My Location icon is very hard to see. Previously I would have just overridden the draw method of the MyLocationOverlay , but there doesn't seem to be one in the new api. Any help would be great! EDIT: I also need the icon to be able to rotate, the same

Google maps API v2 find Marker by id

為{幸葍}努か 提交于 2019-12-14 03:59:58
问题 You can simply add Markers with the new V2 Google maps API on Android. Because the Markers are recreated on configuration change or on save instance, you have to reference them via its ids. The question is how to remove from map Marker with particular id? My use case is to add Markers to the map, store its id's with mapping to real objects. Then user removes one of this real objects, so I find the Marker id and want to remove Marker from the map and the only way I know about is to have Marker