コード例 #1
0
 /// <summary>
 /// Constructs a new DatabaseRenderer that will not draw labels, instead it stores the label
 /// information in the labelStore for drawing by a LabelLayer.
 /// </summary>
 /// <param name="mapDatabase">
 ///            the MapDatabase from which the map data will be read. </param>
 public DatabaseRenderer(MapDataStore mapDatabase, IGraphicFactory graphicFactory, TileBasedLabelStore labelStore)
 {
     this.mapDatabase      = mapDatabase;
     this.graphicFactory   = graphicFactory;
     this.labelStore       = labelStore;
     this.renderLabels     = false;
     this.tileCache        = null;
     this.tileDependencies = null;
 }
コード例 #2
0
 /// <summary>
 /// Constructs a new DatabaseRenderer that will draw labels onto the tiles.
 /// </summary>
 /// <param name="mapFile">
 ///            the MapDatabase from which the map data will be read. </param>
 public DatabaseRenderer(MapDataStore mapFile, IGraphicFactory graphicFactory, TileCache tileCache)
 {
     this.mapDatabase      = mapFile;
     this.graphicFactory   = graphicFactory;
     this.labelStore       = null;
     this.renderLabels     = true;
     this.tileCache        = tileCache;
     this.tileDependencies = new TileDependencies();
 }
コード例 #3
0
 /// <summary>
 /// Creates a TileRendererLayer. </summary>
 /// <param name="tileCache"> cache where tiles are stored </param>
 /// <param name="mapDataStore"> the mapsforge map file </param>
 /// <param name="mapViewPosition"> the mapViewPosition to know which tiles to render </param>
 /// <param name="isTransparent"> true if the tile should have an alpha/transparency </param>
 /// <param name="renderLabels"> true if labels should be rendered onto tiles </param>
 /// <param name="graphicFactory"> the graphicFactory to carry out platform specific operations </param>
 public TileRendererLayer(TileCache tileCache, MapDataStore mapDataStore, MapViewPosition mapViewPosition, bool isTransparent, bool renderLabels, IGraphicFactory graphicFactory) : base(tileCache, mapViewPosition, graphicFactory.CreateMatrix(), isTransparent)
 {
     this.graphicFactory = graphicFactory;
     this.mapDataStore   = mapDataStore;
     if (renderLabels)
     {
         this.tileBasedLabelStore = null;
         this.databaseRenderer    = new DatabaseRenderer(this.mapDataStore, graphicFactory, tileCache);
     }
     else
     {
         this.tileBasedLabelStore = new TileBasedLabelStore(tileCache.CapacityFirstLevel);
         this.databaseRenderer    = new DatabaseRenderer(this.mapDataStore, graphicFactory, tileBasedLabelStore);
     }
     this.textScale = 1;
 }