2016-02-26 79 views
1

我想在列表视图中显示客户确切位置的订单列表。 enter image description here如何在listview项目中显示mapview位置?

+0

我建议你为这些目的使用'CardView'像列表项。 –

+0

使用静态地图API尝试链接在这里: https://developers.google.com/maps/documentation/static-maps/intro – TUSHAR

+0

可能重复的[Android - 包含在ListView中的MapView](http://stackoverflow.com/questions/2961275/android-mapview-contained-within-a-listview) –

回答

1

这可能对你有所帮助。使用它与图像相同,并使用此URL替换图像网址并传递给您经纬度。

AQuery aq = new AQuery(activity); 

String url = "http://maps.googleapis.com/maps/api/staticmap?zoom=12&size=560x370&markers=size:mid|color:red|" 
         + item.getLattitude() 
         + "," 
         + item.getLongitude() 
         + "&sensor=false"; 

       aq.id(ImageView).image(url, true, true, 0, 
         0, null, AQuery.FADE_IN);