google-maps-android-api-2

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

How to display nearby places like ATM's, hospitals in Android Google Map?

∥☆過路亽.° 提交于 2019-12-18 10:17:56
问题 How to display nearby places & place details like ATM's, Hospitals, Restaurants, etc. in Android Google Map This is the link that I used: Showing nearby places & place details using Google Places & Maps API I'm able to fetch my current location but nearby places are not getting displayed. Neither am I getting any error in my logcat 回答1: you can get places near by your location using Google Place API and for use of Place Api see this blog hope this will help you. 回答2: Get places nearby your

Could Not Find Class com.google.android.gms.maps.SupportMapFragment

只谈情不闲聊 提交于 2019-12-18 09:47:11
问题 So I'm working on an app that uses Google Maps v2 API to display a map overlay. I know this question has been asked before but I've tried everything. I am testing my app using a Nexus 5 device that is not rooted and has Google Play Services installed. LogCat displays the following: 09-14 20:18:27.646: E/dalvikvm(10951): Could not find class 'com.google.android.gms.maps.SupportMapFragment', referenced from method com.bryansworld.algonquinreview.MainActivity.setUpMapInitial 09-14 20:18:27.686:

How to display multiple markers with different icons in Google Maps Android API v2?

只愿长相守 提交于 2019-12-18 06:58:02
问题 I am parsing an XML file which contains the data for my Android Application that will be displayed on a map using the Google Maps Android API v2. The sample format of the XML file is: <markers> <marker name="San Pedro Cathedral" address="Davao City" lat="7.0647222" long="125.6091667" icon="church"/> <marker name="SM Lanang Premier" address="Davao City" lat="7.0983333" long="125.6308333" icon="shopping"/> <marker name="Davao Central High School" address="Davao City" lat="7.0769444" long="125

Google Maps v2 In fragment cashes when clicked twice

一个人想着一个人 提交于 2019-12-18 05:54:12
问题 I'm trying to set up Google maps in my app inside a fragment with a marker. It works when I click on it the first time but when I click on another fragment then back to the Google maps one it crashes. Not sure what the issue is? Any help would be awesome, only beginner. Heres code: 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

Draw ARC Polyline in Google Map

会有一股神秘感。 提交于 2019-12-18 05:49:04
问题 How Can I Draw Arc Polyline in Google Map ? I already used this code to create curved Polyline. Here is the method to draw curved Polyline: private void showCurvedPolyline (LatLng p1, LatLng p2, double k) { //Calculate distance and heading between two points double d = SphericalUtil.computeDistanceBetween(p1,p2); double h = SphericalUtil.computeHeading(p1, p2); //Midpoint position LatLng p = SphericalUtil.computeOffset(p1, d*0.5, h); //Apply some mathematics to calculate position of the

How to disable marker click event?

我们两清 提交于 2019-12-18 05:40:49
问题 I am developing an simple app, where I already displayed marker title with mrkr.showInfoWindow() but I don't want user to tap again that marker. How to disable clicking event of particular marker ? This is how I tried. Marker marker = gMap.addMarker(new MarkerOptions().position(new LatLng(location .getLatitude(), location.getLongitude())).title("I am here").icon(BitmapDescriptorFactory.fromResource(R.drawable.mrk1))); marker.showInfoWindow(); //how to use marker.setClickable here or somthing

Calculate the area of a polygon drawn on google maps in an Android application

荒凉一梦 提交于 2019-12-18 05:25:30
问题 I would like to calculate the are of a polygon drawn in a map fragment for a college project. This is how I draw my polygon. @Override public void onMapClick(LatLng point) { //tvLocInfo.setText("New marker added@" + point.toString()); map.addMarker(new MarkerOptions().position(point).draggable(true).title(point.toString())); markerClicked = false; } @Override public void onMapLongClick(LatLng point) { //tvLocInfo.setText("New marker added@" + point.toString()); map.clear(); } @Override public

travel time between two locations in Google Map Android API V2

你说的曾经没有我的故事 提交于 2019-12-18 05:05:12
问题 how to display travel time between two locations in Google Map Android API V2, in my program i using JSONParse to display driving distance, but i'm can't to display the display travel time, This example program I made: DirectionActivity.java public class DirectionActivity extends FragmentActivity implements OnMyLocationChangeListener{ private LatLng start; private LatLng end; private String nama; private final String URL = "http://maps.googleapis.com/maps/api/directions/json?"; private

Refreshing makers (ClusterItems) in Google Maps v2 for Android

早过忘川 提交于 2019-12-18 04:10:40
问题 I'm using Google Maps Android API Utility Library and I'm downloading certain images from internet that I want to use as markers. The way I'm doing it is like in the following snippet: class MarkerItemClusterRenderer extends DefaultClusterRenderer<MarkerItem> { ... @Override protected void onBeforeClusterItemRendered(MarkerItem item, final MarkerOptions markerOptions) { super.onBeforeClusterItemRendered(item, markerOptions); mImageLoader.get(item.getImageUrl(), new ImageListener() { @Override