mapview

ItemizedOverlay seems to be drawing with a "broken" projection

I have a strange problem that I don't really know how to attack so I'm wondering if someone has had a similar problem before. I override the draw(Canvas canvas, MapView mapView, boolean shadow) method in an ItemizedOverlay subclass to draw some paths, text etc. between the items. The first thing I do in the override is call super.draw w...

Overloading Menu Items in Mapview on Blackberry

1 ) I am trying to add my custom menus to the menu list of MapView and unable to do so. 2 ) And Is it possible to push Mapview on a screen Manager. Say pushScreen(MapView instance) Can anyone help me on these issues please. ...

Display Toast, Android

Hi, I have a slider that can be pulled up and then it shows a map. I can move the slider up and down to hide or show the map. When the map is on front, I can handle touch events on that map. Everytime I touch, a AsyncTask is fired up, it downloads some data and makes a Toast that displays the data. Although I start the task on touch eve...

MapView Marker shadow

Hi, I am adding different markers to my map... Drawable drawable = app1.getResources().getDrawable(R.drawable.test); drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); OverlayItem overlayitem2 = new OverlayItem(mark, "Test", "t"); overlayitem2.setMarker(drawable); app1.mapOverlay.addOverlay(overlayit...

Scale Map Markers by Zoom, Android

Hi, I have lot of markers on my map. Zooming in each marker shows me a position. but zooming out the markers are overlapping each other and it is more difficult do determine the position of a marker. Is there a way to scale the marker image depending on the zoom factor? ...

How to update latitude/longitude of the center of a Mapview whenever map is moved

What is the best way to constantly update the center of a mapView's latitude and longitude in an Android application? I need to display it on a label that is shown on top of the map. I know you can call MapViewObject.getMapCenter() to get a GeoPoint of the center of the map, but where would I place that code so that it is called every ...

Get Lat and Long, Android

Hi, I need lat and lng of a point on a google map. It has to look like that 8.53171539306641 for example but when I go to maps.google.com I get just 8.532493 There is a possibility to receive lat and lng that have such a length 8.53171539306641 but I do not remember how ...

Map Marker Management, Android

Hi, 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 re...

Hit testing on a MapView, Android

Hi, I hava a MapView and I define a Rect. Touching the map I compare the coordinates to detect whether the rect is touched or not. But it does not work RectF hitTestRecr = new RectF(); hitTestRecr.set(0,100,0,100); hitTestRecr.offset(0,0); if (hitTestRecr.contains(event.getX(),event.getY())) { Toast.makeText(getBaseContext(), "hit...

Failed to set a Button below a MapView

Part of my Layout is shown below, but the Button shows up above the MapView and NOT as expected "below" the map. How can I fix this? <RelativeLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.google.android.maps.MapView android:id="@+id/ma...

Android - Any way to access an Overlay's canvas in another class?

While this may sound backwards, I have a need to draw to my Overlay in another class. I get a bitmap from the MapsView, then essentially draw it on the overlay. I am having difficulty doing this however. Here is what I am doing. First I generate a bitmap from the mapview: Bitmap bitmap = Bitmap.createBitmap(400, 800, Bit...

How can I draw, on an Android MapView, rectangles that automatically re-size when the user zooms in and out?

My Android application has a MapView. I want to divide that MapView into a grid according to latitude and longitude, and shade the different cells of that grid different colors based upon a certain criteria. What's the simplest way to do this? I could create semi-transparent, solid-color PNG Drawable rectangular images and put them in a...

Android Map Zoom to Show all Pins

I have 5 pins added to a map. How can I tell the MapView to zoom as much as possible and keep all pins in view? ---I found it: http://sdhillon.com/find-the-center-and-span-of-a-set-of-points-android-and-iphone-example/ ...

Android MapView Controls for changing to Satellite view

How do I add the built-in buttons for switching between Satellite and and Traffic view. I can add my own buttons and call the setSatellite(boolean), setTraffic(boolean) methods, but I was hoping there are built in buttons to do that like the Zoom buttons. ...

Android GeoPoint with lat/long values

I am trying to get a GeoPoint for -23.4456 by 45.44334 What values do I pass into the constructor of the GeoPoint as it take Ints only. ...

MapView overlay popup with layout loses focus

Hi, I'm trying to implement an infowindow like the web version of google maps. I have created a custom layout extending a linear layout and populated it with a TextView and a button. I have overrided the dispatchDraw method of the balloonLayout (wich extends LinearLayout) to draw a container with rounded corners and the balloon tip. On...

How can I return the location pressed to the MapActivity from an Overlay onTap method

Hi, I have an activity that has a button which opens a new MapActivity to select a location by tapping on the map. The map has an overlay that overrides the onTap method to get the location but I want to return that location to the previous activity but, I don't know how to return the geopoint to the mapactivity in order to call the se...

Android; MapView, how can I set default location?

Using the MapView in android, how can I set a default location, so that everytime I load up this application, it automatically centers/zooms location in on London? ...

Default marker for android google MAPVIEW?

Hi guys, Just wondering if there is a standard/default overlay/marker that I can use in the MAPVIEW? I have been searching on the web and all tutorials talk about extending the Overlay and put your custom image on it. Is there a easier way? I just want to have the a marker, nothing fancy. Regards James ...

Export / Save Picture of Map + Overlays in Android

Is there a way (after the mapview has been created and overlays added) to save a picture of the mapview? I am writing a GPS app in which the customer needs to produce a report of where the user has been. The need to overlay blips to show the route traveled and then export the map and route to be saved as an image. ...