We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to draw a line like this:
I used WideVectorInfo: val sourceImage = BitmapFactory.decodeResource(activity.resources, R.drawable.linesource) val texSet = TextureSettings().apply { wrapU = true wrapV = true } baseController.addTexture(sourceImage, texSet, ThreadMode.ThreadCurrent) val wideVecInfo = WideVectorInfo().also { it.color = color it.lineWidth = width it.drawPriority = drawPriority if (tex != null) { it.setTexture(tex) } it.edgeFalloff = edge } try { val stream = activity.assets.open("wide_vecs/$name") VectorObject.createFromGeoJSON(stream.source().buffer().readUtf8()) ?.subdivideToGlobeGreatCircle(0.0001)?.let { return listOfNotNull( baseController.addWideVector(it, wideVecInfo, ThreadMode.ThreadCurrent)) } } catch (e: Exception) { Log.e(javaClass.simpleName, "Failed", e) }
the linesource drawable resources: But what I got was this:
What should I do?
The text was updated successfully, but these errors were encountered:
I'd suggest creating a short example to get the texture application right and then expand outward to the bigger example.
Sorry, something went wrong.
No branches or pull requests
I want to draw a line like this:
I used WideVectorInfo:
val sourceImage = BitmapFactory.decodeResource(activity.resources, R.drawable.linesource)
val texSet = TextureSettings().apply {
wrapU = true
wrapV = true
}
baseController.addTexture(sourceImage, texSet, ThreadMode.ThreadCurrent)
val wideVecInfo = WideVectorInfo().also {
it.color = color
it.lineWidth = width
it.drawPriority = drawPriority
if (tex != null) {
it.setTexture(tex)
}
it.edgeFalloff = edge
}
try {
val stream = activity.assets.open("wide_vecs/$name")
VectorObject.createFromGeoJSON(stream.source().buffer().readUtf8())
?.subdivideToGlobeGreatCircle(0.0001)?.let {
return listOfNotNull(
baseController.addWideVector(it, wideVecInfo, ThreadMode.ThreadCurrent))
}
} catch (e: Exception) {
Log.e(javaClass.simpleName, "Failed", e)
}
the linesource drawable resources:
But what I got was this:
What should I do?
The text was updated successfully, but these errors were encountered: