Re: [android-developers] Driving directions in Google map view

2010-08-18 Thread Steve Howard
The Android framework comes with XML and JSON parsers. Searching for "android xml parser" or "android json parser" should turn up helpful results. There's nothing builtin to parse directions specifically, but it shouldn't be hard once you've got the XML or JSON parsed. Steve On Wed, Aug 11, 201

Re: [android-developers] Direction information in android MapView

2010-08-18 Thread Steve Howard
Your best bet is to use the Google Directions API, which is a generic web service for directions info. You'll have to do a lot of the glue work yourself though (reading the directions and painting a path onto the MapView), unfortunately, unless you come across a good third-party library (I don't k

Re: [android-developers] Re: Google maps, Overlays and the shadow layer

2010-08-18 Thread Steve Howard
Not sure what this could be. The following code draws two circles for me: public void draw(Canvas canvas, MapView view, boolean shadow) { //if (!shadow) return; Point center = new Point(canvas.getWidth() / 2, canvas.getHeight() / 2); int radius = (int) (Math.min(canvas.ge

Re: [android-developers] Google Map doesn,t work.

2010-08-18 Thread Steve Howard
>From the top of http://developer.android.com/guide/tutorials/views/hello-mapview.html: """ This tutorial requires that you have the Google Maps external library installed in your SDK environment. By default the Android SDK includes the Google APIs add-on, which in turn includes the Maps external

Re: [android-developers] Is MapController's zoomToSpan() execution deferred?

2010-09-01 Thread Steve Howard
The zoom may be deferred if the MapView hasn't been drawn yet. Have you tried putting your logic in a Runnable and post()ing it to the MapView? Steve On Sun, Aug 29, 2010 at 7:18 PM, Chad McQuillen wrote: > My application has a MapView which shows a collection of items in a > satellite view. I

Re: [android-developers] Is it possible to show my maps in MapView?

2010-09-01 Thread Steve Howard
http://groups.google.com/group/android-developers/browse_thread/thread/a3a66e8d16ff78ba/cad8d016a0714a92 Steve On Tue, Aug 31, 2010 at 3:05 AM, cnwy wrote: > Hi, > The google map is too o

Re: [android-developers] Re: Weird behavior of MapView

2010-07-12 Thread Steve Howard
Usually easier to use an Overlay rather than overriding MapView methods: http://osdir.com/ml/Android-Developers/2010-06/msg01242.html Steve On Mon, Jul 12, 2010 at 6:09 AM, Mark Murphy wrote: > On Mon, Jul 12, 2010 at 8:49 AM, drill wrote: > > thanks mark, but I still have some trouble. > > Yo

Re: [android-developers] Google Maps Sights Overlay

2010-07-12 Thread Steve Howard
On Mon, Jul 12, 2010 at 9:15 AM, Hendrik wrote: > when using the stock Google Maps application on an Android phone, > there are quite some sights (like churches, museums, ...) displayed in > the MapView. Those are also clickable and one can access further > information about them. Is it somehow po

Re: [android-developers] Google Maps API in Israel

2010-07-13 Thread Steve Howard
Likely the same as this: http://code.google.com/p/gmaps-api-issues/issues/detail?id=664 Steve On Tue, Jul 13, 2010 at 1:15 PM, oriharel wrote: > Can a Googler please answer this one - > how come I don't see detailed Israel map whe

Re: [android-developers] start activity from a overlay in maps

2010-07-22 Thread Steve Howard
On Thu, Jul 22, 2010 at 10:32 AM, Achanta wrote: > E/AndroidRuntime( 4985): Caused by: > java.lang.IllegalArgumentException: MapViews can only be created > inside instances of MapActivity. > Do you have a MapView not inside a MapActivity? Steve -- You received this message because you are sub

Re: [android-developers] Showing Google MyMaps

2010-07-22 Thread Steve Howard
On Thu, Jul 22, 2010 at 1:09 AM, vlatkovr wrote: > Hi, > > I created a custom map in Google Maps "My Maps". Now i want to show > that map on an android device, but not just opening it as a web page > but showing it using MapView or smth similar. I want to be able to > center on a place I have mar

Re: [android-developers] Calling a MapActivity from another activity

2010-07-28 Thread Steve Howard
On Mon, Jul 26, 2010 at 10:44 AM, Pravin Parulekar wrote: > 07-26 23:03:20.259: WARN/dalvikvm(307): threadid=1: thread exiting > with uncaught exception (group=0x4001d800) > 07-26 23:03:20.397: ERROR/AndroidRuntime(307): FATAL EXCEPTION: main > 07-26 23:03:20.397: ERROR/AndroidRuntime(307): > java

Re: [android-developers] GPS worknig on emulator but not on atcual phone

2010-06-07 Thread Steve Howard
Can you include the output from adb logcat? Steve On Sun, May 30, 2010 at 10:40 PM, XiaoDar wrote: > i've this error that i was able to set my location on the emulator > with the emulator control > but when i put the atcual code on the phone, it gives me the error > that i have to force close m

Re: [android-developers] How to get the point from click the google map

2010-06-07 Thread Steve Howard
An easy way to accomplish this is to use an Overlay. Something like this: class MyOverlay extends Overlay { public boolean onTap(GeoPoint point, MapView mapView) { // do something with point } } And elsewhere: MyOverlay overlay = new MyOverlay(); myMapView.getOverlays().add(overlay); Y

Re: [android-developers] Open native Maps with "directions"??

2010-06-07 Thread Steve Howard
You may find this useful: http://stackoverflow.com/questions/2853017/android-google-directions Steve On Fri, Jun 4, 2010 at 5:02 AM, guruk wrote: > Hi, > I open my Native Google Maps like: > > >

Re: [android-developers] Google Maps API: Catching zoom and panning events

2010-06-08 Thread Steve Howard
A simple solution is to add an Overlay, override the draw() method, and not actually do any drawing, but simply use the method as a hook to know anytime the map has potentially moved or zoomed. The problem is, this will get called more often than necessary, so you'll need some custom logic to deci

Re: [android-developers] Auto zoom to fit markers on an overlay

2010-06-08 Thread Steve Howard
Are you using ItemizedOverlay to display your markers? If so, ItemizedOverlay.getLatSpanE6() and ItemizedOverlay.getLonSpanE6() will give you the span of your markers. You can then use MapController.zoomToSpan() to find an appropriate zoom level. As for panning, depending on your application, yo

Re: [android-developers] MapActivity

2010-06-08 Thread Steve Howard
You can use Context.startActivity() with an Intent, just as you would for any other Activity. The Android developer docs cover this well. Steve On Thu, Jun 3, 2010 at 10:51 AM, Costantinos Costa < costa.costanti...@gmail.com> wrote: > How can i start a Mapactivity from a normal Activtiy? > > Th

Re: [android-developers] Google Maps API: Catching zoom and panning events

2010-06-09 Thread Steve Howard
On Tue, Jun 8, 2010 at 9:03 PM, Raymond Rodgers wrote: > > > On Tue, Jun 8, 2010 at 7:14 PM, Steve Howard wrote: > >> A simple solution is to add an Overlay, override the draw() method, and >> not actually do any drawing, but simply use the method as a hook to kno

Re: [android-developers] Re: ItemizedOverlay using both onTap methods

2010-06-24 Thread Steve Howard
I think the ideal usage would be something like this: public boolean onTap(GeoPoint point, MapView mapView) { // first, let the superclass check if the event hit a marker; if so, it'll call onTap(index) // if it returns true, that means onTap(index) returned true, meaning the event has been ha

Re: [android-developers] Re: ItemizedOverlay.hitTest incorrect

2010-06-24 Thread Steve Howard
As explained in your other email thread, it should not be necessary to call hitTest manually for this purpose. However, for the record, I believe the problem here is that hitTest() takes the hit point in coordinates relative to the marker, not in absolute screen coordinates. This is vaguely descr

Re: [android-developers] ItemizedOverlay & database items: When do I update the OverlayItem list?

2010-06-29 Thread Steve Howard
I think some of the confusion might be coming from the fact that you're expecting too much high-level logic from ItemizedOverlay. ItemizedOverlay is a pretty basic class. You override size() and createItem() to do whatever you want, and then you call populate() anytime you want to update the item

Re: [android-developers] Re: ItemizedOverlay using both onTap methods

2010-06-29 Thread Steve Howard
Trying to resend this reply as I think it may not have gone through the first time... Steve On Thu, Jun 24, 2010 at 11:24 AM, Steve Howard wrote: > I think the ideal usage would be something like this: > > public boolean onTap(GeoPoint point, MapView mapView) { > // first, let th

Re: [android-developers] crashing map

2010-06-30 Thread Steve Howard
Have you ensured you're calling ItemizedOverlay.populate() before adding the overlay to the map view? Steve On Tue, Jun 29, 2010 at 5:42 PM, Pedro Teixeira wrote: > Hey there... > > My application using google maps was working just fine.. I left it for > a while.. and suddenly out of the blue..