android-mapview

Shared library missing in android.

我怕爱的太早我们不能终老 提交于 2019-11-27 12:01:26
02-18 00:02:08.432: ERROR/PackageManager(57): Package com.example.brown requires unavailable shared library com.google.android.maps; failing! I got this exception in logcat. Can anyone guide me? As CommonsWare said, your emulator is missing the library. The Google Maps Library's documentation's Overview page has info on how to create the right kind of virtual device for the emulator. The gist is: Launch the AVD Manager by using the android command without any options. If you are developing in Eclipse/ADT, you can also access the tool from Window > Android SDK and AVD Manager. Click the "New"

How to display popup on tapping overlay in android?

我是研究僧i 提交于 2019-11-27 11:59:00
In my map application, I am displaying a set of overlays on a map. Whenever I tap on an overlay I need to display a popup, like this Can any one help me to sort out this? DynamicMind Yes it is possible you should design our self info window for display information over tap in map i am supply code to you if you are understand that please replay me. public class MapLocationOverlay extends Overlay { private boolean isNameAddHold=true; private Bitmap bitmap,bitCross,bitMoreInformation; int testX,testY,count=0; int infoWindowOffsetX,infoWindowOffsetY; public String name,address,argName,argAddress

Comparing two locations using their Longitude and Latitude

风流意气都作罢 提交于 2019-11-27 11:58:45
Hi i need to cal an event at onchangelocation(), by comparing current latitude and longitude with some saved latitude and longitude but i m getting an error. eclipse is not recognizing key word distance, and for correction error it is giving hint to crate method "distance" having 4 parameter ... how to fix it??? or some other way to do same work??? thanks and regards. code is attached below @Override public void onLocationChanged(Location location) { double currentLat=location.getLatitude(); double currentLon=location.getLongitude(); if (distance(lat,lon,currentLat,currentLon)<2.0){ //do what

How to compute a radius around a point in an Android MapView?

末鹿安然 提交于 2019-11-27 11:34:26
问题 I have a MapView that I'm displaying a "useful radius" (think accuracy of coordinate) in. Using MapView 's Projection's metersToEquatorPixels, which is admittedly just for equatorial distance) isn't giving me an accurate enough distance (in pixels). How would you compute this if you wanted to display a circle around your coordinate, given radius? 回答1: So, Google Maps uses a Mercator projection. This means that the further you get from the equator the more distorted the distances become.

android maps: How to Long Click a Map?

不羁岁月 提交于 2019-11-27 11:23:01
How do I long click on a mapview so that a place marker appears at that point on the map? I tried a couple ways without success: 1) Using setOnLongClickListener on the MapvView which never detected the longclicks. 2) My other idea was to extend MapView to override dispatchTouchEvent .. Create a GestureDetector to respond to longpress callback. But I was stuck midway here as I could not get a handle to my subclassed Mapview. i.e. MyMapview mymapview; //MyMapView extends MapView //results in a classcast exception mymapView = (MyMapView) findViewById(R.id.map); 3) The only other way I know how to

Google Maps Android API V2 check if GoogleMaps are installed on device

青春壹個敷衍的年華 提交于 2019-11-27 11:08:02
When using Google Maps Android API V2 I'm following the Google Play Services setup documentation to make a check to ensure that Google Play Services are installed, using the following code in my main Activity: @Override public void onResume() { checkGooglePlayServicesAvailability(); super.onResume(); } public void checkGooglePlayServicesAvailability() { int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if(resultCode != ConnectionResult.SUCCESS) { Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 69); dialog.setCancelable(false); dialog

How can I handle map move end using Google Maps for Android V2?

£可爱£侵袭症+ 提交于 2019-11-27 11:02:08
I want to geocode address as soon as map center has been changed. How can I handle map moveend with new Google Maps for Android V2? (I'm talking about the case then user drags map by finger) AZ13 Here is a possible workaround for determining drag start and drag end events: You have to extend SupportMapFragment or MapFragment. In onCreateView you have to wrap your MapView in a customized FrameLayout (in example below it is the class "TouchableWrapper"), in which you intercepts touch events and recognizes whether the map is tapped or not. If your "onCameraChange" gets called, just check whether

Android Mapview: Merging overlapping markers into a new marker

巧了我就是萌 提交于 2019-11-27 10:23:46
问题 So I have a MapView with a lot of markers, most of which are concentrated in mile wide clusters. When zoomed the markers overlap and appear to only be one. What I want to achieve is at a certain zoom level replace the overlapping markers with a group marker that will display the density of markers and onClick will zoom to display all markers inside. I know I can do this with brute force distance measurements but there must be a more efficient way. Anyone have any solution or smart algorithms

Android “Hello, MapView” Tutorial - Map Tiles Do Not Load

偶尔善良 提交于 2019-11-27 09:25:29
I am new to Android software development and new to this site. I am hoping someone might have some experience with the problem I am having. I've been following the Hello, MapView tutorial in order to not only learn the Android framework, but also the Google Maps library. I've tried my best to implement things exactly as the tutorial has instructed. My problem is that the application does load in my emulator (or even on my phone for that matter), but the map tiles do not load. Searching Google I found a post by someone else on another site having the same issue, but his/her problem was that the

Draw transparent circle filled outside

╄→尐↘猪︶ㄣ 提交于 2019-11-27 08:59:09
I have a mapview that I want to draw a circle on to focus on a given area. But i want the circle to be inverted. That is, instead of the inside of the circle being filled, it is transparent and everything else is filled. See this picture for what i mean (http://i.imgur.com/zxIMZ.png). The top half shows what i could do with a normal circle. Bottom shows the "inverted" circle. I've tried to search, but it's been kind of hard to find what i want. Does anyone know how i could go about doing something like this? My answer is pretty late, but may help someone to achieve this. Here is an example how