[mapguide-users] Map fails to initialize about 25% of the time
Zac Spitzer
zac.spitzer at gmail.com
Wed Oct 26 21:26:36 EDT 2011
using firebug, do you see any javascript errors in the console tab or
red request errors in the net tab?
On Thu, Oct 27, 2011 at 10:18 AM, tmblackflag <steve.calpoly at gmail.com> wrote:
> Hello,
>
> Using MGE 2012 w/ Studio, ASP.NET C#.
>
> About 25% of the time the map frame loads but the map itself fails to
> initialize. I've checked my ACCESS logs and every time, including load
> failures i can see the server successfully getting the maps and all feature
> sources. The developer guide mentions an issue with users clicking on the
> task frame before map initializes but that doesn't seem to apply here. Here
> is the page which loads connects to the server, loads the web layout and
> dynamically changes the map, then updates some HTML on the client side to
> render the map. (I've cut code out but i do this to create multiple map
> frames for same-time use. For these testing purposes i only ever use one
> frame).
>
> Any ideas?
>
> public partial class mainFrame : System.Web.UI.Page
> {
> public string count;
> public string floor1;
> public string sessionId;
> static string s_basePath;
> public string defaultUser = "Administrator";
> public string defaultPassword = "admin";
> public string webLayout = "Library://Layouts/Web Layout.WebLayout";
>
> protected void Page_Load(object sender, EventArgs e)
> {
> count = Request.QueryString["COUNT"];
> floor1 = Request.QueryString["FLOOR1"];
>
> InitializeWebTier();
> MgUserInformation userInfo = new MgUserInformation(defaultUser,
> defaultPassword);
> MgSiteConnection siteConnection = new MgSiteConnection();
> siteConnection.Open(userInfo);
> MgSite site = siteConnection.GetSite();
> sessionId = site.CreateSession();
>
> MgResourceService resourceService =
> siteConnection.CreateService(MgServiceType.ResourceService) as
> MgResourceService;
> MgByteReader rd = resourceService.GetResourceContent(new
> MgResourceIdentifier("Library://LAYOUTS/Web Layout.WebLayout"));
> XmlDocument doc = new XmlDocument();
> doc.PreserveWhitespace = true;
> doc.LoadXml(rd.ToString());
> doc.GetElementsByTagName("ResourceId").Item(0).InnerText =
> "Library://MAPS/Map.MapDefinition";
> MgResourceIdentifier newLayout = new MgResourceIdentifier("Session:"
> + sessionId + "//basic.WebLayout");
> resourceService.SetResource(newLayout, new
> MgByteReader(doc.OuterXml, "text/xml"), null);
>
> frameset.InnerHtml = "<frame id=\"frame1\"
> name=\"frame1\"
> src=\"../mapviewernet/ajaxviewer.aspx?SESSION=" + sessionId +
> "&WEBLAYOUT=Session:" + sessionId +
> "//basic.WebLayout" + "\"" + "
> noresize=\"yes\" scrolling=\"no\"></frame>";
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Map-fails-to-initialize-about-25-of-the-time-tp6934628p6934628.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
More information about the mapguide-users
mailing list