android-mapview

How to add a map scale in MapView on Android?

坚强是说给别人听的谎言 提交于 2019-11-30 16:00:19
问题 I'm struggling with adding a map scale that displays current length on screen depending on current zoom level. I'm having a feeling that it might exist some predefined class to use but I have no clue...? I've searched around a lot but can't find anything. Any help i much appreciated =) // Alex 回答1: Alright, I got it now! Luis answer helped me a lot and also OpenStreetMap. Here's what I came up with: <your.own.package.path>; import android.content.Context; import android.graphics.Canvas;

How to Create Dynamically numbered Pin Pointers on MapView?

笑着哭i 提交于 2019-11-30 15:43:02
问题 I want to display some locations on my MapView . These locations will show pins which will have numbers 1,2,3.. so on(Similar to Google maps result but it is A,B,C..). I think it is not feasible to have pins of all numbers. Is there any way that i can just create a layout with pin background with TextView and I will dynamically put number in TextView and that layout ill use as drawable pin?? Or any other method to achieve this?? Please provide some suggestions. (I am able to show different

How to Create Dynamically numbered Pin Pointers on MapView?

两盒软妹~` 提交于 2019-11-30 14:50:26
I want to display some locations on my MapView . These locations will show pins which will have numbers 1,2,3.. so on(Similar to Google maps result but it is A,B,C..). I think it is not feasible to have pins of all numbers. Is there any way that i can just create a layout with pin background with TextView and I will dynamically put number in TextView and that layout ill use as drawable pin?? Or any other method to achieve this?? Please provide some suggestions. (I am able to show different drawable pins on MapView .I just want to create drawables dynamically) Solved this. Inflated the TextView

Android - Failed to find provider info for com.google.settings in MapView Example

旧城冷巷雨未停 提交于 2019-11-30 12:00:01
I'm trying to implement the MapView example which is defined in Android Hello Views example but now I'm facing this error: Failed to find provider info for com.google.settings Any idea why this is happening? Coc B. The MapView example doesn't set API key by default. So you must set it. Here is step by step: Get MD5 from your system %JAVA_HOME%\bin\keytool.exe -list -alias androiddebugkey -keystore "%userprofile%\.android\debug.keystore" -storepass android -keypass android Get API key by pasting the generated MD5 to this page: http://code.google.com/android/maps-api-signup.html Paste the

Can I use AnimationDrawable in an overlay on a MapView?

断了今生、忘了曾经 提交于 2019-11-30 09:59:24
I have created an AnimationDrawable in XML, and it works fine. But on moving the drawable into a MapView as an overlay marker (replacing a static drawable that works fine), the animation stubbornly refuses to play. I've moved the call to start() to a button, for testing, and even when pressed several seconds after the MapView has displayed, the animation doesn't start. I'm seeing nothing in logcat. I know start() needs calling after all the windows are set up, but this seems to be a separate issue. Are AnimationDrawables compatible with MapView? Is there something special I need to do to make

Osmdroid offline mode update tiles after zoom

送分小仙女□ 提交于 2019-11-30 09:28:40
问题 I'm developing an Android app that uses Osmdroid to display the maps in offline mode. I have an issue when I want to zoom in or out by pinching on the map or using the build-in zoomcontrols. When I zoom in the map tiles are not always correctly rendered and when I zoom out the sometimes there are some gray tiles in the map, sometimes everything is rendered OK. It's not related on the location displayed on the map. My map tiles are stored in an osmdroid zip-file with the Mapnik source in the

Network provider and GPS provider returning null values

杀马特。学长 韩版系。学妹 提交于 2019-11-30 09:25:04
问题 I want to find the current latitude and longitude of current location but both the network provider and GPS provider returning the null values: public class GPSTracker extends Service implements LocationListener { private final Context mContext; // flag for GPS status boolean isGPSEnabled = false; // flag for network status boolean isNetworkEnabled = false; // flag for GPS status boolean canGetLocation = false; Location location; // location double latitude; // latitude double longitude; //

MapView without MapActivity

纵饮孤独 提交于 2019-11-30 08:46:41
问题 I am writing this android application where in I have many activities that extend the Activity class. I also need an activity that uses MapView to show the Map along with a ListView in the screen (similar to rental house list where the houses are shown using pins on the map) Since I have a base class which extends the Activity class, all the other activities extend that base class. Only that particular screen which has the map needs to extend the MapActivity class. When I try doing that I am

Android : Access Mapview Inside Fragment With ViewPager

…衆ロ難τιáo~ 提交于 2019-11-30 08:46:25
问题 I am Using View Pager to Display three Views. "Filter","Streets","Around" Each View is Defined by Fragment. WHAT I WANT : I want to Use Mapview Inside My FilterFragment. WHAT I HAVE DONE : I want to Use MapView Inside Filter Fragment but Could Not Able to Run Successfully. and Getting Log cate Error: android.view.InflateException: Binary XML file line #33: Error inflating class com.google.android.maps.MapView I have also Searched on Net and Stackoverflow about this Problem and Found the LINK

Android MapView draggable marker

为君一笑 提交于 2019-11-30 07:59:29
I would like to create a draggable marker in Android MapView (com.google.android.maps.MapView), exactly like this: http://koti.mbnet.fi/ojalesa/exam/draggable.html . I've already got an overlay pointing to the location I want, but I'd like the marker icon to be draggable like in the above example. Is there something ready to use for this or is it necessary to implement the dragging logic myself? You need to implement the dragging yourself. Here is a sample project demonstrating drag and drop of an OverlayItem from an ItemizedOverlay . 来源: https://stackoverflow.com/questions/4238530/android