Guest User

Untitled

a guest
Mar 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Polygon nordOption = mMap.addPolygon(new PolygonOptions()
  2. .add(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41)
  3. .strokeColor(Color.RED));
  4.  
  5. Polygon centreOption = mMap.addPolygon(new PolygonOptions()
  6. .add(c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24)
  7. .strokeColor(Color.BLUE));
  8.  
  9. Polygon sudOption = mMap.addPolygon(new PolygonOptions()
  10. .add(s1,s2,s3,s4,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14)
  11. .strokeColor(Color.GREEN));
  12.  
  13. nordOption.setClickable(true);
  14. centreOption.setClickable(true);
  15. sudOption.setClickable(true);
  16.  
  17. mMap.setOnPolygonClickListener(new GoogleMap.OnPolygonClickListener() {
  18. @Override
  19. public void onPolygonClick(Polygon polygon) {
  20. Toast.makeText(getApplication(),"Soy centro",Toast.LENGTH_LONG).show();
  21.  
  22. }
  23. });
Add Comment
Please, Sign In to add comment