WhirlyGlobe icon indicating copy to clipboard operation
WhirlyGlobe copied to clipboard

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

Open lzx1 opened this issue 2 years ago • 1 comments

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?

lzx1 avatar Nov 09 '22 08:11 lzx1

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

sjg-wdw avatar Nov 18 '22 21:11 sjg-wdw