Re: [mapguide-users] Create programmatically a map

2009-03-05 Thread Kenneth Skovhede, GEOGRAF A/S
Have you tried posting the document to the webform? http://localhost/mapguide/mapagent/index.html Regards, Kenneth Skovhede, GEOGRAF A/S sekko970 skrev: Dear all, I just found the cause of my problem. My web-layout xml template is a copy of a new layout XML structure created from MGMaestro:

Re: [mapguide-users] Create programmatically a map

2009-03-05 Thread sekko970
This is the result of posting: ?xml version=1.0 encoding=UTF-8 ? - ResourceList xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:noNamespaceSchemaLocation=ResourceList-1.0.0.xsd - ResourceDocument ResourceIdLibrary://MyApp/AppLayouts/MyLayout.WebLayout/ResourceId Depth3/Depth

Re: [mapguide-users] Create programmatically a map

2009-03-05 Thread sekko970
Hi Kenneth, I solved the problem. I write you the solution, in the hope that it can be useful. The error is generated because in my XML template were missing the nodes PrintLayout ResourceId/ResourceId /PrintLayout as childs of Command xsi:type=PrintCommandType node, even if these nodes

Re: [mapguide-users] Create programmatically a map

2009-03-05 Thread Kenneth Skovhede, GEOGRAF A/S
The output shown seems to be from EnumerateResources. There is no output from posting the Xml in the SetResource call, except perhaps an error message. I would like you to try posting the document using SetResource, and report the results. Regards, Kenneth Skovhede, GEOGRAF A/S sekko970

Re: [mapguide-users] Create programmatically a map

2009-03-04 Thread sekko970
Dear all, I just found the cause of my problem. My web-layout xml template is a copy of a new layout XML structure created from MGMaestro: ?xml version=1.0 encoding=utf-8? WebLayout xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema;

Re: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
Hi Kenneth, I need again your help about my problem. I think the problem is that after new map run-time creation in library repository, I cannot use its map definition to create its web layout. How can I assign the new map to the layout? Thanks again, Fabio

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread Ivan Milicevic
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 9:57 AM To: mapguide-users@lists.osgeo.org Subject: Re: [mapguide-users] Create programmatically a map Hi Kenneth, I need again your help about my problem. I think the problem is that after new map run

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 9:57 AM To: mapguide-users@lists.osgeo.org Subject: Re: [mapguide-users] Create programmatically a map Hi Kenneth, I need again your help about my problem. I think the problem

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread Ivan Milicevic
...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 9:57 AM To: mapguide-users@lists.osgeo.org Subject: Re: [mapguide-users] Create programmatically a map Hi Kenneth, I need again your help about my problem. I think

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread Ivan Milicevic
AM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map Hi Ivan, below, you can see my code to create the new map: Dim resID As New MgResourceIdentifier(Library://.../maps/MyMap.MapDefinition) Dim enc As New System.Text.UTF8Encoding(False) Dim

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
Sent: Wednesday, February 18, 2009 11:42 AM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map Hi Ivan, below, you can see my code to create the new map: Dim resID As New MgResourceIdentifier(Library://.../maps/MyMap.MapDefinition) Dim enc

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread Ivan Milicevic
Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 12:05 PM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map This is my problem: I have created

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
-users-boun...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 11:42 AM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map Hi Ivan, below, you can see my code to create the new map: Dim resID As New

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread Ivan Milicevic
To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map Below you can see the new map and layout XML created from http://localhost/mapguide/mapagent/index.html before and after the saving from Maestro (is equals for both). ?xml version=1.0 encoding=UTF-8

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
: RE: [mapguide-users] Create programmatically a map Below you can see the new map and layout XML created from http://localhost/mapguide/mapagent/index.html before and after the saving from Maestro (is equals for both). ?xml version=1.0 encoding=UTF-8 ? - ResourceList xmlns:xsi=http

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 2:01 PM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map Sure, this is the related record

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread Ivan Milicevic
-Original Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 2:01 PM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map Sure

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread Ivan Milicevic
...@lists.osgeo.org] On Behalf Of sekko970 Sent: Wednesday, February 18, 2009 3:28 PM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map I'm sorry Ivan, is a copy/paste error! Ivan Milicevic wrote: Is it double r in resID copy/paste error? -Original Message

Re: [mapguide-users] Create programmatically a map

2009-02-18 Thread Kenneth Skovhede, GEOGRAF A/S
Just to be sure... The xml you posted is the ResourceHeader, and not the ResourceContent, so it does not really show what the problem may be. The error from the log states that the runtime map is not created, which is strange because a WebLayout cannot reference a runtime map. The other error

RE: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
Of sekko970 Sent: Wednesday, February 18, 2009 3:20 PM To: mapguide-users@lists.osgeo.org Subject: RE: [mapguide-users] Create programmatically a map Each try is failed for the following error: 'Invalid resource type'. Dim resID As New MgResourceIdentifier(Librarry://.../ MyLayout

Re: [mapguide-users] Create programmatically a map

2009-02-18 Thread sekko970
The file is 21K. I tryed also to load it directly from Maestro, and I have had no problem. -- Kenneth Skovhede, GEOGRAF A/S wrote: Just to be sure... The xml you posted is the

Re: [mapguide-users] Create programmatically a map

2009-02-18 Thread Kenneth Skovhede, GEOGRAF A/S
There are/were problems reading data using the MgByteReader, as it would not return more than 8K. You are using the native API, which, IMO, has some quirks. Maestro uses the http interface to store the file, so that is equivalent to posting using the webform. Regards, Kenneth Skovhede,

Re: [mapguide-users] Create programmatically a map

2009-02-13 Thread Kenneth Skovhede, GEOGRAF A/S
Does the OuterXml property contain the ? version=1.0 encoding=utf-8 standalone=true ? line? Regards, Kenneth Skovhede, GEOGRAF A/S sekko970 skrev: Hi Kenneth, and thanks for your promptly reply. I had used an ancoding instance. Below, you can see my code to create the new map: Dim resID

Re: [mapguide-users] Create programmatically a map

2009-02-13 Thread sekko970
Yes, the OuterXml property contains the XML header line. Fabio -- Kenneth Skovhede, GEOGRAF A/S wrote: Does the OuterXml property contain the ? version=1.0 encoding=utf-8 standalone=true ?

Re: [mapguide-users] Create programmatically a map

2009-02-13 Thread Kenneth Skovhede, GEOGRAF A/S
Try to look at the Maestro code: http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs#L182 Hopefully you will find a small difference there. Regards, Kenneth Skovhede, GEOGRAF A/S sekko970 skrev: Yes, the OuterXml property contains the XML header

Re: [mapguide-users] Create programmatically a map

2009-02-12 Thread Kenneth Skovhede, GEOGRAF A/S
You could have the problem that .Net emits an utf-8 byte-order-marker (BOM), when writing xml. http://en.wikipedia.org/wiki/Byte-order_mark To counter this, explicitly create an encoding instance: System.Text.Encoding enc = new System.Text.UTF8Encoding(false); Then implement a xml writer, or