# ScaleLineMapTool bug when working with OpenStreetMap

**URL:** <https://community.thinkgeo.com/t/scalelinemaptool-bug-when-working-with-openstreetmap/10602>\
**Category:** ThinkGeo UI for Desktop\
**Created:** [April 10, 2025, 10:03am UTC](https://community.thinkgeo.com/t/scalelinemaptool-bug-when-working-with-openstreetmap/10602 "2025-04-10T10:03:14Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [April 17, 2025, 7:53pm UTC](https://community.thinkgeo.com/t/scalelinemaptool-bug-when-working-with-openstreetmap/10602/13 "2025-04-17T19:53:44Z")

</div>

Hi Mahdi,

I’ve no idea why you’re seeing that error (the semi blue polygon becomes concrete after panning). We haven’t been able to reproduce it, and the source code looks correct. A couple of sanity checks:

1. Remove bin and obj folders, build and run again.
2. Double click the exe in the bin folder see if you can recreate it, check the version number of `ThinkGeo.UI.Wpf.dll` and confirm it’s the one we expect.

Regarding CurrentScale issue, you mentioned “avoiding the setting of an invalid scale”—were you setting an invalid scale in the code? Could you share a code snippet?

On another note, in beta129 we added a default `MapScale`, so there will not have any “MapScale not set” exception. Please pull the latest beta and give it another try.

Let me know how it goes!

Thanks,  
Ben

---

_[View the full topic](https://community.thinkgeo.com/t/scalelinemaptool-bug-when-working-with-openstreetmap/10602)._
