Guest User

Untitled

a guest
Jul 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. @Override
  2. public synchronized void draw(Canvas canvas, MapView mapView, boolean shadow)
  3. {
  4. super.draw(canvas, mapView, shadow);
  5. if (shadow == false) {
  6. int sz = this.size();
  7. for (int i = 0; i < sz; i++) {
  8. OverlayItem item = mOverlays.get(i);
  9.  
  10. GeoPoint point = item.getPoint();
  11. Point ptScreenCoord = new Point();
  12. mapView.getProjection().toPixels(point, ptScreenCoord);
  13.  
  14. Paint paint = new Paint();
  15. paint.setTextAlign(Paint.Align.CENTER);
  16. paint.setTextSize(mTextSize);
  17. paint.setTypeface(Typeface.DEFAULT_BOLD);
  18. paint.setShadowLayer(2.0f, 1.0f, 1.0f, Color.DKGRAY);
  19. paint.setARGB(255, 255, 255, 255);
  20.  
  21. canvas.drawText("myText", ptScreenCoord.x, ptScreenCoord.y-40, paint);
  22. }
  23. }
  24. }
Add Comment
Please, Sign In to add comment