Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android: adding tileSize to raster source #166

Merged
merged 3 commits into from
Nov 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,28 @@ static VectorSource buildVectorSource(String id, Map<String, Object> properties)

static RasterSource buildRasterSource(String id, Map<String, Object> properties) {
final Object url = properties.get("url");
final Object tileSizeObj = properties.get("tileSize");
if (url != null) {
try {
final URI uri = new URI(Convert.toString(url));
final String uri = Convert.toString(url);
if (tileSizeObj != null) {
final int tileSize = Convert.toInt(tileSizeObj);
return new RasterSource(id, uri, tileSize);
} else {
return new RasterSource(id, uri);
} catch (URISyntaxException e) {
}
}

final TileSet tileSet = buildTileset(properties);
return tileSet != null ? new RasterSource(id, tileSet) : null;
if (tileSet != null) {
if (tileSizeObj != null) {
final int tileSize = Convert.toInt(tileSizeObj);
return new RasterSource(id, tileSet, tileSize);
} else {
return new RasterSource(id, tileSet);
}
} else {
return null;
}
}

static RasterDemSource buildRasterDemSource(String id, Map<String, Object> properties) {
Expand Down