[mapguide-users] How to embed the map in my own web page?

Kenneth, GEOGRAF A/S ks at geograf.dk
Thu Jan 31 13:54:10 EST 2008


This works on my machine, with the Sheboygan data installed:
http://localhost/mapguide/mapviewernet/ajaxviewer.aspx?weblayout=Library://Samples/Sheboygan/Layouts/SheboyganJsp.WebLayout&username=Anonymous&password=

Since you are using Jsp, it should be:
http://localhost/mapguide/mapviewerjava/ajaxviewer.jsp?weblayout=Library://Samples/Sheboygan/Layouts/SheboyganJsp.WebLayout&username=Anonymous&password=

You can paste the url into a browser to test it, before inserting it as 
an embedded map.
If you are using the bundled Apache server, you should use:
http://localhost:8008/mapguide/mapviewerjava/ajaxviewer.jsp?weblayout=Library://Samples/Sheboygan/Layouts/SheboyganJsp.WebLayout&username=Anonymous&password=


Regards, Kenneth, GEOGRAF A/S



dorra2007 skrev:
> That is what I have done.
> And I have always invalid repositorty type.
>
>
>
> Kenneth, GEOGRAF A/S wrote:
>   
>> You can only display WebLayouts with the viewer.
>> You must also enter the full path to the weblayout:
>>
>> Library://mylayout.WebLayout
>>
>>
>> Regards, Kenneth, GEOGRAF A/S
>>
>>
>> dorra2007 skrev:
>>     
>>> i have an error message: Invalid repository type.
>>> Whereas the map is displayed in mapguide studio.
>>>
>>> NB: I use postgis as data source.
>>>
>>>
>>>
>>> Kenneth, GEOGRAF A/S wrote:
>>>   
>>>       
>>>> Yes, the mapviewerajax should be configured with the correct default
>>>> page.
>>>> If you use the "mapviewerjava", you must add ajaxviewer.jsp page name.
>>>> The full url becomes:
>>>>
>>>> /mapguide/mapviewerjava/ajaxviewer.jsp?weblayout=Library://mylayout.WebLayout&username=Anonymous&password=
>>>>
>>>>
>>>>
>>>> Regards, Kenneth, GEOGRAF A/S
>>>>
>>>>
>>>>
>>>> dorra2007 skrev:
>>>>     
>>>>         
>>>>>   Thank you Kenneth for the code segment; 
>>>>> But there is no folder named mapviewerajax; so I have changed it to
>>>>> mapviewerjava. I have tried it and the result is the title (This is my
>>>>> webpage with an embedded map!)+ blank: the map isnot displayed (instead
>>>>> of
>>>>> the map lays a blank square.)
>>>>> Have you an idea about what the problem can be?
>>>>>
>>>>>
>>>>> Kenneth, GEOGRAF A/S wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> Yes, it is possible.
>>>>>>
>>>>>> My favorite  method is to embed the Map in an Iframe:
>>>>>> <html>
>>>>>> <body>
>>>>>> <h1>This is my webpage with an embedded map!</h1>
>>>>>> <iframe 
>>>>>> src="/mapguide/mapviewerajax/?weblayout=Library://mylayout.WebLayout&username=Anonymous&password=" 
>>>>>> width="100%" height="100%"></iframe>
>>>>>> </body>
>>>>>> </html>
>>>>>>
>>>>>> By adding commands, do you mean from code?
>>>>>> What sort of commands do you want to add, and why is Studio not an
>>>>>> option?
>>>>>>
>>>>>> Regards, Kenneth, GEOGRAF A/S
>>>>>>
>>>>>>
>>>>>>
>>>>>> dorra2007 skrev:
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>>> Hello all;
>>>>>>> I have one precise question: Is it possible to display the mapguide
>>>>>>> map
>>>>>>> in
>>>>>>> my own web page?
>>>>>>>
>>>>>>> If yes; what should I do? And how could I add commands without using
>>>>>>> mapguide studio?
>>>>>>>
>>>>>>> Thank you in advance.
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>               
>>>>>> _______________________________________________
>>>>>> 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
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> _______________________________________________
>> 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/20080131/18ca6e20/attachment.html


More information about the mapguide-users mailing list