[mapguide-users] How to customize "Select cursor" functions in Mapguide Studio 2009

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Fri Jun 13 07:54:58 EDT 2008


So you want to replace the map when a user clicks a point?
In the layout, set the link target to "top" (or optionally the name of 
the frame the map is in).
Then create a tooltip+link on the relevant layer, where the link points 
to the desired url, eg.: 'http://mapguide.osgeo.org'.
Now the user can ctrl+click the link to open the new page, the target 
ensures that the page is opened in the same window.

If you must have it as a tool, you will have to edit some of the viewer 
files.
I think you would start out in the file ajaxmappane.templ.
Beware that this is a bit tricky, because the user may click on a spot 
with no data.
Also, note that the tools and commands have numbers, and there is not a 
1:1 correspondance.

If you don't want other tools avalible, you can get MapGuide to just 
generate a PNG.
In html, you can then use a tag like:
<img src="..." onclick="top.location.href='...';" />

You may get away with hijacking the onclick for the map, rather than go 
trough with building a custom tool.

Regards, Kenneth Skovhede, GEOGRAF A/S



gimbrogno @smartlab skrev:
> Ah ok, but I want to create a web page that when the click in a point on the
> map it opens a new link page in the central frame  (where is the map)...
>
>
>
> Kenneth Skovhede, GEOGRAF A/S wrote:
>   
>> Inside Studio.
>>
>> At the bottom grid ("New Commands"), click "Add"  -> "Invoke URL".
>>
>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>
>>
>>
>> gimbrogno @smartlab skrev:
>>     
>>> Thanks...
>>>
>>> Another question, where I must to create this new function ? In the
>>> mainframe.jsp or where?
>>>
>>> Thanks a lot...
>>>
>>>
>>>
>>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>   
>>>       
>>>> No, not directly.
>>>> You can create a new function that opens a page, and make it look like 
>>>> the "select button" instead.
>>>>
>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>
>>>>
>>>>
>>>> gimbrogno @smartlab skrev:
>>>>     
>>>>         
>>>>> Hi, I have built an example web layout with a map using Mapguide
>>>>> Studio.
>>>>> There is a metod that customize the function of "select button", for
>>>>> example
>>>>> to open a new page?
>>>>>
>>>>> Thanks a lot...
>>>>>   
>>>>>       
>>>>>           
>>>> _______________________________________________
>>>> mapguide-users mailing list
>>>> mapguide-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> _______________________________________________
>> 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/20080613/573292bb/attachment.html


More information about the mapguide-users mailing list