android-mapview

Getting coordinates when clicking anywhere on a MapView

霸气de小男生 提交于 2019-11-29 12:02:14
I just cant get this working. I tried using the code below with onTouchEventand and it doesn't work. If i return true at the end of the method, i get the toast with the coordinates but can't move a map, and if i return false, i can move a map but cant display a toast after the user clicks on a map. If i get it right, the other onTap method is used only for clicking on a overlays. Has anybody figured this thiing out? public boolean onTouchEvent(MotionEvent arg0, MapView arg1) { //super.onTouchEvent(arg0); int akcija = arg0.getAction(); if(akcija == MotionEvent.ACTION_UP){ if(!premik) {

How to show a map in an Android mapactivity?

旧时模样 提交于 2019-11-29 11:35:12
I have attached a mapview to my layout and have a it showing a compass and my current location. The problem I have is, that there is no street map shown in the view, so basically I just see the compass and my current location over a blank grid. When you run or debug through Eclipse your app is signed with your debug key which will have been automatically created. It is not the same as the key you sign your app with when releasing it. You need to get an API key using your debug key. See the 'Getting the MD5 Fingerprint of the SDK Debug Certificate' section on http://code.google.com/android/add

Android 2.1 GoogleMaps ItemizedOverlay ConcurrentModificationException

若如初见. 提交于 2019-11-29 08:52:27
I cannot figure out the origin of the ConcurrentModificationException . In my activity I'm calling updateMapOverlay() . I'm also calling updateMapOverlay() inside another Thread (a TimerTask ) that is invoked on regular intervals. I'm taking the appropriate locks when invoking updateMapOverlay() from both the threads. Is this problem being caused because I'm invoking updateMapOverlay from inside a non-UI thread (i.e., TimerTask ). Has anyone else faced a similar issue ? private void updateMapOverlay() { this.itemizedOverlay.refreshItems(createOverlayItemsList()); List<Overlay> overlays =

Android: DrivingDirections removed since API 1.0 - how to do it in 1.5/1.6?

可紊 提交于 2019-11-29 08:48:57
It seems that DrivingDirections have been removed since Android API 1.0 What's the way now to display a map with two points (one of them might be the current location, but can also be any other location) and the direction from one to another in Android 1.6? I suspect the answer is to sign up for a multi-million-dollar license from TeleNav or somebody. The reason the API was pulled was because Google itself has limitations on what it can do with driving directions (e.g., cannot do real-time turn-by-turn stuff), since Google licenses this data from TeleNav or other firms. Google, in turn, cannot

Adding a KML layer to an Android maps application

匆匆过客 提交于 2019-11-29 08:13:06
I have been starting out in the world of Android development recently and I am working on an application which shows a map using the Google API SDK, it is pretty much the original example but edited a little bit. It works a treat but I wish to do more with it. My question is: How do you add a KML layer to this? I've not found many examples out there and none of them are very clear. I know how to do this with Javascript on websites but not in android. Can anyone help? Google added a support to KML recently in its utility lib. You can instantiate a KMLLayer as below: KmlLayer layer = new

Custom MKAnnotationView Callout [duplicate]

十年热恋 提交于 2019-11-29 08:02:06
Possible Duplicates: Custom MKPinAnnotation callout bubble similar to default callout bubble How to customize the callout bubble for MKAnnotationView? Does anyone know, or have code that shows, how to create a custom MKAnnotationView Callout? I mean the actual text bubble and not the pin. Thanks in advance. you cannot make a custom MKAnnotationView, you can only custom the callout views left and right, it's just a view, so you can put anything you want. If you want a custom MKAnnotationView you will need to capture the touch and handle the rest. 来源: https://stackoverflow.com/questions/1350050

Android : Access Mapview Inside Fragment With ViewPager

痴心易碎 提交于 2019-11-29 07:58:12
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 and LINK but Could not able to Found this link Related to my Problem as i am using Fragment With

Google map not show any thing in map

大城市里の小女人 提交于 2019-11-29 07:54:22
i am showing a map in activity ... but when i run app on device it does not show any thing , it show just white screen and zoom in zoom out options... MAP key is right .. thanks .. AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.edxample.finalmap" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <permission android:name="com.edxample.finalmap.permission.MAPS_RECEIVE" android:protectionLevel="signature" /> <uses-permission android

MapView without MapActivity

岁酱吖の 提交于 2019-11-29 07:49:56
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 thrown a IllegalAccessError Exception. Project setup - Android 2.1-update1 and GoogleAPI 2.1-update 1

Android MapView getMap() returns null

可紊 提交于 2019-11-29 05:39:06
MapView 's getMap() method can return null. I know this is an intended behavior by Google. Can someone provide a definitive description as to when and under which circumstances the getMap() method returns null? I know that if Google Services are unavailable on the given device, getMap() will return null. This eventuality is relatively well documented. I'm more concerned with the vague other case where even when Google Services are installed on a device, getMap() can still return null. My assumption up to this point is that there is some initialization of the underlying maps system, during