KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm developing a map, in Javascript using SVG to draw the lines. I would like to add a feature where you can search for a road, and if the road is found, a circle appears on the map. I know i can draw a circle in SVG, but my problem is that, the size of the circle should not change depending on the zoom-level. In other words the circle must have the same size at all times. The roads on my map have this feature, all i had to do was add vector-effect="non-scaling-stroke" to the line attributes.. A line looks like this. <line vector-effect="non-scaling-stroke" stroke-width="3" id = 'line1' x1 = '0' y1 = '0' x2 = '0' y2 = '0' style = 'stroke:rgb(255,215,0);'/> The circle looks like this. <circle id = "pointCircle" cx="0" cy="0" r="10" stroke="red" stroke-width="1" fill = "red"/> Is it possible to define the circle as "non-scaling" somehow?
Tags (comma-separated)
Save Edits
Cancel