android-maps

Google Maps Geocoding API V3 search ok with wifi but responses OVER_QUERY_LIMIT with data connection

大城市里の小女人 提交于 2019-12-30 07:22:14
问题 My Google Maps activity searches for addresses with Google Maps Geocoding API V3. I see that sometimes, even if I repeat the search multiple times in sequence, Google Maps response is OVER_QUERY_LIMIT when I'm connected with data connection. It also happens on the first search after app's installation on a device. When I'm connected with wifi it works perfectly. Here's my code. Search method: public static JSONObject getAddressInfo(String sAddress) { HttpGet httpGet = new HttpGet("http://maps

Google Play Service - SupportMapFragment.getMap() always returning null [duplicate]

删除回忆录丶 提交于 2019-12-28 05:58:26
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How do I know the map is ready to get used when using the SupportMapFragment? I am currently testing the new Maps API V2 but I'm really having trouble getting it to work correclty. My problem is that getMap() always returns null. I have tested the call in 3 different points: onCreate() onResume() in a Handler that is called some seconds after the map is already visible on the screen Here is the code: public

Android: Circular Google Map fragment

旧时模样 提交于 2019-12-25 13:27:45
问题 I am using Google Map fragment in my Android app. But, I need to be circular in shape like below. How can I implement it? Map Fragment code snippet is: <fragment android:id="@+id/map" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent" /> 回答1: If you don't need the map to be interactive (no swiping, zooming, etc.), then you could use the Google Static Maps API which gives you an image of the requested map:

Android map Update location to server when there is difference of x meters between current location and last location

柔情痞子 提交于 2019-12-25 02:26:56
问题 I wanted to update the server with latlong of current location when there is difference of x meters between current location and previous location. I have a app where i wanted to track vehicle movement so the driver who is using that app inside the vehicle will automatically update its current location when there is difference of x meters between current position of cab and previously stored location. So other users will be able to locate this driver where exactly is.(So in this case should i

moving map in mapview from one location to another in android

别等时光非礼了梦想. 提交于 2019-12-24 20:17:00
问题 i have a situation in my app where i should move my map from one location to another location....i am quite new to android..and i found out how to draw a line in between two locations.. public class Mapview extends MapActivity implements LocationListener{ MapController mc; GeoPoint p,p1,p2; LocationManager lm; String provider; class Mapoverlay extends com.google.android.maps.Overlay { @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { // TODO Auto

Unable to get current GPS Location co-ordinates

痴心易碎 提交于 2019-12-24 15:52:14
问题 I have been trying hard to get my current location's GPS co-ordinates but my app never locks on to a GPS satellite. The GPS icon in the notification area just keeps on blinking. Whereas I tried using Google Maps on Android (the pre-installed app) and that thing is able to lockon in approx 60 secs! In both of the cases my 3G data connection was switched on and working. Update : I am using Android 2.3.3 (HTC Desire S (Factory installed OS; no updates applied)) Logcat output is here. Now this is

Android set Listener for marker on google map

こ雲淡風輕ζ 提交于 2019-12-24 09:47:56
问题 This is the overlay class I am using in Google Maps. I added two markers to it and want to add a Listener to these markers. Below is my overlay class: protected class MyLocationOverlay extends com.google.android.maps.Overlay { @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); // Converts lat/lng-Point to OUR coordinates on the screen. Point myScreenCoords = new Point(); mapView.getProjection().toPixels(p,

Using Android MapView without the MapActivity?

删除回忆录丶 提交于 2019-12-24 08:39:15
问题 I'm in the process of encapsulating Android features and services, and I was trying to find the code of the MapActivity of Android to see how it is managing the MapView it contains, in order to implement this out side of this darn MapActivity which collides with my Android wrapper architecture... Is it even possible to use the MapView without the MapActivity? Does anyone know about legal limitations of using the MapView, as I see fit in my application? (for example to display four friend on a

How to get onTap in Polygon in osmdroid?

久未见 提交于 2019-12-24 05:17:33
问题 I have lot's of polygon drawn. Some of which overlaps. I want to be able to detect a tap inside the polygon and display a dialog saying it was clicked inside the polygon (this polygon should be detected on tap). This kind of property can be seen with ItemizedIconOverlay where we can detect all of the OverlayItem with the tap on the OverlayItem. How to implement this on polygon? The way I draw and add Polygon is: MyPolygon myNewPolygon = new MyPolygon(this); myPolygon.setPoints(Polygon

Best way to implement tabs with lists, fragments and maps?

放肆的年华 提交于 2019-12-23 17:43:43
问题 I'm trying to "port" an iOS app to Android. The original iOS app workflow is: Tab 1 List1 -> Detail -> DetailMap Tab 2 List2 -> Detail -> DetailMap Tab 3 Map -> Detail Where "List1" and "List2" are lists of places, "Detail" shows info about a place, "DetailMap" shows where the place is on the map. "Map" is a simple map with markers the user can click to reach "Detail". What's the best way to implement this workflow in Android? I know I should avoid using a TabActivity (deprecated), and