1 package org
.mozilla
.gecko
.gfx
;
3 import android
.content
.Context
;
4 import android
.graphics
.RectF
;
6 public class FixedZoomTileLayer
extends ComposedTileLayer
{
7 public FixedZoomTileLayer(Context context
) {
12 protected RectF
getViewPort(ImmutableViewportMetrics viewportMetrics
) {
13 float zoom
= getZoom(viewportMetrics
);
14 RectF rect
= normalizeRect(viewportMetrics
.getViewport(), viewportMetrics
.zoomFactor
, zoom
);
15 return inflate(roundToTileSize(rect
, tileSize
), getInflateFactor());
19 protected float getZoom(ImmutableViewportMetrics viewportMetrics
) {
24 protected int getTilePriority() {
28 private IntSize
getInflateFactor() {
29 return new IntSize(tileSize
.width
, tileSize
.height
*6);