ThinkGeo.com    |     Documentation    |     Premium Support

New Beta 2 Doesn't seem to throw exceptions and Zoom Bar Graphics don't load

 


Hi,
Today I tried out the new beta 2 and started to develop a new application from scratch.  I created a new web project and referenced the new DLL and dragged a map onto the page without any issues.
 
However when I ran the application all I got was Pink X's and none of the Zoom Bar graphics filled in properly.  I thought maybe there was an exception that wasn't getting raised which was causing the map to terminate its rendering.  However no exception messages were displayed.  In order to try and force and exception I changed the path of my shapefile to an invalid path and to my surprise still no exception was thrown and the map was still blank with Pink X's.
 
Shouldn't the map control throw an exception if the wrong path to the shapefile is passed in?   Would this also cause the zoom bar graphics to not load properly?   They work fine on the How Do I samples.  At this point I'm not sure what to try to fix my small sample app if I'm not getting any exceptions raised up telling me what is wrong.
 
The code to my example is shown below:
 
    protected void Page_Load(object sender, EventArgs e)

    {

        if (!Page.IsPostBack)

        {

            Map1.MapUnit = GeographyUnit.Meter;

            

            GdiPlusRasterLayer siteLayout = new GdiPlusRasterLayer("SiteExample1.jpg");

            siteLayout.UpperThreshold = double.MaxValue;

            siteLayout.LowerThreshold = 0;

            Map1.StaticOverlay.Layers.Add(siteLayout);

            Map1.CurrentExtent = new RectangleShape(0, 100, 100, 0);

        }


    }
Thanks!

Clint,


This is a bug that the theme pics are lost when creating a new Web Site instead of a new Web Project.  We have solved this and will release a new evaluation today (3.2.117).


Also we did some changes in today's release to expose the exception messages out to make it easier for developers to debug. The exception messages will be written on map like following.





Thank very much for pointing those out and please have another try later with the latest build.


Also after reading the code you provided, I wonder if your map unit is set correctly. You set the MapUnit to Meter but the CurrentExtent you set is not like based on Meters. As I didn't see the world file I have no idea what projection the jpg file is in, just think maybe here are some potential problems.


Thanks again, any more queries just let us know.


Ben.