melowntech / vts-browser-js

JavaScript WebGL 3D map rendering engine
BSD 2-Clause "Simplified" License
220 stars 42 forks source link

drawlinestring not rendering on mobile #203

Closed jrjdavidson closed 4 years ago

jrjdavidson commented 4 years ago

Hello-

I use the following to draw lines on the map, works fine on a desktop, however the lines don't appear to render on mobile. Any thoughts on where I might be going wrong?

 renderer.drawLineString({
                    points : points,
                    size : 2.0,
                    ...color && {color:color},  //white line is multiplied by this color so resulting point will be this color
                    depthTest : false,
                    //depthOffset : [-0.01,0,0],
                    screenSpace : false, //switch to physical space
                    blend : false
                });
davidmtech commented 4 years ago

Line with color property looks wrong. Try something like color:[255,0,255,255] This should draw line with magenta color [r,g,b,a].

drawLineString should work on mobile devices. Otherwise I would need whole code which demonstrates problem.

jrjdavidson commented 4 years ago

No the color works fine- the idea is that it checks that the color variable is not set false or null, and then assigns the color. I tried on another mobile phone and it works - it seems that my ancient phone isn't able to handle that specific part of the code but everything else works.