Search in sources :

Example 1 with OSciMap4TileSource

use of org.oscim.tiling.source.oscimap4.OSciMap4TileSource in project android_packages_apps_GmsCore by microg.

the class BackendMapView method initialize.

private void initialize() {
    ITileCache cache = new SharedTileCache(getContext());
    cache.setCacheSize(512 * (1 << 10));
    OSciMap4TileSource tileSource = new OSciMap4TileSource();
    tileSource.setCache(cache);
    VectorTileLayer baseLayer = map().setBaseMap(tileSource);
    Layers layers = map().layers();
    layers.add(drawables = new ClearableVectorLayer(map()));
    layers.add(labels = new LabelLayer(map(), baseLayer));
    layers.add(buildings = new BuildingLayer(map(), baseLayer));
    layers.add(items = new ItemizedLayer<MarkerItem>(map(), new MarkerSymbol(new AndroidBitmap(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.nop)), 0.5F, 1)));
    map().setTheme(MicrogThemes.DEFAULT);
}
Also used : OSciMap4TileSource(org.oscim.tiling.source.oscimap4.OSciMap4TileSource) LabelLayer(org.oscim.layers.tile.vector.labeling.LabelLayer) ITileCache(org.oscim.tiling.ITileCache) MarkerSymbol(org.oscim.layers.marker.MarkerSymbol) VectorTileLayer(org.oscim.layers.tile.vector.VectorTileLayer) AndroidBitmap(org.oscim.android.canvas.AndroidBitmap) BuildingLayer(org.oscim.layers.tile.buildings.BuildingLayer) Layers(org.oscim.map.Layers) ItemizedLayer(org.oscim.layers.marker.ItemizedLayer) SharedTileCache(org.microg.gms.maps.data.SharedTileCache) ClearableVectorLayer(org.microg.gms.maps.markup.ClearableVectorLayer)

Aggregations

SharedTileCache (org.microg.gms.maps.data.SharedTileCache)1 ClearableVectorLayer (org.microg.gms.maps.markup.ClearableVectorLayer)1 AndroidBitmap (org.oscim.android.canvas.AndroidBitmap)1 ItemizedLayer (org.oscim.layers.marker.ItemizedLayer)1 MarkerSymbol (org.oscim.layers.marker.MarkerSymbol)1 BuildingLayer (org.oscim.layers.tile.buildings.BuildingLayer)1 VectorTileLayer (org.oscim.layers.tile.vector.VectorTileLayer)1 LabelLayer (org.oscim.layers.tile.vector.labeling.LabelLayer)1 Layers (org.oscim.map.Layers)1 ITileCache (org.oscim.tiling.ITileCache)1 OSciMap4TileSource (org.oscim.tiling.source.oscimap4.OSciMap4TileSource)1