android-mapview

How to layout zoom Control with setBuiltInZoomControls(true)?

拥有回忆 提交于 2019-11-28 09:27:32
would like to add a zoom control to the map. I also want to layout the position of the zoom Control instead of the default middle bottom position. I can do this by getZoomControl but it is deprecated. Could anyone tell me how to do this with setBuildtInZoomControls ? duskstriker This is how I got mine working finally (by embedding a ZoomControl in XML layout). mapView = (MapView) this.findViewById(R.id.mapView); ZoomControls zoomControls = (ZoomControls) findViewById(R.id.zoomcontrols); zoomControls.setOnZoomInClickListener(new OnClickListener() { public void onClick(View v) { mapView

Set minimum zoom level for MapView

Deadly 提交于 2019-11-28 09:18:30
Is there a way I can set a minimum zooM level for my MapView?. The map looks really ugly when zoom level is set to one because the whole world map replicated. I would like to block that zoom level. Ideally, it would work whether the user is zooming through gestures or zoom controls. Fortunately, i was having an overlay in my MapView. Otherwise, i guess you will have to create one, just for this tiny feature :-/. I wonder why there isn't any other way of doing this easier. Anyways, you just need to override your draw method like this: @Override public void draw(Canvas canvas, MapView mapView,

Swift 4.0 MapView Running Slow

♀尐吖头ヾ 提交于 2019-11-28 07:49:25
问题 Ever since I updated to Xcode 9 and Swift 4.0, my mapView in my simulator has been running extremely slow. I thought this would be because code would be deprecated or because my code was extensive causing it to slow down, but I added a mapView into a blank project and that mapView is slow to navigate/zoom as well! Are there some settings I need to configure to fix this in the simulator? This is the output produced in the console log: 2017-10-26 23:25:50.932530-0500 mapTest[7994:151068]

google map not working on both emulator and device

核能气质少年 提交于 2019-11-28 06:37:33
问题 I am trying to run a simple google map but its not working its showing only map background.checked on both emulator and device. xml file:- <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment"/> Java class import android.os.Bundle; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.SupportMapFragment;

android mapview maximum zoom level only 19

天大地大妈咪最大 提交于 2019-11-28 06:33:23
问题 I created a simple MapActivity on my android and discovered that its MapView can't be zoomed in to more than level 19. The zoom-in button just greys out. Calling the zoomIn() method is also to no effect, the level still stays at 19. However, when I start the official Google Maps application, exactly the same area of the map successfully zooms in two more levels to 21. Can anybody advise me on how I can zoom further in my own app? Am I missing setting some parameter explicitly (manifest,

How to display a MapView and a StreetView simultaneously?

时光毁灭记忆、已成空白 提交于 2019-11-28 06:10:55
问题 I want to display a MapView that may be used to select a point to be displayed by StreetView in a separate area. I know that the API disallows multiple MapViews in a single process. How can I cause StreetView to display in a different area than that which displays MapView? I have been able to grab a static streetview without any problems, but I want to have dynamic StreetView and MapView. aTdHvAaNnKcSe (THANKS in ADVANCE) 回答1: You can load 360 degree panoramic Google street-view in your

Getting coordinates when clicking anywhere on a MapView

♀尐吖头ヾ 提交于 2019-11-28 05:17:11
问题 I just cant get this working. I tried using the code below with onTouchEventand and it doesn't work. If i return true at the end of the method, i get the toast with the coordinates but can't move a map, and if i return false, i can move a map but cant display a toast after the user clicks on a map. If i get it right, the other onTap method is used only for clicking on a overlays. Has anybody figured this thiing out? public boolean onTouchEvent(MotionEvent arg0, MapView arg1) { //super

How to show a map in an Android mapactivity?

我的梦境 提交于 2019-11-28 05:01:34
问题 I have attached a mapview to my layout and have a it showing a compass and my current location. The problem I have is, that there is no street map shown in the view, so basically I just see the compass and my current location over a blank grid. 回答1: When you run or debug through Eclipse your app is signed with your debug key which will have been automatically created. It is not the same as the key you sign your app with when releasing it. You need to get an API key using your debug key. See

MapFragment in ScrollView

人盡茶涼 提交于 2019-11-28 03:47:29
I have one of the new MapFragment s in a ScrollView . Actually it's a SupportMapFragment , but anyway. It works, but there are two problems: When scrolled, it leaves a black mask behind. The black covers exactly the area where the map was, except for a hole where the +/- zoom buttons were. See screenshot below. This is on Android 4.0. The view doesn't use requestDisallowInterceptTouchEvent() when the user interacts with the map to prevent the ScrollView intercepting touches, so if you try to pan vertically in the map, it just scrolls the containing ScrollView . I could theoretically derive a

Android: DrivingDirections removed since API 1.0 - how to do it in 1.5/1.6?

怎甘沉沦 提交于 2019-11-28 02:09:59
问题 It seems that DrivingDirections have been removed since Android API 1.0 What's the way now to display a map with two points (one of them might be the current location, but can also be any other location) and the direction from one to another in Android 1.6? 回答1: I suspect the answer is to sign up for a multi-million-dollar license from TeleNav or somebody. The reason the API was pulled was because Google itself has limitations on what it can do with driving directions (e.g., cannot do real