flopp / py-staticmaps

A python module to create static map images with markers, geodesic lines, etc.
MIT License
135 stars 17 forks source link

How to add text labels. #10

Closed NMC-DAVE closed 3 years ago

NMC-DAVE commented 3 years ago

I want add text labels over map. How can I do? Very thanks!

flopp commented 3 years ago

Not yet, unfortunately :(

I guess I will have to restructure the code to make add custom markers (such as text labels) easier.

NMC-DAVE commented 3 years ago

Thanks very much. Looking forward to the new feature.

flopp commented 3 years ago

Have a look at examples/custom_objects.py for an example which adds custom text labels. Rendering SVG is a bit difficult, as there seem's to be no way of determining the text extents (text width + height) - so I'm guessing the extents...