[mapguide-users] URL Activated for Feature - New Window and Task Pane?

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Sat Jan 9 03:22:22 EST 2010


The answers is no, you can't. You cannot supply a target on each layer,
so there is no way to determine which layers should open in another window.

I have used a workaround, that consist of always opening in a hidden frame.
I then use links of the form:
javascript:window.open("url");
or
javascript:parent.frames['framename'].location.href = "url"

The upside to this method, is that you can activate any javascript 
function with a link.
The downside is that most browsers use popup blockers, making the call 
to window.open
fail. (But I think the viewer has this problem already?)

If you use this method, make sure that the hidden frame gets loaded with 
an empty page
from the server, otherwise you get all sorts of crossdomain problems.

Another (more messy) way would be to modify the viewer link activation 
function,
and have that one determine the action, based on a hardcoded list of layers.

Regards, Kenneth Skovhede, GEOGRAF A/S


On 08-01-2010 16:07, Nickthetemp wrote:
>
> I should Mention that I am using Mapguide Enterprise 2010 and Mapguide
> Studio 2010.
>
> Thanks
>    


More information about the mapguide-users mailing list