Reputation: 2305
Given my example here, how can I get the location markers on the map to scale when I zoom in/out on the map? Based on what I've read, I think I need to use a tween
function via attrTween
but I don't really know what that means.
Upvotes: 1
Views: 937
Reputation: 109232
You can get the current zoom level through zoom.scale()
. This you can then use to compute the scale factor for the marker path
s such that they remain the same size. All you then need to do is apply this scale in a transform
attribute for those path
s.
Upvotes: 1