[mapguide-users] Implement redling with an always on top window
Nick Sebastyan
nick_sebastyan at yahoo.com
Fri Sep 18 09:17:02 EDT 2009
Thank you sooooooo much Kenneth Skovhede, you are a genius.
I succeeded to implement your idea and it worked perfectly.
I sometimes wonder "why didn't I think of that ?" :))
________________________________
From: "Kenneth Skovhede, GEOGRAF A/S" <ks at geograf.dk>
To: MapGuide Users Mail List <mapguide-users at lists.osgeo.org>
Sent: Friday, September 18, 2009 1:09:25 PM
Subject: Re: [mapguide-users] Implement redling with an always on top window
I'm pretty sure you can't do that, as it would be really annoying and a potential security risk
if arbitrary webpages could do that.
Instead, in the outer most page, include the viewer as an iframe:
<html>
<body>
<iframe src="......ajaxviewer/?....params..." style="... location, size, etc ...."></iframe>
<iframe src="your-tool-window.html" style=".... same ..."></iframe>
</body>
</html>
You should now be able to place the second iframe on top of the first one (z-index).
There are many JS snippets that allow you to drag an iframe around,
so you can just make the iframe look like a window.
That way, you can mimic an "always-on-top" window, but it stays within the page, so the browser
does not mind.
Regards, Kenneth Skovhede, GEOGRAF A/S
Nick Sebastyan skrev:
Greetings all,
>
>I have a question that is a little off topic but it implies mapguide at a certain level so i will give it a shot.
>
>I have to implement some redlining functionality on mapguide that will reside in a popup window because there are to much options and will not be very user friendly if i will put all this commands in the toolbar, context menu, taskpane etc.
>For example you have options to create, save as xml , rename, load, select, modify temporary layers, draw lines, polygons, insert text, insert symbols from the resource repository, etc.
>
>The idea is that the window that provide all this functionality will have to be an ALWAYS ON TOP window because it will be very annoying if the window keep losing focus when you start to draw something on the map. I have found some methods but they do not help because they give constant focus only to a window and it will not be possible to select what to draw and draw it this way ( an example will be window.showModalDialog('url', 'args')).
>
>So the question is does somebody know how you can truly make an "always on top window" or have other ideas ?
>
>Thanks.
>
>
________________________________
>_______________________________________________
>mapguide-users mailing list
>mapguide-users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090918/d844bc16/attachment.html
More information about the mapguide-users
mailing list