android-mapview

How to make MapView object transparent (alpha)?

不羁岁月 提交于 2019-12-01 12:42:08
问题 All, I have a need to display information on a MapView object. No problems there. The issue is that there are times when the MapView object displays map details that visually compete with my overlay data. So, what I'd like to do is provide a way to "scale back" the MapView object visually by using an alpha channel. Can an alpha value get applied to a MapView object? If so, how? Alternatively, I was thinking that perhaps a separate all black overlay might provide the same results. Scale the

Android - Many OutOfMemoryError exceptions only on single Activity with MapView

微笑、不失礼 提交于 2019-12-01 12:34:59
问题 I'm getting quite a few OutOfMemoryError reports from my users and every single report is from the same Activity, which contains a MapView. I'm thinking that it's an isolated exception with just this one place in my app, and I can't figure out what the problem is. Can anybody give me some pointers as to why this is happening? I've removed some unneeded code for this question, so if somebody thinks the issue could potentially be in that, I'll post it. Stack Traces Stack Trace #1 java.lang

How to use kml file on mapView in Android

五迷三道 提交于 2019-12-01 11:39:39
I was wondering how to load an already created kml file into the mapview programatically? The kml file is stored in the SDcard. I have a mapActivity already set up. Do I just SAX parse the kml file and use the draw method to create the boundary? Here is a snippet of the kml file stored on the phone <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com /kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org /2005/Atom"> <Document> <name>TY09-46.kml</name> <open>1</open> <Style id="sn_ylw-pushpin594">

How to use kml file on mapView in Android

混江龙づ霸主 提交于 2019-12-01 09:56:22
问题 I was wondering how to load an already created kml file into the mapview programatically? The kml file is stored in the SDcard. I have a mapActivity already set up. Do I just SAX parse the kml file and use the draw method to create the boundary? Here is a snippet of the kml file stored on the phone <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com /kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3

Control the size of popupImage from leaflet in r shiny

人走茶凉 提交于 2019-12-01 09:27:41
问题 I am having difficulties to control the size of the image resulting from popupImage (mapview package). Below is a reproducible shiny example where I have a single marker with a popup. When I set width = 300 , the popup displays correctly, but I would like to display a bigger image. width = 300 When setting width = 500 , the popup displays larger, but a portion of it is greyed out and a scroll bar is added. width=500. How can I get width = 500 to display the image correctly? I've messed around

Android MapView can't remove marker

戏子无情 提交于 2019-12-01 08:47:53
I'm using locationManager and ItemizedOverlay to draw My Location marker, the problem is when onLocationChanged is triggered I'm getting new marker drawed and not the last one moved to the new location, here is my onLocationChanged code : public void onLocationChanged(Location location) { myOverlay object1 = new myOverlay(getResources().getDrawable(R.drawable.arrow),MyMap); if(location!=null){ MyMap.invalidate(); GeoPoint MyPos = new GeoPoint(microdegrees(location.getLatitude()),microdegrees(location.getLongitude())); MyController.animateTo(MyPos); object1.addPoint(MyPos,"Ma position","Ma

Android draw a path on a mapView from a large amount of longitude/latitude points

纵饮孤独 提交于 2019-12-01 08:13:03
I am writing a application that needs to draw a "route" comprised of lots of GPS points (long+lat). The points are close together and don't follow roads, simply drawing a line between each point is ideal. The current implementation I have is very slow as I am looping over all the GPS coordinates and creating a new Point and overlayitem in an itemized overlay. This takes around 20 seconds for it to load all of these points and draw them to the mapview. Is there a way in which I can construct a series of lines or point from the GPS coordinates and draw them onto the mapview? Example of current

MapView is showing Darker map inside Dialog [duplicate]

喜夏-厌秋 提交于 2019-12-01 07:55:47
问题 This question already has answers here : MapFragment gets a dark overlay when used in DialogActivity (5 answers) Closed last year . I am trying to display google map inside dialog window. For this dialog i am using following lines of code: final Dialog dialog = new Dialog(SetProfileOnlineActivity.this); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setCanceledOnTouchOutside(false); dialog.setCancelable(false); dialog.setContentView(R.layout.pick_location_layout); Window w =

how get the progress status of loading mapview in android?

随声附和 提交于 2019-12-01 06:51:43
while the map is in loading state i want to put a progressbar at the center of mapview. how to get the progress?? and how to do?? give me some example.. thanks. I don't think there is any reasonable way of doing it. Note that Google isn't doing this either in their map applications. It is pretty clear just looking at the page to see if tiles are still loading, so I don't think there is actually any need to put in a progress indicator. The MapView has a method canCoverCenter() which can tell you if the center tile is available, but there is nothing for the rest of the tiles. Take a look at

Android draw a path on a mapView from a large amount of longitude/latitude points

家住魔仙堡 提交于 2019-12-01 06:49:16
问题 I am writing a application that needs to draw a "route" comprised of lots of GPS points (long+lat). The points are close together and don't follow roads, simply drawing a line between each point is ideal. The current implementation I have is very slow as I am looping over all the GPS coordinates and creating a new Point and overlayitem in an itemized overlay. This takes around 20 seconds for it to load all of these points and draw them to the mapview. Is there a way in which I can construct a