public override tiles_output getTile(int zoomLevel, int column, int row) { tiles_output result = null; int currentZoomLevel = zoomLevel; try { maxzoom_output value = getMaxZoom(); int maxZoom = value.value; if (zoomLevel > maxZoom) { currentZoomLevel = maxZoom; } } catch (Exception) { } tiles til = db.Query <tiles>("SELECT * FROM tiles WHERE zoom_level = ? AND tile_column = ? AND tile_row = ?", currentZoomLevel, column, row).FirstOrDefault(); if (til != null) { string data = ConstantMbTilePlugin.Base64EncodeByte(til.tile_data); result = new tiles_output(data); } return(result); }
public override maxzoom_output getMaxZoom() { maxzoom_output result = null; tiles zoom_max = db.Query <tiles>("SELECT * FROM tiles ORDER BY zoom_level DESC LIMIT 1").FirstOrDefault(); if (zoom_max != null) { result = new maxzoom_output(zoom_max.zoom_level); } return(result); }
public override minzoom_output getMinZoom() { minzoom_output result = null; tiles zoom_min = db.Query <tiles>("SELECT * FROM tiles ORDER BY zoom_level ASC LIMIT 1").FirstOrDefault(); if (zoom_min != null) { result = new minzoom_output(zoom_min.zoom_level); } return(result); }