android-mapview

moveCamera with CameraUpdateFactory.newLatLngBounds crashes

纵饮孤独 提交于 2019-11-26 15:56:56
I'm making use of the new Android Google Maps API . I create an activity which includes a MapFragment. In the activity onResume I set the markers into the GoogleMap object and then define a bounding box for the map which includes all of the markers. This is using the following pseudo code: LatLngBounds.Builder builder = new LatLngBounds.Builder(); while(data) { LatLng latlng = getPosition(); builder.include(latlng); } CameraUpdate cameraUpdate = CameraUpdateFactory .newLatLngBounds(builder.build(), 10); map.moveCamera(cameraUpdate); The call to map.moveCamera() causes my application to crash

How to display popup on tapping overlay in android?

与世无争的帅哥 提交于 2019-11-26 15:53:24
问题 In my map application, I am displaying a set of overlays on a map. Whenever I tap on an overlay I need to display a popup, like this Can any one help me to sort out this? 回答1: Yes it is possible you should design our self info window for display information over tap in map i am supply code to you if you are understand that please replay me. public class MapLocationOverlay extends Overlay { private boolean isNameAddHold=true; private Bitmap bitmap,bitCross,bitMoreInformation; int testX,testY

android maps: How to Long Click a Map?

こ雲淡風輕ζ 提交于 2019-11-26 15:32:31
问题 How do I long click on a mapview so that a place marker appears at that point on the map? I tried a couple ways without success: 1) Using setOnLongClickListener on the MapvView which never detected the longclicks. 2) My other idea was to extend MapView to override dispatchTouchEvent .. Create a GestureDetector to respond to longpress callback. But I was stuck midway here as I could not get a handle to my subclassed Mapview. i.e. MyMapview mymapview; //MyMapView extends MapView //results in a

How can I handle map move end using Google Maps for Android V2?

北战南征 提交于 2019-11-26 15:23:51
问题 I want to geocode address as soon as map center has been changed. How can I handle map moveend with new Google Maps for Android V2? (I'm talking about the case then user drags map by finger) 回答1: Here is a possible workaround for determining drag start and drag end events: You have to extend SupportMapFragment or MapFragment. In onCreateView you have to wrap your MapView in a customized FrameLayout (in example below it is the class "TouchableWrapper"), in which you intercepts touch events and

Draw transparent circle filled outside

耗尽温柔 提交于 2019-11-26 14:25:05
问题 I have a mapview that I want to draw a circle on to focus on a given area. But i want the circle to be inverted. That is, instead of the inside of the circle being filled, it is transparent and everything else is filled. See this picture for what i mean (http://i.imgur.com/zxIMZ.png). The top half shows what i could do with a normal circle. Bottom shows the "inverted" circle. I've tried to search, but it's been kind of hard to find what i want. Does anyone know how i could go about doing

Keytool alias does not exist

眉间皱痕 提交于 2019-11-26 14:22:02
问题 I am trying to get my debug.keystore md5 key so I can get the API key for Google Maps. I run the command: keytool –genkeypair -alias armand -keypass pass And then running the command: keytool -list -alias armand -keystore debug.keystore I then enter my password and it gives me the following error: keytool error: java.lang.Exception: Alias <armand> does not exist What am I doing wrong? 回答1: This is right a way to get key: To get certificate fingerprint (MD5) follow the steps below: You need to

android MapView in Fragment

早过忘川 提交于 2019-11-26 13:03:16
问题 I want to have MapView inside my Fragment This is my FragmentLayout xml file <?xml version=\"1.0\" encoding=\"utf-8\"?> <RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\" android:layout_width=\"match_parent\" android:layout_height=\"match_parent\" android:background=\"#17df0d\" android:orientation=\"vertical\" > <com.google.android.gms.maps.MapView android:id=\"@+id/mapview\" android:layout_width=\"wrap_content\" android:layout_height=\"wrap_content\" android:layout

Rotate MapView in Android

亡梦爱人 提交于 2019-11-26 12:25:02
问题 I am writing an Android app where one of the features is that the map will rotate according to the compass (i.e. if the phone is pointing east, the map will be oriented so that the east side of the map is on top). Previous answers that I have found suggested over writing the onDraw() method in mapView, however, the api changed the method to final so it cannot be overwritten. As a result I have tried to overwrite the dispatchDraw() method like so: Note: -compass is a boolean that if true,

Where is the Keytool application?

走远了吗. 提交于 2019-11-26 12:12:46
问题 I need to use mapview control in android and I can\'t seem to understand how to run keytool . Is it installed with eclipse? I can\'t seem to find a download link. Thanks 回答1: keytool is part of the standard java distribution. In a windows 64-bit machine, you would normally find the jdk at C:\Program Files\Java\jdk1.8.0_121\bin It is used for managing keys and certificates you can sign things with, in your case, probably a jar file. If you provide more details of what you need to do, we could

Error Inflating class com.google.android.maps.MapView

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 11:35:34
问题 i am just following a simple map tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html but getting this error . I am new to android i tried to follow all the solution provided over the internet but no success yet. Please help me. My main .xml is below <?xml version=\"1.0\" encoding=\"utf-8\"?> <com.google.android.maps.MapView xmlns:android=\"http://schemas.android.com/apk/res/android\" android:id=\"@+id/mapview\" android:layout_width=\"fill_parent\" android:layout