This project has moved and is read-only. For the latest updates, please go here.

Does SharpMap 0.9 work on Windows 7?

Topics: General Topics, SharpMap v0.9 / v1.x, Web Controls
Aug 27, 2011 at 6:47 AM
Edited Aug 29, 2011 at 10:59 AM

I am using SharpMap 0.9 web controls on XP. The web pages work correctly on XP Pro. I am using VS2008 & the web pages are under development.  .NET Framework = 3.5. On running on IIS, (XP) the pages function correctly.

When I copy the same code including the SharpMap DLLs to a Windows-7 m/c with VS 2008 & run as a FileSystem web site, the map functions does not work correctly.

The map functions that have a problem are Zoom, Select a Polygon.
It appears the Mouse Click Co-ordinates conversion is not working correctly on Windows-7.

I have spent a considerable time on the web pages. Suddenly when I started a demo today to the client, the problem surfaced. All the DLLs OS dependant?

Aug 29, 2011 at 11:03 AM

I assume it is a problem of the different DPI settings on windows xp and windows 7 (72 / 96). There are some threads about it, though I currently don't know how to handle it.

Hth FObermiaer

Aug 29, 2011 at 11:09 AM
Edited Aug 29, 2011 at 11:12 AM

Thanks. I did a search for Windows 7, nothing came up. Can you post a link please.

Not sure if I can change the DPI settings on my Windows 7 machine. . But will try in the morning & see if the problem gets resolved. But I am not sure if I can force the customers to change the DPI settings. This may become a major issue. Is there any workaround at all for this issue?

Just checked my XP M/c is set to 96 DPI.

Aug 29, 2011 at 11:14 AM

try this one

Hth FObermaier

Aug 29, 2011 at 11:45 AM

Setting the DPI to 96 (100%) on Windows 7, the Map works correctly. But in IE-9, when you change the Zoom %  to anything other than 100% the problem arises.

However on XP (IE-7) IE Zoom % does not affect at all. The app works fine.

Looks like, this will kill my app as most of our customers use Laptops. On my Dell, I either have 1920x1080 (recommended) or 1280x1024 screen resoltion. On the 1920x1080, the font (100%) is tiny. & On the 1280x1024, the display screen is not completed used. At lesat if the IE zoom would have worked, I would have offered that as a workaround.

Aug 29, 2011 at 12:22 PM

So this is an issue with the graphics settings and not of the OS. Please report an appropriate Issue describing your problem hopefully along with some sample code so we can work on it.
If you find a solution, please report it back, since this issue may arise for others as well

Cheers FObermaier

Aug 30, 2011 at 9:07 PM
Edited Sep 1, 2011 at 1:44 AM

You can use the code under sharpmap-89801\Trunk\DemoWebSite. I am using VS2008, .NET 2.0 & Internet Explorer 9 on Windows 7. 

Set The windows Font seting at 100% for all tests.

Keep IE - zoom level at 100%.
On the Simple.aspx, select "Zoom in".
Zoom until the cities are visible.
Click on a city & see how that city icon stays at the center of the map.

Now change IE - zoom level to 125% & click on the city icon.
Observe how that City icon moves away from the center of the map.

On a XP, the city icon stays at the center of the map on all IE zoom settings.

Font setting at > 100% &  IE-Zoom setting >100% creates a even bigger discrepancy & you can observe the map center moving away faster.

Please let me know if you need any more information.

Appreciate if you can post the status, since this will make/.break my project.


Oct 20, 2011 at 2:48 PM

Hey, im having the same issue reported here. 

I cannot run SharpMap.dll v0.9.3946.23110 on Win7 64bits using Windows Forms.

I dont understand much of what you are suggesting to us but when i get to the debugger, the application breaks during the component initialization.

Please let me know if you experieced this things. 

Have you try the component under win 7 64 bits?


Thank you.

Oct 21, 2011 at 6:51 PM
Edited Oct 21, 2011 at 6:51 PM


SharpMap is compiled using x86 configuration since some external references requires that.

This means that your application also need to be built using x86 configuration. (Application and be build against x86 config and run on win7 64 bit machines)

If you are just using SharpMap and SharpMap.UI you can compile those against AnyCPU or x64 if you like (sharpmap supports that). However the SharpMap.Extensions project kan not be compiled as x64 since Gdal and SpatialLite providers require x86.

For the next build of sharpmap i think we will publish both x86 and x64 builds.

Oct 21, 2011 at 7:03 PM
Thank you very much for your reply.
I will try compile the project and will see it still get working.

Hope you all keep on doing this project!!