Tag: google-maps

How to disable marker click event?

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 […]

How to catch that map panning and zoom are really finished?

I am trying to write an application that will dynamically load data to map while user pans or zooms it. I need to track when the map is finished to change its view state (stops panning or zooming) and then load a new portion of data for creating markers. But in fact Google Maps API […]

distanceBetween() returns inaccurate result?

I use distanceBetween() of Location class to calculate the distance between two points as follows: private float getDistanceInMiles(GeoPoint p1, GeoPoint p2) { double lat1 = ((double)p1.getLatitudeE6()) / 1e6; double lng1 = ((double)p1.getLongitudeE6()) / 1e6; double lat2 = ((double)p2.getLatitudeE6()) / 1e6; double lng2 = ((double)p2.getLongitudeE6()) / 1e6; float [] dist = new float[1]; Log.i(“destination coordinates”, “Latitude:” […]

I'm trying to search nearby places such as banks, restaurants, ATMs inside the drawn area on google maps in android

I’m trying to search nearby places such as banks, restaurants, ATMs inside the drawn area on google maps in android. I get coordinates (Latitude and Longitude) in an array, but I’m unable to find nearby places by that array. Can somebody help me? I tried to search but found no results. Great help will be […]

Released unknown bitmap reference – Setting marker in android

CODE :- /** * Update marker position and icon */ private void setMarker() { synchronized (OBJ_LOCK) { if (mLatitude != 0.0 || mLongitude != 0.0) { mRotatedBitmap = rotateBitmap(mOriginalMarkerBitmap, mBearing); if (mRotatedBitmap != null) { mCurrentPositionIcon = BitmapDescriptorFactory .fromBitmap(mRotatedBitmap); mCurrentLocationMarker.position(new LatLng(mLatitude, mLongitude)); mCurrentLocationMarker.icon(mCurrentPositionIcon); mCurrentLocationMarker.anchor(0.5f, 0.5f); if (currentMarker != null && mCurrentPositionIcon != null) { currentMarker.setIcon(mCurrentPositionIcon); […]

Set a textview on top of a Map Fragment

I want to create this layout, but I am unable to set the Text Image on the fragment. My requirement to set the layout is as I show in the attached image. <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+id/relativeLayoutFragment” android:layout_width=”match_parent” android:layout_height=”fill_parent” > <!– ListRow Left sied Thumbnail image –> <LinearLayout android:id=”@+id/thumbnail” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_alignParentLeft=”true” android:layout_marginRight=”5dip” android:background=”@drawable/image_bg” […]

Map View draw directions using google Directions API – decoding polylines

I’m trying to use the Google directions API to show directions on my mapview but I am having difficulties getting the data from the JSON response. I can get the “levels” and “points” strings but can’t work out how to decode them to points on the map. Any help would be much appreciated.

Google Map Android API v2 can't display map in play store application

I am working with the Google Map Android API v2 in an android application. It works fine with the unsigned apk on a different device. But when I have signed the apk and uploaded my application to the Play Store the downloaded application displays a white screen instead of the map.

How to get a picture of a place from google maps or places API

I’m using Google Places API to retrieve data about places, but couldn’t find how to get a picture of that place, Google Places API just provides icon which is not the same. I need the photo you get when you search for a place in Google Maps in a web browser for example. There is […]

Google Maps API, do I need to buy?

I am currently creating an application (iPhone/iPad/Android) that uses a map to display houses offered by a rental company. The app is free on all stores. I have read through the terms and know of this clause: Use of the Google Geocoding API is subject to a query limit of 2,500 geolocation requests per day. […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.