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

Using WideVectorInfo on Android platform, I got an incorrect result. #1566

Open
lzx1 opened this issue Nov 9, 2022 · 1 comment
Open

Using WideVectorInfo on Android platform, I got an incorrect result. #1566

lzx1 opened this issue Nov 9, 2022 · 1 comment

Comments

@lzx1
Copy link

lzx1 commented Nov 9, 2022

I want to draw a line like this:

QQ截图20221109154611
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:
airspace1
But what I got was this:
Screenshot_20221109_154916_com mousebirdconsulting autotester

What should I do?

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Nov 18, 2022

I'd suggest creating a short example to get the texture application right and then expand outward to the bigger example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants