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

Rendering a ShapeFile in v2.0

Topics: SharpMap v2.0
Apr 12, 2009 at 8:49 AM
Hi, I downloaded the latest code from google svn. It compiled successfully and could run demo website (after restoring the db and changing sql connection settings in web.config).
What I want to do is render a shapefile from disk. This is implemented into the demo website (you need to comment setupMsSqlSpatial(m) and uncomment setupShapefile(context, m) in DemoMapSetupUtility class). After doing this the map was not rendering anymore! So I did a little debugging to see what is the porblem.
I came to the conclusion that error happens in RenderFeatureLayer method inside SharpMap.Presentation.AspNet.MVP.MapPresenter class, because features list is empty.
I don't know if I'm doing something wrong or not but I tried many things to slove my problem but had no luck.
I have been using v0.9 for a while and it's been working really great (great job guys) but decided to move to v2.0 becuase there are so many useful features there.
Apr 22, 2009 at 10:52 AM
Edited Apr 22, 2009 at 10:53 AM
Hi k_a_bahar, not sure abiout the details of your issue here, but I thought I should mention that the shapefile provider as is, is not a good choice of provider for the web. The ShapeFile provider locks access to the shapefile but due to the tiling and nature of the webserver many processes and handler instances will be attempting to use the same shapefile. This may be your issue or maybe not. Also the web handlers are subject to a myriad of unpleasant GDI+ errors. These are being tackled but the solution is not there yet.. hth jd