How to add SVG Markers?

97 views
Skip to first unread message

Prasanna Venkadesh

unread,
Mar 18, 2018, 1:04:39 PM3/18/18
to mapsforge-dev
 Hi,

I followed samples from github repository. I can see how png's are rendered as markers, but I don't see an example for rendering a SVG as an marker. Also I see adding markers via Itemized Overlay as deprecated, if true, then what is the preferred way of adding a marker on press or long press?

Btw, VTM is awesome. Thanks for contributing and bringing up such a wonderful library.

Emux

unread,
Mar 18, 2018, 1:12:35 PM3/18/18
to mapsfo...@googlegroups.com
Can convert svg to png in filesystem or to bitmaps via code and use the result bitmap in markers.

That's what we do already with theme svg resources via AndroidSvgBitmap class.

BTW what do you mean with deprecated, the markers as overlays are supposed to be used via ItemizedLayer, like demonstrated in MarkerOverlayActivity sample.

--
Emux

Prasanna Venkadesh

unread,
Mar 20, 2018, 1:24:54 PM3/20/18
to mapsforge-dev
Hey.


On Sunday, March 18, 2018 at 10:42:35 PM UTC+5:30, Emux wrote:
Can convert svg to png in filesystem or to bitmaps via code and use the result bitmap in markers.

That's what we do already with theme svg resources via AndroidSvgBitmap class.

Thanks for pointing it out. I am able to add SVG markers.
 

BTW what do you mean with deprecated, the markers as overlays are supposed to be used via ItemizedLayer, like demonstrated in MarkerOverlayActivity sample.
Reply all
Reply to author
Forward
0 new messages