Thursday, July 5, 2012

[android-developers] Re: How to display static google map on android imageview?

        InputStream is = (InputStream) new URL(url).getContent();
        drawable = Drawable.createFromStream(is, "YourAppName");
        i_Map.setImageDrawable(drawable);
        i_Map.setScaleType(ScaleType.FIT_XY);

On Thursday, July 5, 2012 2:48:22 AM UTC-4, Remo wrote:
Hi All,

I am new in android, I dont know how to display static google map on an imageview. Something similar to "Whatsapp" showing while share the location. How can I do this?

From googly document i came to know that we need to pass the Url in image view. Please share the code to pass the Url in Imge view

String latEiffelTower = "48.858235";
String lngEiffelTower = "2.294571";
String url = "http://maps.google.com/maps/api/staticmap?center=" + latEiffelTower + "," + lngEiffelTower + "&zoom=15&size=200x200&sensor=false"

Thanks
Remo

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate