Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Iterator<Stall> iter = stalls.listIterator();
- while (iter.hasNext()) {
- final Stall currentStall = iter.next();
- String stallId = currentStall.getId().get$Oid();
- Double x = currentStall.getLocation().getCoordinates().get(0);
- Double y = currentStall.getLocation().getCoordinates().get(1);
- final String myName = currentStall.getName();
- addCircle(new LatLng(y, x), currentStall.getRadius(), 0);
- LatLng CIU = new LatLng(y, x);
- Marker cmumarker;
- cmumarker = mMap.addMarker(new MarkerOptions()
- .position(CIU)
- .title(myName)
- .flat(true)
- .snippet(currentStall.getId().get$Oid()));
- cmumarker.showInfoWindow();
- mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener(){
- @Override
- public void onInfoWindowClick(Marker cmumarker){
- //Intent intent = new Intent(MainActivity.this,AdminActivity.class);
- //startActivity(intent);
- Intent intent = new Intent("life.stall.StallBox");
- startActivity(intent);
- App appState = ((App) getApplicationContext());
- appState.setCurStall(currentStall);
- Toast.makeText(getApplicationContext(), myName, Toast.LENGTH_LONG).show();
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement