javascript - SVG image not aligning on zoom with leaflets -


i have below code display svg file on base map. not retaining portion on zoom , transform being added every zoom causes svg move further away position.

i have co-ordinates svg json.

function update() { feature.attr("transform", function(d) { return "translate("+ (map.latlngtolayerpoint(d.latlng).x) +","+ (map.latlngtolayerpoint(d.latlng).y) +")"; } ); } 


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -