android-mapview

Change zoom controls in a MapView

被刻印的时光 ゝ 提交于 2019-12-09 12:56:08
问题 I would like to change the predefined style of the zoom controls in my application to appear like the new zoom controls in the google maps application. See below: How can I do it? I have been looking around and I haven't found anything. Thanks in advance. 回答1: You should have four image drawables namely: Zoom in (+) enable/disable Zoom out (-) enable/disable Put them in MapView layout an ImageView or Button with background image as the above drawables. Then you should assign onClickListeners

Google Maps Android API v2 - MarkerOptions draggable and visible methods

霸气de小男生 提交于 2019-12-09 12:55:21
问题 I'm playing with the new Google Maps Android API (v2) released earlier this month and I was delighted to see a MarkerOptions.draggable(boolean draggable) method which I thought would create a draggable marker when passing in a draggable value of true . However, on trying it (i.e. adding a marker as such to the map), it doesn't seem to do anything. The MarkerOptions.visible(boolean visible) method too, which I thought would hide the marker from view when passing in a visible value of false .

Differences between ItemizedOverlay and Overlay class

≯℡__Kan透↙ 提交于 2019-12-09 05:52:47
问题 Can someone tell my when to use Overlay or when to use ItemizedOverlay class! What are differences between this two classes? Draw methods do the same thing? Can I use only ItemizedOverlay class in my project or I must use and Overlay as base class! Thanks 回答1: Overlay is a general overlay. ItemizedOverlay is a subclass that makes it easier to create an overlay that is a discrete series of marked points on the map. So, if you are trying to show a bus route, or shade a region, or something like

Blackberry MapView plot coords

我与影子孤独终老i 提交于 2019-12-09 03:52:59
问题 I was wondering if it is possible to plot locations/coords on the MapView class of blackberry. http://www.blackberry.com/developers/docs/5.0.0api/net/rim/blackberry/api/maps/MapView.html In iOS I made an app the drops pins(annotations) on the MKMapView but I can't find something simular for blackberry? Any guidance will be appreciated 回答1: You have basically two options: 1) If you want the map to be embedded within your own application, use the MapField to add a map to your screen and then

Change roads color in “google maps android api v2”

北慕城南 提交于 2019-12-09 02:05:13
问题 I would like to know if there is an equivalent to javascript api v3: Styled Maps Because i need to change the roads color, and would like to mask road labels. Is it possible directly from the android v2 api? I tried to use javascript v3 api to fix the precedent problem but my app needs tilt like this too and it looks like no tilt for javascript v3 api :( . Finaly, do someone have a solution to: add tilt to javascript v3 api for ROADMAP or/and change the roads color in android v2 api Thank you

Call functions of Activities Belonging to a Fragment

馋奶兔 提交于 2019-12-09 00:19:09
问题 I am working with multiple Fragments under Android and am confused on how to send and receive data from embedded apps. For a simple explanation, I have a ListFragment and a MapFragment using the method explained here. This means that the List lives in the ListFragment class, however the MapActivity is an Activity that is called under the LocalActivityManagerFragment . Everything works on the individual Fragments : Lists of waypoints, waypoints and current location implemented on the

Calculate the area covered by a polygon in a google map in an Android App

故事扮演 提交于 2019-12-09 00:17:46
问题 I've got a series of Location / GeoPoint objects that form a polygon in my Android app. I wonder if there's any way to calculate the area covered by it. So far I'm thinking about setting up a web service that, when posted the list of coordinates, uses the JS Google Maps API v3 to calculate the area. But there might be a way of doing this easily with some feature from Android I don't know about, natively. Thanks in advance for your help! 回答1: A method doing this is posted in following answer:

Map Marker Management, Android

本小妞迷上赌 提交于 2019-12-08 21:19:27
I have a map that dispays markers. If the user clicks on a marker a popup shows up. A method calculates wheather there is a marker at the clicked position. My Problem is that I have a lot of different markers, but in this method I can handle only one specific marker. I need something like a general bitmap, that holds all marker resources. E.g. I do not wand to handle 100 markers manually, because all are a Bitmap so I need just to handle one general bitmap. any ideas? I have solved my problem. I define a MarkerManager class that holds static fields that contain intergers. public class

Get user current position with gps/network android MapView

ⅰ亾dé卋堺 提交于 2019-12-08 11:21:22
问题 Hello I've been using this guide to determine the locationof the user: http://developer.android.com/guide/topics/location/obtaining-user-location.html and my current code looks like this: LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); LocationListener locationListener = new LocationListener() { public void onLocationChanged(Location location) { test = new GeoPoint((int)location.getLatitude()*1000000, (int)location.getAltitude()*1000000);

How can I remove the shadow on the markers on my map?

不打扰是莪最后的温柔 提交于 2019-12-08 10:38:06
问题 I am displaying a custom marker on my Google Map. They are placed fine, but they have this funny shadow. How can I remove the shadow? @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); // ---translate the GeoPoint to screen pixels--- Point screenPts = new Point(); mapView.getProjection().toPixels(geoPnt, screenPts); // ---add the marker--- /*Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.pushpin