List<Place> places = new ArrayList<Place>();
for (int i = 0; i < locations.length(); i++)
places.add(new PlacemarkPlaceImpl(locations.get(i)));
MapViewController map = MobileApplicationContext.getMapViewController();
if (places.size() == 0) {
} else if (places.size() == 1) {
map.showPlace(places.get(0));
} else {
map.showPlaces(places);
}
}