android-mapview

Google Maps Android API v2: My location marker always over other markers?

半腔热情 提交于 2019-12-30 02:29:09
问题 Currently migrating an Android app using Google Maps to Google Maps Android v2; I want the map to display the built-in location marker, as well as custom markers. With the previous library, I used to draw the location marker 'below' custom markers, with mapView.setReticleDrawMode(ReticleDrawMode.DRAW_RETICLE_UNDER); I can't find a similar option in the new API. Did I miss something? 回答1: After a bit a searching, I couldn't find such an option. I finally removed the location pin, and added a

Tutorial — Android Map Pin drop animation — Working right [closed]

时光毁灭记忆、已成空白 提交于 2019-12-30 00:42:06
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I needed the map pin drop animation for my android application. Doing a lot of research, i found nothing useful . So i created a small hack. Just posting the code so that other can use it and modify it

OnTouch in MapView only fires the first time

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-29 06:24:08
问题 I'm trying to implement a double-tap zoom like function in my MapView. The event always fires the first time, but never subsequent times. Below is my code. I have a feeling it has something to do with the map controller getting lost after the first time the event is fired. import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import

How to draw line on Map View given coordinates?

我的梦境 提交于 2019-12-29 05:33:18
问题 How to draw line on MapView given coordinates? AFAIK, on iPhone it is possible. Please advise. Thanks in advance. 回答1: To use a MapView your Activity must extend MapActivity. For each line you want to draw (or really anything else) you need to subclass Overlay and do the drawing in the Overlay 's onDraw() method. Once you've created your Overlay add it to the MapView with something like mMapView.getOverlays().add(new MyOverlay()); . Inside your custom Overlay you'll want to get a Projection

Android Google Maps: XML layout errors

China☆狼群 提交于 2019-12-29 02:01:44
问题 I am trying to get google maps v2 to work in android using android studio. I got all my keys and manifest setup. When I try and create xml for the actual activity that the map will show up on I get errors. My xml looks like this: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <fragment xmlns:android="http://schemas

Google Map Navigation in Flutter

别等时光非礼了梦想. 提交于 2019-12-28 12:42:47
问题 I'm new to flutter. I found Flutter doesn't support inline map, only a static map view. I wanted to build an app which I need to show the driving directions on the map. Is it possible to create the same in flutter? 回答1: you can use android_intent library in flutter for starting googlemaps and get diection in android. library : https://pub.dartlang.org/packages/android_intent and in ios you can use both google api like comgooglemaps or google map url {i choose this one} and maps.apple.com.

Android GeoPoint with lat/long values

岁酱吖の 提交于 2019-12-28 03:56:08
问题 I am trying to get a GeoPoint for -23.4456 by 45.44334 What values do I pass into the constructor of the GeoPoint as it take Ints only. 回答1: GeoPoint coordinates are based in microdegrees (degrees * 1e6) -- written here float lat = -23.4456f; float lng = 45.44334f; GeoPoint gp = new GeoPoint((int)(lat * 1E6), (int)(lng * 1E6)); 回答2: rather than repeating the math throughout my app, i prefer to create a LatLonPoint: private static final class LatLonPoint extends GeoPoint { public LatLonPoint

How to move legal link in mkmapview IOS 7

依然范特西╮ 提交于 2019-12-26 03:08:08
问题 as all we know Apple, we always need to change something for each update. Did somebody solve the moving problem for map legal link? I tried many ways to control legal label but, just it can be hidden? what else I can do? thanks in advance 回答1: You need to change bottomLayoutGuide for your UIViewController. Create a class with following code: MapLayoutGuide.h @interface MapLayoutGuide : NSObject <UILayoutSupport> -(id)initWithLength:(CGFloat)length; @end MapLayoutGuide.m #import

Annotating MKMapView in offline mode

大兔子大兔子 提交于 2019-12-25 08:06:17
问题 In my application, I have a map view displaying nearby locations in a regeon. I can annotate my current location and other fixed locations in the map when the application be in online. The User would change his location(he is travelling),and some time he would be in offline mode. Is there any way to display his current location in map in offline mode? I could display the all other fixed locations already pinned into map. 回答1: Its not possible to display pins in off line mode. When I added pin

Animated Menu Buttons on top of MapView

落爺英雄遲暮 提交于 2019-12-25 07:54:49
问题 I have a MapView that I would like to have an animated Menu of options that slide in from the left of screen and overlays the a MapView when the user clicks an icon on the top navbar. The desired behavior is: 1. User clicks icon on top nav bar 2. Menu slides in from the left, displays buttons with different options. 3. If user select to cancel or return to Mapview, the Menu slides out to the right and disappears. What is the best approach to implement this behavior on top of a MapView? 回答1: