Polyline with different argb colors

18 views
Skip to first unread message

Stefano Gelli

unread,
Dec 17, 2019, 3:59:47 AM12/17/19
to openmap-users
Hi all,
I have several source of data that generates a lot of small lines that, after proper conversion, are translated to lat lon lines (OMLine). Each line has an intensity level that should affect the color to be used while drawing the line itself. Lines update quickly (500ms) and the layer should be able to design them in order to give the user an impression of "live" image. In the past i stored the lines in menory and just designed them, one by one based on the bounding box. Now i would like to do sonthing better and more scalable. The idea is to translate all the small lines in a unique single polyline in which some sublines are not visible. In other words i would need a polyline where each segment has a different argb color. This would allow to store a single object in memory and to draw a single object on the layer. Is this feature already available or, if not, which is the best starting point to obtain such an object?

Thank you
S

Don Dietrick

unread,
Dec 17, 2019, 11:47:43 AM12/17/19
to Stefano Gelli, openmap-users
Hi Stefano,

For stuff like this you can use an OMGraphicList and set it to be vague - it’ll treat itself and its contents as one OMGraphic. I’ve also created classes that extend OMGraphicList that know how to query a data source and configure itself based on the data settings, adding different OMGraphics to itself to become a compound OMGraphic that acts as a single map object. You can keep adding functionality that lets it change its appearance based on different conditions and input.

Hope this helps,

Don
> --
> You received this message because you are subscribed to the Google Groups "openmap-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to openmap-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openmap-users/e4a0aee4-9a36-4f26-84bc-5af1bcab9981%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages