Package 

Class Polyline

  • All Implemented Interfaces:
    org.osmdroid.views.util.constants.OverlayConstants

    
    public class Polyline
    extends PolyOverlayWithIW
                        

    A polyline is a list of points, where line segments are drawn between consecutive points. Mimics the Polyline class from Google Maps Android API v2 as much as possible. Main differences:- Doesn't support Z-Index: drawing order is the order in map overlays- Supports InfoWindow (must be a BasicInfoWindow).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface Polyline.OnClickListener

      Internal method used to ensure that the infowindow will have a default position in all cases,so that the user can call showInfoWindow even if no tap occured before.Currently, set the position on the "middle" point of the polyline.

    • Constructor Summary

      Constructors 
      Constructor Description
      Polyline() If MapView is not provided, infowindow popup will not function unless you set it yourself.
      Polyline(MapView mapView) If MapView is null, infowindow popup will not function unless you set it yourself.
      Polyline(MapView pMapView, boolean pUsePath, boolean pClosePath)
      Polyline(MapView pMapView, boolean pUsePath)
    • Method Summary

      Modifier and Type Method Description
      ArrayList<GeoPoint> getPoints()
      int getColor()
      float getWidth()
      Paint getPaint()
      void setColor(int color)
      void setWidth(float width)
      void setOnClickListener(Polyline.OnClickListener listener)
      boolean onClickDefault(Polyline polyline, MapView mapView, GeoPoint eventPos) default behaviour when no click listener is set
      void onDetach(MapView mapView) Override to perform clean up of resources before shutdown.
      double getDistance()
      • Methods inherited from class org.osmdroid.views.overlay.PolyOverlayWithIW

        addPoint, contains, draw, getActualPoints, getBounds, getCloseTo, getInfoWindowLocation, getOutlinePaint, getOutlinePaintLists, isCloseTo, isGeodesic, isVisible, onSingleTapConfirmed, setDensityMultiplier, setDowngradeDisplay, setDowngradePixelSizes, setGeodesic, setInfoWindow, setInfoWindowLocation, setMilestoneManagers, setPoints, setVisible, showInfoWindow, usePath
      • Methods inherited from class org.osmdroid.views.overlay.OverlayWithIW

        closeInfoWindow, getId, getInfoWindow, getRelatedObject, getSnippet, getSubDescription, getTitle, isInfoWindowOpen, onDestroy, setId, setRelatedObject, setSnippet, setSubDescription, setTitle
      • Methods inherited from class org.osmdroid.views.overlay.Overlay

        draw, isEnabled, onDetach, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onPause, onResume, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabled
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait