android - onLocationChanged call the onDraw method in my custom view -



android - onLocationChanged call the onDraw method in my custom view -

i have mapimageviewer activity class has methods checking phones gps location. activity calls custom view of mine called mapcanvas - constructor takes latitude , longitude , draws circle corresponding pixels on image of map.

this works ok, wondering how can update , phone call ondraw method every time gps coordinates change? know needs go in onlocationchanged method..but i'm not sure how can pass new latitude , longitude values there custom view class.

what sending lat/lon onlocationchanged() method using .sendbroadcast() , handle them within view class broadcastreceiver?

alternatively utilize callback method locationlistener shown in this post.

android view android-canvas draw

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -