Thanks for the responses.!
Darrin, that was the jump off I needed. We were having issues with cross site scripting problems. Having the web extensions installed on dev machines, and using local IIS debugging in visual studio, so far, is solving most of our issues. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Darrin Maidlow Sent: Wednesday, September 24, 2008 5:46 PM To: 'MapGuide Users Mail List' Cc: Sinelnikov, Andrei Subject: RE: [mapguide-users] Mapguide Integration Hi Jamie, I believe I have done something similar to what you're wanting to do. My application has a header containing extensive amounts of application logic which can interact with the mapguide viewer, and server API as needed. Here is some javascript that should return what you're looking for. return document.getElementById("iFrameID").contentWindow.GetMapFrame(); Now depending on where the iframe is located it can get a bit more tricky. Putting an iframe within a user control, or another .net container (master controls, placeholders, panels etc) will prefix the ID of the iframe with stuff in the rendered HTML. For example a user control called MyControl that contains an iframe with an ID of MyIframe would render out as MyControl_MyIframe. To work around this, you need to setup the iframe with a runat="server" tag, and spit out a global javascript variable that contains MyIframe.ClientID from the codebehind. The updated javascript would look more like: return document.getElementById(globalVarWithClientID).contentWindow.GetMapFrame (); Also - remember that the Mapguide web tier will need to be installed on local development machines, and the server will need to be referenced through the local web tier to prevent cross site scripting problems. Hope that helps. darrin From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Greenhough, Jamie Sent: Wednesday, September 24, 2008 12:57 PM To: [email protected] Cc: Sinelnikov, Andrei Subject: [mapguide-users] Mapguide Integration Hello, I hopefully someone can help me out... I have been struggling to integrate MapGuide into a custom .NET web based application we are developing. I setup MapGuide on an external server, the dotnetsamples run great and the MapGuide server appears to be working ok. Great. All of the dev examples reference the dotnetviewer relatively (../mapguide/mapviewernet), I am referencing via http://mapguideserver/mapguide/mapviewernet. We are using MapGuide inside of an iframe. Our application consists of master pages, user controls, and other .net3.5 goodness. The problem I am facing, is that I don't know how to reference the viewerAPI outside of the MapGuide frames. I can use InvokeScript and pass SelectionXML to another page in another frame. But this is not really what we want to do. We want to use code outside of the iframe to manipulate the ViewerAPI and MapGuideAPI inside of the iframe. Does anyone have experience with manipulating MapGuide from outside of an iframe? How about setting up a robust web application with MapGuide in the middle? Thanks for reading, looking for direction, Jamie Greenhough ----Notice Regarding Confidentiality---- This email, including any and all attachments, (this "Email") is intended only for the party to whom it is addressed and may contain information that is confidential or privileged. Sierra Systems Group Inc. and its affiliates accept no responsibility for any loss or damage suffered by any person resulting from any unauthorized use of or reliance upon this Email. If you are not the intended recipient, you are hereby notified that any dissemination, copying or other use of this Email is prohibited. Please notify us of the error in communication by return email and destroy all copies of this Email. Thank you. ----Notice Regarding Confidentiality---- This email, including any and all attachments, (this "Email") is intended only for the party to whom it is addressed and may contain information that is confidential or privileged. Sierra Systems Group Inc. and its affiliates accept no responsibility for any loss or damage suffered by any person resulting from any unauthorized use of or reliance upon this Email. If you are not the intended recipient, you are hereby notified that any dissemination, copying or other use of this Email is prohibited. Please notify us of the error in communication by return email and destroy all copies of this Email. Thank you.
_______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
