android-mapview

Label at the top of the marker in google maps api v2

依然范特西╮ 提交于 2019-12-11 07:49:29
问题 One more problem while switching to the maps api v2. This is an ugly representation of what i want to achieve. Edit1. There can be several markers, every marker with its own label. All markers and labels are shown simultaneously. As you can see there is a label with some information at the top of the marker. While using api v1 it can easily be done with drawing marker and label on Overlay . How can I implement it using api v2? The first idea is to render marker(red) and label(black) to one

MapView MultiTouch zoom (Pinching) unreliable and chaotic

会有一股神秘感。 提交于 2019-12-11 07:43:59
问题 I use the MapView from Google and have real bigger problem with it. Especially with the multitouch zooming. I am using an Android 2.2 Tablet. First thing needed to make this working was specifing in the AndroidManifest that xlarge screens are supported. So what happen now. 90 % of the time zooming works. But sometimes it does not work and all my overlays (I also use Views from mapballons project to display on top of the map) are moving around while the tiles stay at the same position .

Adding Multiple Annotations to Map View Not Working

时光怂恿深爱的人放手 提交于 2019-12-11 07:36:36
问题 So I have successfully added a single annotation to the map view with a custom image, however if I add a second annotation it merely refuses to display on the map. Here is the relevant code: - (void)viewDidLoad { [super viewDidLoad]; //mapView = [[MKMapView alloc] initWithFrame:self.view.bounds]; mapView.delegate = self; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Location Info" style:UIBarButtonItemStylePlain target:self action:nil]; self.navigationItem

MapView / MapActivity crash on some devices

那年仲夏 提交于 2019-12-11 07:36:01
问题 I have gone through Google's MapView tutorial and it works fine on the emulator and for example on my HTC Flyer. But for some reason it immediately crashes when starting it on my mobile phone (Samsung Galaxy I9000). The crash happens there, because right at the beginning the Bundle that onCreate() receives is null. I'm compiling against Android 2.3.3. This is installed on the phone as well. The Flyer uses Android 3.0 I'd greatly appreciate any help on this weird issue. This is the excact

Why doesn't Google's MapView show traffic outside of the USA on Android 2.2?

梦想与她 提交于 2019-12-11 06:26:10
问题 I'm have the Google MapView embedded in an Android app I'm writing and I want it to show the traffic layer of data. I can do this using:- mapView.setTraffic(true); And I've even made sure I use the... mapView.invalidate(); ..trick to work around a bug. The app displays traffic data in the USA only for some reason! It won't display any in other countries. I have other apps using the Google MapView and they do show traffic in my home city (Sheffield, UK). Does anyone know how I can make it

Problems when my googlemaps view activity regain the focus (map with black zone in down part of the window)

≡放荡痞女 提交于 2019-12-11 05:49:12
问题 i have a problem with my app, it haves a lot of activitys, two of them haves googlemap views. My A activity haves a full mapview and my B activity haves a small map view. OK, when i am on the B activity and press back key somethimes until i return to my A activity, the map of my A activity shows with errors, with a black zone in the down part of the window. THis only happens when i press back from the B activity. Because this, i need to implement/override onResume() method of A to RESTART THE

draw circle with transparency in mapview

橙三吉。 提交于 2019-12-11 03:56:40
问题 I have a problem with mapview and Overlay. I must to draw a circle on the map everytime that change GPS position. I used the method draw in my overlay class that extend overlay. The problem is that I must draw these circles with transparency, but when the circles overlap each other in the intersection point the color it's different because there is a sum of alpha. How I can fix it? This is my overlay class: public class ImpactOverlay extends Overlay { private static int CIRCLERADIUS = 0;

How to scale a MapView from Pixels to Meters

送分小仙女□ 提交于 2019-12-11 03:46:51
问题 I'm making an Android application which uses Google Maps API, and I want to scale a MapView to X_pixels:X_meters. For example, 5 pixels of the MapView in my screen, 20 meters on reality. Is that possible? Thx 回答1: Use the following code: int nPixles = 5; //number of pixels GeoPoint g0 = mapview.getProjection().fromPixels(0, mapview.getHeight()/2); GeoPoint g1 = mapview.getProjection().fromPixels(nPixles, mapview.getHeight()/2); float[] results = new float[1]; Location.distanceBetween(g0

Android MapView parts of map missing

本秂侑毒 提交于 2019-12-11 03:35:49
问题 Any thoughts of what that might be? The only manipulation I did to the overlay was to draw the pointer in the middle. The code follows public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); Point myScreenCoords = new Point(); mapView.getProjection().toPixels(point, myScreenCoords); Paint paint = new Paint(); paint.setARGB(255, 255, 255, 255); Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.google_maps_marker);

FragmentActivity with a Fragment Containing a MapView

狂风中的少年 提交于 2019-12-11 03:33:31
问题 I know there are a few questions like this but what I'm looking for is slightly different the way I see it. THE PROBLEM I have one Activity and I am only ever going to have one Activity . I do however have multiple Fragments ; one of which contains a MapView . I have successfully got this working in API level 3.0 and greater. However, the problems start when I want to go lower than this using the compatibility library as I then need to make my Activity extend FragmentActivity to get Fragments