android-mapview

Android MapView display empty

倾然丶 夕夏残阳落幕 提交于 2019-12-21 04:18:17
问题 Manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yu.lbs" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-library android:name=

how to display location message in chat window same like whatsapp in android programmatically?

北城余情 提交于 2019-12-20 10:53:13
问题 I am developing a chat application. Where user can send location same like whatsapp . (I am not talking about share live location functionality). For this requirement i have use google place picker api. Here I am attaching a code of that. build.gradle implementation 'com.google.android.gms:play-services-maps:10.2.0' implementation 'com.google.android.gms:play-services:10.2.0' AndroidManifest.xml <meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY" /> <meta

How to reposition built-in zoom controls in MapView?

梦想的初衷 提交于 2019-12-20 09:04:23
问题 I need to place built-in zoom controls of MapView into position different from the default position. While it's easy to do using getZoomControls() method, this method is deprecated in recent API versions. Does anyone has idea how to do this without calling getZoomControls()? 回答1: I have an answer to this. I managed to reposition it with this code in the bottom left corner instead of in the middle FrameLayout.LayoutParams zoomParams = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT,

How to remove single marker using Google Maps V2? [duplicate]

纵饮孤独 提交于 2019-12-20 08:34:04
问题 This question already has answers here : Remove a marker from a GoogleMap (9 answers) Closed 6 years ago . The only method that removes markers from map is clear. However it clears all markers from the map. I want to remove only single marker or group of markers. How could i achieve this? 回答1: After adding the marker it is possible to obtain its reference: Marker marker = map.addMarker(..); The Marker class has a remove method: 回答2: I got the same problem, so to fix it I'm doing mMap = super

Dynamically draw lines between multiple GeoPoints in Android MapView

南笙酒味 提交于 2019-12-20 05:44:09
问题 I am developing an application that has a few custom overlays on a MapView - representing vessels. When selecting a vessel, I am showing its previous positions on the map, again with custom overlay items, and I would like to connect them with a line. Some relevant problems I saw here were solved by overriding the Draw method, and by hard-coding the GeoPoints' coordinates in the Draw method. That does not help me at all, since I have many points from different vessels, and cannot hard-code

How to capture location from MapActivity

淺唱寂寞╮ 提交于 2019-12-20 05:23:28
问题 Given ... An Activity that extends from MapActivity Uses ItemizedOverlay to show some balloons on the map ZoomControls are enabled The ItemizeOverlay implements onTap(...) which works perfectly ok when tapping one of the overlay items. The question is: How to identify a tap on another part of the map (with the intention of getting the location and center'ing on that point) 回答1: You should be able to create an 'invisible' overlay (in the sense that you don't draw anything in onDraw ) that sits

Uncaught exception thrown by finalizer

跟風遠走 提交于 2019-12-20 05:13:54
问题 Hi i am geting this error. i am using this code http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/ when i on click of Show place on map this error i am getting. plz asy me solution 08-28 16:38:20.554: E/System(4978): Uncaught exception thrown by finalizer 08-28 16:38:20.554: E/System(4978): java.lang.IllegalStateException: Binder has been finalized! 08-28 16:38:20.554: E/System(4978): at android.os.BinderProxy.transact(Native Method) 08-28 16:38:20.554:

Random MapView Force Close : NullPointerException com.google.googlenav.map.Tile.getTile

ぐ巨炮叔叔 提交于 2019-12-20 04:34:46
问题 I really need some help. I have a report of a force close with this stack trace, and I cant find any information on how to prevent, nor can I replicate this type of error. I was hoping someone would have some insight on why this is happening. com.google.googlenav.map.Tile.getTile(Unknown Source) com.google.googlenav.map.Tile.read(Unknown Source) com.google.googlenav.map.MapTile.read(Unknown Source) com.google.googlenav.map.FlashRecord.loadTileFromDataEntry(Unknown Source) com.google.googlenav

Get info on a mapview selected annotation

青春壹個敷衍的年華 提交于 2019-12-20 03:22:17
问题 I have annotations on a mapview and a callout with a button on each. What I need to do is grab properties from this callout, ie. the title, but logging this line: NSLog(@"%@", mapView.selectedAnnotations); returns <AddressAnnotation: 0x1bdc60> which obviously gives me no useful info... My question is, how can I access the properties of a selected annotation callout? 回答1: This is how for (id annotation in mapView.annotations) {NSLog([annotation title]);} 回答2: Here is what I did in the

How do I draw a KML file on a MapView in Android?

你。 提交于 2019-12-20 03:02:47
问题 I have to draw a KML file into a MapView. I looked in the internet but I didn't find an example how to do it, if someone can give an example how to do it it wil be great! 回答1: KML is not supported now. You can draw trace like that w/o KML : 1) Make request to Google service : Request : http://maps.googleapis.com/maps/api/directions/output?parameters Info about : https://developers.google.com/maps/documentation/directions/ 2) Send request 3) Parsing JSON response like this : JSONObject