android - Geo Coder didn't return LatLng -
i'm building app using api maps v2 android..
i trying geocoding no success..
i want pass address , latitude , longitude. have build next code drop catch..
geocoder gc = new geocoder(mainactivity.this); list<address> end; try{ end = gc.getfromlocationname("avenida paulista, são paulo, são paulo, brasil", 1); latlng ll = new latlng(end.get(0).getlatitude(), end.get(0).getlongitude()); toast.maketext(getapplicationcontext(), "latlng: "+ll, toast.length_long).show(); }catch(ioexception e){ e.printstacktrace(); toast.maketext(getapplicationcontext(), "coordenadas nÃo obtidas", toast.length_long).show(); }
this code works on v2 of maps? i'm tired..someone can help me, please? :)
logcat:
10-18 17:53:18.824: i/surfacetextureclient(26928): [stc::queuebuffer] this:0x517528b0, api:1, lastly queue time elapsed :90190 ms 10-18 17:53:18.824: i/surfacetextureclient(26928): [0x517528b0] frames:5, duration:90.353996, fps:0.055338 10-18 17:53:18.913: w/actionmenupresenter(26928): showoverflowmenu fail, mreserveoverflow=true, mmenu.getnonactionitems().size()=4, isoverflowmenushowing()=false 10-18 17:53:18.928: d/abslistview(26928): checkabslistviewllogproperty invalid command 10-18 17:53:18.971: w/mmumapper(26928): fail register mva, unsupported format(0x5) 10-18 17:53:19.026: w/mmumapper(26928): fail register mva, unsupported format(0x5) 10-18 17:53:19.103: w/mmumapper(26928): fail register mva, unsupported format(0x5) 10-18 17:53:19.913: w/system.err(26928): java.io.ioexception: service not available 10-18 17:53:19.914: w/system.err(26928): @ android.location.geocoder.getfromlocationname(geocoder.java:181) 10-18 17:53:19.915: w/system.err(26928): @ com.example.googlemaps.mainactivity.onoptionsitemselected(mainactivity.java:167) 10-18 17:53:19.915: w/system.err(26928): @ android.app.activity.onmenuitemselected(activity.java:2546) 10-18 17:53:19.916: w/system.err(26928): @ com.android.internal.policy.impl.phonewindow.onmenuitemselected(phonewindow.java:971) 10-18 17:53:19.917: w/system.err(26928): @ com.android.internal.view.menu.menubuilder.dispatchmenuitemselected(menubuilder.java:735) 10-18 17:53:19.917: w/system.err(26928): @ com.android.internal.view.menu.menuitemimpl.invoke(menuitemimpl.java:149) 10-18 17:53:19.918: w/system.err(26928): @ com.android.internal.view.menu.menubuilder.performitemaction(menubuilder.java:874) 10-18 17:53:19.918: w/system.err(26928): @ com.android.internal.view.menu.menupopuphelper.onitemclick(menupopuphelper.java:175) 10-18 17:53:19.920: w/system.err(26928): @ android.widget.adapterview.performitemclick(adapterview.java:298) 10-18 17:53:19.920: w/system.err(26928): @ android.widget.abslistview.performitemclick(abslistview.java:1118) 10-18 17:53:19.921: w/system.err(26928): @ android.widget.abslistview$performclick.run(abslistview.java:3058) 10-18 17:53:19.923: w/system.err(26928): @ android.widget.abslistview.ontouchevent(abslistview.java:3828) 10-18 17:53:19.923: w/system.err(26928): @ android.view.view.dispatchtouchevent(view.java:7146) 10-18 17:53:19.924: w/system.err(26928): @ android.view.viewgroup.dispatchtransformedtouchevent(viewgroup.java:2238) 10-18 17:53:19.924: w/system.err(26928): @ android.view.viewgroup.dispatchtouchevent(viewgroup.java:1935) 10-18 17:53:19.924: w/system.err(26928): @ android.view.viewgroup.dispatchtransformedtouchevent(viewgroup.java:2244) 10-18 17:53:19.925: w/system.err(26928): @ android.view.viewgroup.dispatchtouchevent(viewgroup.java:1949) 10-18 17:53:19.925: w/system.err(26928): @ android.widget.popupwindow$popupviewcontainer.dispatchtouchevent(popupwindow.java:1576) 10-18 17:53:19.925: w/system.err(26928): @ android.view.view.dispatchpointerevent(view.java:7332) 10-18 17:53:19.927: w/system.err(26928): @ android.view.viewrootimpl.deliverpointerevent(viewrootimpl.java:3520) 10-18 17:53:19.927: w/system.err(26928): @ android.view.viewrootimpl.deliverinputevent(viewrootimpl.java:3454) 10-18 17:53:19.928: w/system.err(26928): @ android.view.viewrootimpl.doprocessinputevents(viewrootimpl.java:4543) 10-18 17:53:19.929: w/system.err(26928): @ android.view.viewrootimpl.enqueueinputevent(viewrootimpl.java:4522) 10-18 17:53:19.930: w/system.err(26928): @ android.view.viewrootimpl$windowinputeventreceiver.oninputevent(viewrootimpl.java:4618) 10-18 17:53:19.930: w/system.err(26928): @ android.view.inputeventreceiver.dispatchinputevent(inputeventreceiver.java:171) 10-18 17:53:19.931: w/system.err(26928): @ android.os.messagequeue.nativepollonce(native method) 10-18 17:53:19.932: w/system.err(26928): @ android.os.messagequeue.next(messagequeue.java:125) 10-18 17:53:19.933: w/system.err(26928): @ android.os.looper.loop(looper.java:140) 10-18 17:53:19.934: w/system.err(26928): @ android.app.activitythread.main(activitythread.java:4987) 10-18 17:53:19.934: w/system.err(26928): @ java.lang.reflect.method.invokenative(native method) 10-18 17:53:19.935: w/system.err(26928): @ java.lang.reflect.method.invoke(method.java:511) 10-18 17:53:19.935: w/system.err(26928): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:821) 10-18 17:53:19.936: w/system.err(26928): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:584) 10-18 17:53:19.936: w/system.err(26928): @ dalvik.system.nativestart.main(native method) 10-18 17:53:19.945: d/openglrenderer(26928): flushing caches (mode 0) 10-18 17:53:19.965: w/mmumapper(26928): invalid operation unregister mva va(0x5513d000) size(189056) f(0x5) 10-18 17:53:19.966: w/mmumapper(26928): invalid operation unregister mva va(0x5516c000) size(189056) f(0x5) 10-18 17:53:19.966: w/mmumapper(26928): invalid operation unregister mva va(0x551ec000) size(189056) f(0x5) 10-18 17:53:19.973: w/inputeventreceiver(26928): attempted finish input event input event receiver has been disposed. 10-18 17:53:20.011: w/mmumapper(26928): fail register mva, unsupported format(0x1) 10-18 17:53:20.015: i/surfacetextureclient(26928): [stc::queuebuffer] this:0x51731c78, api:1, lastly queue time elapsed :91392 ms 10-18 17:53:20.015: i/surfacetextureclient(26928): [0x51731c78] frames:4, duration:91.500000, fps:0.043716 10-18 17:53:20.028: i/bufferqueue(26928): [bq::queuebuffer] unnamed-26928-0(0x51741980), api=1, queued=1 (drop frame) 10-18 17:53:20.043: i/surfacetextureclient(26928): [0x517528b0] frames:2, duration:1.218000, fps:1.641839 10-18 17:53:23.443: w/mmumapper(26928): invalid operation unregister mva va(0x54c9f000) size(45696) f(0x1)
android google-maps map google-maps-android-api-2
No comments:
Post a Comment