I created a fictional map and visualized it with d3. Now I would like to show a scale/rule so that the user can see which distance (kilometers,meters) he is currently using.

I was thinking about creating lines in QGIS (with which I created the map) and than setting the distance in km/m as attributes. After that using these information for the scale on the website.

Is that a good way or is there any easier and better way to do this.

The scale should also change the values when zooming for sure. So a picture is no solution.

Found this here: which is generating distances. But I'm not sure that a can adapt this for me: http://bl.ocks.org/mpmckenna8/def3735b8e1eef5128a7

This one is nearly what I'm looking for: http://www.qgistutorials.com/en/docs/making_a_map.html But I want to create that scalebar on my site and not just as an image. So how to transfer that information?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.