Class StandardRenderer

    • Constructor Summary

      Constructors 
      Constructor Description
      StandardRenderer​(MapDataStore mapDataStore, org.mapsforge.core.graphics.GraphicFactory graphicFactory, boolean renderLabels)
      Constructs a new StandardRenderer (without hillshading).
      StandardRenderer​(MapDataStore mapDataStore, org.mapsforge.core.graphics.GraphicFactory graphicFactory, boolean renderLabels, HillsRenderConfig hillsRenderConfig)
      Constructs a new StandardRenderer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.mapsforge.core.model.LatLong getStartPosition()  
      java.lang.Byte getStartZoomLevel()  
      byte getZoomLevelMax()  
      protected void processReadMapData​(RenderContext renderContext, MapReadResult mapReadResult)  
      void renderArea​(RenderContext renderContext, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, int level, PolylineContainer way)
      Renders an area with the given parameters.
      void renderAreaCaption​(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, java.lang.String caption, float horizontalOffset, float verticalOffset, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, org.mapsforge.core.graphics.Position position, int maxTextWidth, PolylineContainer way)
      Renders an area caption with the given text.
      void renderAreaSymbol​(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, org.mapsforge.core.graphics.Bitmap symbol, PolylineContainer way)
      Renders an area symbol with the given bitmap.
      protected void renderPointOfInterest​(RenderContext renderContext, PointOfInterest pointOfInterest)  
      void renderPointOfInterestCaption​(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, java.lang.String caption, float horizontalOffset, float verticalOffset, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, org.mapsforge.core.graphics.Position position, int maxTextWidth, PointOfInterest poi)
      Renders a point of interest caption with the given text.
      void renderPointOfInterestCircle​(RenderContext renderContext, float radius, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, int level, PointOfInterest poi)
      Renders a point of interest circle with the given parameters.
      void renderPointOfInterestSymbol​(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, org.mapsforge.core.model.Rectangle boundary, org.mapsforge.core.graphics.Bitmap symbol, PointOfInterest poi)
      Renders a point of interest symbol with the given bitmap.
      protected void renderWaterBackground​(RenderContext renderContext)  
      void renderWay​(RenderContext renderContext, org.mapsforge.core.graphics.Paint stroke, float dy, int level, PolylineContainer way)
      Renders a way with the given parameters.
      protected void renderWay​(RenderContext renderContext, PolylineContainer way)  
      void renderWaySymbol​(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, org.mapsforge.core.graphics.Bitmap symbol, float dy, org.mapsforge.core.model.Rectangle boundary, boolean repeat, float repeatGap, float repeatStart, boolean rotate, PolylineContainer way)
      Renders a way with the given symbol along the way path.
      void renderWayText​(RenderContext renderContext, org.mapsforge.core.graphics.Display display, int priority, java.lang.String textKey, float dy, org.mapsforge.core.graphics.Paint fill, org.mapsforge.core.graphics.Paint stroke, boolean repeat, float repeatGap, float repeatStart, boolean rotate, PolylineContainer way)
      Renders a way with the given text along the way path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • graphicFactory

        public final org.mapsforge.core.graphics.GraphicFactory graphicFactory
    • Constructor Detail

      • StandardRenderer

        public StandardRenderer​(MapDataStore mapDataStore,
                                org.mapsforge.core.graphics.GraphicFactory graphicFactory,
                                boolean renderLabels)
        Constructs a new StandardRenderer (without hillshading).
        Parameters:
        mapDataStore - the MapDataStore from which the map data will be read.
      • StandardRenderer

        public StandardRenderer​(MapDataStore mapDataStore,
                                org.mapsforge.core.graphics.GraphicFactory graphicFactory,
                                boolean renderLabels,
                                HillsRenderConfig hillsRenderConfig)
        Constructs a new StandardRenderer.
        Parameters:
        mapDataStore - the MapDataStore from which the map data will be read.
        hillsRenderConfig - optional relief shading support.
    • Method Detail

      • getStartPosition

        public org.mapsforge.core.model.LatLong getStartPosition()
        Returns:
        the start point (may be null).
      • getStartZoomLevel

        public java.lang.Byte getStartZoomLevel()
        Returns:
        the start zoom level (may be null).
      • getZoomLevelMax

        public byte getZoomLevelMax()
        Returns:
        the maximum zoom level.
      • renderArea

        public void renderArea​(RenderContext renderContext,
                               org.mapsforge.core.graphics.Paint fill,
                               org.mapsforge.core.graphics.Paint stroke,
                               int level,
                               PolylineContainer way)
        Description copied from interface: RenderCallback
        Renders an area with the given parameters.
        Specified by:
        renderArea in interface RenderCallback
        fill - the paint to be used for rendering the area.
        stroke - an optional paint for the area casing (may be null).
      • renderAreaCaption

        public void renderAreaCaption​(RenderContext renderContext,
                                      org.mapsforge.core.graphics.Display display,
                                      int priority,
                                      java.lang.String caption,
                                      float horizontalOffset,
                                      float verticalOffset,
                                      org.mapsforge.core.graphics.Paint fill,
                                      org.mapsforge.core.graphics.Paint stroke,
                                      org.mapsforge.core.graphics.Position position,
                                      int maxTextWidth,
                                      PolylineContainer way)
        Description copied from interface: RenderCallback
        Renders an area caption with the given text.
        Specified by:
        renderAreaCaption in interface RenderCallback
        display - display mode
        priority - priority level
        caption - the text.
        horizontalOffset - the horizontal offset of the text.
        verticalOffset - the vertical offset of the text.
        fill - the paint for the text.
        stroke - the casing of the text (may be null).
        position - optional position (may be null)
        maxTextWidth - maximum text width .
        way - the way for the caption.
      • renderPointOfInterestCaption

        public void renderPointOfInterestCaption​(RenderContext renderContext,
                                                 org.mapsforge.core.graphics.Display display,
                                                 int priority,
                                                 java.lang.String caption,
                                                 float horizontalOffset,
                                                 float verticalOffset,
                                                 org.mapsforge.core.graphics.Paint fill,
                                                 org.mapsforge.core.graphics.Paint stroke,
                                                 org.mapsforge.core.graphics.Position position,
                                                 int maxTextWidth,
                                                 PointOfInterest poi)
        Description copied from interface: RenderCallback
        Renders a point of interest caption with the given text.
        Specified by:
        renderPointOfInterestCaption in interface RenderCallback
        caption - the text to be rendered.
        horizontalOffset - the horizontal offset of the caption.
        verticalOffset - the vertical offset of the caption.
        fill - the paint to be used for rendering the text.
        stroke - an optional paint for the text casing (may be null).
      • renderPointOfInterestCircle

        public void renderPointOfInterestCircle​(RenderContext renderContext,
                                                float radius,
                                                org.mapsforge.core.graphics.Paint fill,
                                                org.mapsforge.core.graphics.Paint stroke,
                                                int level,
                                                PointOfInterest poi)
        Description copied from interface: RenderCallback
        Renders a point of interest circle with the given parameters.
        Specified by:
        renderPointOfInterestCircle in interface RenderCallback
        radius - the radius of the circle.
        fill - the paint to be used for rendering the circle.
        stroke - an optional paint for the circle casing (may be null).
      • renderPointOfInterestSymbol

        public void renderPointOfInterestSymbol​(RenderContext renderContext,
                                                org.mapsforge.core.graphics.Display display,
                                                int priority,
                                                org.mapsforge.core.model.Rectangle boundary,
                                                org.mapsforge.core.graphics.Bitmap symbol,
                                                PointOfInterest poi)
        Description copied from interface: RenderCallback
        Renders a point of interest symbol with the given bitmap.
        Specified by:
        renderPointOfInterestSymbol in interface RenderCallback
      • renderWay

        public void renderWay​(RenderContext renderContext,
                              org.mapsforge.core.graphics.Paint stroke,
                              float dy,
                              int level,
                              PolylineContainer way)
        Description copied from interface: RenderCallback
        Renders a way with the given parameters.
        Specified by:
        renderWay in interface RenderCallback
        stroke - the paint to be used for rendering the way.
        dy - the offset of the way.
      • renderWaySymbol

        public void renderWaySymbol​(RenderContext renderContext,
                                    org.mapsforge.core.graphics.Display display,
                                    int priority,
                                    org.mapsforge.core.graphics.Bitmap symbol,
                                    float dy,
                                    org.mapsforge.core.model.Rectangle boundary,
                                    boolean repeat,
                                    float repeatGap,
                                    float repeatStart,
                                    boolean rotate,
                                    PolylineContainer way)
        Description copied from interface: RenderCallback
        Renders a way with the given symbol along the way path.
        Specified by:
        renderWaySymbol in interface RenderCallback
        symbol - the symbol to be rendered.
        dy - the offset of the way.
        boundary - the relative positioning of the symbol
        repeat - true if the symbol should be repeated, false otherwise.
        repeatGap - distance between repetitions.
      • renderWayText

        public void renderWayText​(RenderContext renderContext,
                                  org.mapsforge.core.graphics.Display display,
                                  int priority,
                                  java.lang.String textKey,
                                  float dy,
                                  org.mapsforge.core.graphics.Paint fill,
                                  org.mapsforge.core.graphics.Paint stroke,
                                  boolean repeat,
                                  float repeatGap,
                                  float repeatStart,
                                  boolean rotate,
                                  PolylineContainer way)
        Description copied from interface: RenderCallback
        Renders a way with the given text along the way path.
        Specified by:
        renderWayText in interface RenderCallback
        textKey - the text to be rendered.
        dy - the offset of the way text.
        fill - the paint to be used for rendering the text.
      • renderWaterBackground

        protected void renderWaterBackground​(RenderContext renderContext)