android-maps

Using Google Maps API v2 on devices without Google Play

落爺英雄遲暮 提交于 2020-01-05 06:42:23
问题 Google Maps API V2 for Android is a big leap forward compared to v1: better rendering, fragment support... But there is one grey area I am trying to clarify about its use. I look forward to create a map-based application for an Android device that does not have Google Play on it i.e. did not pass Google validation such as a low-end tablet or a car radio, and distrbute it on third-party markets. Such applications using V1 API are possible. The V2 has a dependency on Google Play Services, which

How to open navigation instead of mapview in android?

别来无恙 提交于 2020-01-03 18:52:08
问题 I have plotted location and if it has been clicked, it goes to maps and from maps, if it has been clicked direction, it opens google navigation.Is it possible to directly link with navigation? I have defined the code like this. GeoPoint pt = item.getPoint(); String lat = Double.toString(pt.getLatitudeE6() / 1e6); String lng = Double.toString(pt.getLongitudeE6() / 1e6); intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + lat + "," + lng)); In uri, what should be

How to open navigation instead of mapview in android?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 18:50:07
问题 I have plotted location and if it has been clicked, it goes to maps and from maps, if it has been clicked direction, it opens google navigation.Is it possible to directly link with navigation? I have defined the code like this. GeoPoint pt = item.getPoint(); String lat = Double.toString(pt.getLatitudeE6() / 1e6); String lng = Double.toString(pt.getLongitudeE6() / 1e6); intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + lat + "," + lng)); In uri, what should be

Error this API project is not authorized to use this API. Please Ensure this API is activated in the Console

≯℡__Kan透↙ 提交于 2020-01-03 17:50:07
问题 I have created an android project that make use of Google Places API. Once I send request for the nearest places am getting this error: Error This API project is not authorized to use this API. Please Ensure this API is activated in the Console I have already enabled Google Places api for Android and am using browser API key. My question is How do I activate my API? Or is it supposed to be purchased? 回答1: I got solution. I wanted to display nearest places around my location in my android

Error this API project is not authorized to use this API. Please Ensure this API is activated in the Console

不打扰是莪最后的温柔 提交于 2020-01-03 17:49:25
问题 I have created an android project that make use of Google Places API. Once I send request for the nearest places am getting this error: Error This API project is not authorized to use this API. Please Ensure this API is activated in the Console I have already enabled Google Places api for Android and am using browser API key. My question is How do I activate my API? Or is it supposed to be purchased? 回答1: I got solution. I wanted to display nearest places around my location in my android

How to display direction arrows in the map marker for google maps v2 android

こ雲淡風輕ζ 提交于 2020-01-03 10:07:06
问题 I want to display markers like these below on my android map application. I Know I have to use custom marker for this I also have the angle calculated but I don't know how to display the arrow on the marker. Any pointers will be helpful and Thanks in advance. 来源: https://stackoverflow.com/questions/19693969/how-to-display-direction-arrows-in-the-map-marker-for-google-maps-v2-android

Android OverlayItem.setMarker(): Change the marker for one item

允我心安 提交于 2020-01-02 02:00:16
问题 Trying to change the marker from an overlay item I noticed the setMarker() makes the item not visible. Here's the code sample. //Create new marker Drawable icon = this.getResources().getDrawable(R.drawable.marker); //Set the new marker to the overlay overlayItem.setMarker(icon); 回答1: A bounding rectangle needs to be specified for the Drawable: //Create new marker Drawable icon = this.getResources().getDrawable(R.drawable.marker); //Set the bounding for the drawable icon.setBounds( 0 - icon

Android Map API V2 set Custom InfoWindow Position

时光怂恿深爱的人放手 提交于 2020-01-01 19:04:35
问题 I'm using InfoWindowAdapter for all the markers on my Map (Api v2). All the Markers are well visible.. The issue is that My Custom InfoWindow is having size about 500px * 300px. When I'm touching any Points on the Map its being set to Center of screen so the InfoWindow is being cropped from Top.. My requirement is to auto adjust as per Info Window Size. Please have a look at snaps. 回答1: Override the default behaviour of OnMarkerClickListener . call marker.showInfoWindow() calculate position

Android Map API V2 set Custom InfoWindow Position

十年热恋 提交于 2020-01-01 19:04:25
问题 I'm using InfoWindowAdapter for all the markers on my Map (Api v2). All the Markers are well visible.. The issue is that My Custom InfoWindow is having size about 500px * 300px. When I'm touching any Points on the Map its being set to Center of screen so the InfoWindow is being cropped from Top.. My requirement is to auto adjust as per Info Window Size. Please have a look at snaps. 回答1: Override the default behaviour of OnMarkerClickListener . call marker.showInfoWindow() calculate position

URI for Google Maps Intent with waypoints

狂风中的少年 提交于 2019-12-30 13:44:21
问题 I would like to add to my app ability to open Google Maps app with more than 2 points but I can only set start point and end point. How to add waypoints? I've tried uri as described in https://stackoverflow.com/a/13565504/3626048 but it's not working. In Google Maps doc https://developers.google.com/maps/documentation/android/intents there's also nothing about it. Is it even possible to add waypoints to Google Maps intent? 回答1: I think you can use +to:waypoint after the destination address.