Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. Iterator<Stall> iter = stalls.listIterator();
  2. while (iter.hasNext()) {
  3. final Stall currentStall = iter.next();
  4.  
  5. String stallId = currentStall.getId().get$Oid();
  6. Double x = currentStall.getLocation().getCoordinates().get(0);
  7. Double y = currentStall.getLocation().getCoordinates().get(1);
  8. final String myName = currentStall.getName();
  9. addCircle(new LatLng(y, x), currentStall.getRadius(), 0);
  10.  
  11. LatLng CIU = new LatLng(y, x);
  12.  
  13. Marker cmumarker;
  14. cmumarker = mMap.addMarker(new MarkerOptions()
  15. .position(CIU)
  16. .title(myName)
  17. .flat(true)
  18. .snippet(currentStall.getId().get$Oid()));
  19. cmumarker.showInfoWindow();
  20.  
  21. mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener(){
  22. @Override
  23. public void onInfoWindowClick(Marker cmumarker){
  24. //Intent intent = new Intent(MainActivity.this,AdminActivity.class);
  25. //startActivity(intent);
  26. Intent intent = new Intent("life.stall.StallBox");
  27. startActivity(intent);
  28. App appState = ((App) getApplicationContext());
  29. appState.setCurStall(currentStall);
  30. Toast.makeText(getApplicationContext(), myName, Toast.LENGTH_LONG).show();
  31. }
  32. });
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement