ThinkGeo.com    |     Documentation    |     Premium Support

Error With Latest Beta

I just downloaded and installed the latest beta, and reset the references in my small test project. When I run the project I get a blank map with a javasript error on the page that claims "MultipleMapList" is undefined. Please advise whether I've misconfigured the new beta.


Thanks,


Bob Mc.



Bob, 
  
 If you create a new project with a simple map on it do you get the same error?  Do the samples run on your machine?  I will see what the MultipleMapList is all about. 
  
 David

David,


I created a brand new web site, all default parameters. Added a map control to the page. Checked the bin folder, the MapSuiteCode.dll and WebEdition.dll assemblies are both 3.0.2.0. The NetTopologySuite.dll assembly is version is 1.7.1.27811. I copied the AddLayersForSimpleRenderUSA method from your samples to a new class in the App_Code folder and added the following code to the Page_Load event of the Default.aspx code-behind file:


        If Not IsPostBack() Then

            Map1.MapUnit = GeographyUnit.DecimalDegree

            MapHelpers.AddLayersForSimpleRenderUSA(Map1)

            Map1.PanZoomBar.Enabled = True

            Map1.LayerSwitcher.Enabled = True

            Map1.MousePosition.Enabled = True

            Map1.BackgroundMap.GoogleMap.GoogleMapType = GoogleMapType.Normal

            Map1.BackgroundMap.GoogleMap.Name = "Google Map Layer"

            Map1.CurrentExtent = New RectangleShape(-94.64456, 39.13578, -94.4674, 39.03605)

        End If

 


That's the extent of what I did to this project. When I run it I get a blank, blue map window that has no navigation controls. I cannot drag or otherwise interact with the map. There is a javascript error icon on the browser (IE7) that, when clicked, displays:


Line: 74

Char: 14

Error: 'MultipleMapList' is undefined

Code: 0

URL: localhost/4263/WebSite2/Default.aspx


The "Previous" button is enabled in the javascript error window. When clicked it displays the following error:


Line: 72

Char: 1

Error: 'JsonParser' is undefined

Code: 0

URL: localhost/4263/WebSite2/Default.aspx

 


Thanks for your help,


Bob Mc.



Bob, 



I spoke with the developers and they changed the HTTP Handler logic.  Under many circumstances we will automatically add the HTTP Handler for you however we did then when you are were in design view.  If you are in source view then it will never happen.  This opens up a big hole for people who don’t like design view or for people who simply upgraded their projects.  Below is the new HTTP Handler and you should add it in httpHandlers section.  If you see a MapResource handler in there you can remove it as it was the old one.  In discussing this problem we found a way to always register the HTTP handler from code so in the next beta this problem will go away.  Thanks for reporting this and being patient with us. 



< add type="ThinkGeo.MapSuite.WebEdition.GeoResourceFactory" verb="*" path="*_GeoResource.axd"></ add> 



David



David,


You are correct, I dropped the map controls on the Web Form in source mode, not design mode. I tend to do more work with the underlying source so my VS environment defaults to source mode when I open a form. When I switched to design mode and added the map control the HTTP handler was added to the web.config file. My apologies for not noticing its absence, since I was aware that there is a handler for MapResource.axd.


Thanks also for adding a fix to the next beta. I can deal with the design mode workaround until then.


Bob Mc.


 



Bob, 
  
 You are much to gracious.  My response when I found out it was only adding it in design mode was “What the heck were you guys thinking?”.  I never use design mode myself as Visual Studio has a long history of “fixing” the html I write.  I know that the last two version you can turn off their ”helpers” but  its going to take a few more versions for it to regain my trust. 
  
 David