Hi,
I'm using a standard ASP.NET MultiView control with different ThinkGeo map controls present inside their own View container. Having just upgraded to 4.0 I'm now getting a JavaScript error that's preventing any of the maps from initialising properly.
The problem seems to be some JavaScript that's referencing a map control that isn't inside the current view and therefore doesn't exist at that point in time. For example, if there are two map controls "thinkGeoMapControl1" and "thinkGeoMapControl2" inside different views, the following code is rendered whenever one of those views is active.
WebForm_InitCallback();Sys.Application.remove_load(CreateMapctl00_cph_thinkGeoMapControl1);
Sys.Application.remove_load(CreateMapctl00_cph_thinkGeoMapControl2);
The problem is that if the view containing thinkGeoMapControl1 is currently active, thinkGeoMapControl2 doesn't exist so the initialisation call fails and the rest of the JavaScript block doesn't execute.
As this is all automatically generated script I can't see a way to work around it without a change in Map Suite to check whether a map is actually visible when iterating through all the controls on the page?
Best regards,
Gary