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:

?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;
xsi:noNamespaceSchemaLocation=WebLayout-1.0.0.xsd
TitleMyMapTitle/Title
Map
ResourceIdMyMap.MapDefinition/ResourceId
HyperlinkTargetTaskPane/HyperlinkTarget
/Map
ToolBar
Visibletrue/Visible
Button xsi:type=CommandItemType
FunctionCommand/Function
CommandPrint/Command
/Button
  .
/ToolBar
InformationPane
Visibletrue/Visible
Width200/Width
LegendVisibletrue/LegendVisible
PropertiesVisibletrue/PropertiesVisible
/InformationPane
ContextMenu
Visibletrue/Visible
MenuItem xsi:type=CommandItemType
FunctionCommand/Function
CommandSelect/Command
/MenuItem
 .
/ContextMenu
TaskPane
Visibletrue/Visible
Width280/Width
TaskBar
Visibletrue/Visible
Home
NameHome/Name
TooltipReturn to home task page/Tooltip
DescriptionReturn to home task 
page/Description
ImageURL../stdicons/icon_home.gif/ImageURL

DisabledImageURL../stdicons/icon_home_disabled.gif/DisabledImageURL
/Home
Forward
NameForward/Name
TooltipForward to next task page/Tooltip
DescriptionForward to next task 
page/Description

ImageURL../stdicons/icon_forward.gif/ImageURL

DisabledImageURL../stdicons/icon_forward_disabled.gif/DisabledImageURL
/Forward
Back
NameBack/Name
TooltipReturn to previous task page/Tooltip
DescriptionReturn to previous task 
page/Description
ImageURL../stdicons/icon_back.gif/ImageURL

DisabledImageURL../stdicons/icon_back_disabled.gif/DisabledImageURL
/Back
Tasks
NameTasks/Name
TooltipTask list/Tooltip
DescriptionView a list of available 
tasks/Description
ImageURL../stdicons/icon_tasks.gif/ImageURL

DisabledImageURL../stdicons/icon_tasks_disabled.gif/DisabledImageURL
/Tasks
MenuButton xsi:type=CommandItemType
FunctionCommand/Function
CommandMeasure/Command
/MenuButton
  .
/TaskBar
/TaskPane
StatusBar
Visibletrue/Visible
/StatusBar
ZoomControl
Visibletrue/Visible
/ZoomControl
CommandSet
Command xsi:type=BasicCommandType
NamePan/Name
LabelPan/Label
TooltipPan mode/Tooltip
DescriptionDrag the map to view areas out of 
range/Description
ImageURL../stdicons/icon_pan.gif/ImageURL

DisabledImageURL../stdicons/icon_pan_disabled.gif/DisabledImageURL
TargetViewerAll/TargetViewer
ActionPan/Action
/Command
  .
/CommandSet
/WebLayout


If the XML layout definition contains a button node chilld of toolbar
node, or a MenuItem node chilld of ContextMenu node, or a MenuButton
chilld of TaskPaneTaskBar node, or a Command node chilld of
CommandSet node, it is generated the following error:

The type 'OSGeo.MapGuide.MgNullArgumentException' nell'assembly
'MapGuideDotNetApi, Version = 2.0.2.3011, Culture = neutral, PublicKeyToken
= null' is not marked as serializable.


How can I fix it?
Thanks in advance.
Fabio



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 
  OwnerAdministrator/Owner 
  CreatedDate2009-03-04T15:50:26Z/CreatedDate 
  ModifiedDate2009-03-04T17:02:27Z/ModifiedDate 
- ResourceDocumentHeader
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:noNamespaceSchemaLocation=ResourceDocumentHeader-1.0.0.xsd
- Security xsi:noNamespaceSchemaLocation=ResourceSecurity-1.0.0.xsd
  Inheritedtrue/Inherited 
- Groups
- Group
  NameEveryone/Name 
  Permissionsr,w/Permissions 
  /Group
  /Groups
  /Security
  /ResourceDocumentHeader
  /ResourceDocument
  /ResourceList

I also found that the error is originated if the XML has nodes like
FunctionCommand/Function; if the XML has nodes like
FunctionSeparator/Function, there aren't errors.


Fabio

--


Kenneth Skovhede, GEOGRAF A/S wrote:
 
 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:

 ?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;
 xsi:noNamespaceSchemaLocation=WebLayout-1.0.0.xsd
  TitleMyMapTitle/Title
  Map
  ResourceIdMyMap.MapDefinition/ResourceId
  HyperlinkTargetTaskPane/HyperlinkTarget
  /Map
  ToolBar
  Visibletrue/Visible
  Button xsi:type=CommandItemType
  FunctionCommand/Function
  CommandPrint/Command
  /Button
   .
  /ToolBar
  InformationPane
  Visibletrue/Visible
  Width200/Width
  LegendVisibletrue/LegendVisible
  PropertiesVisibletrue/PropertiesVisible
  /InformationPane
  ContextMenu
  Visibletrue/Visible
  MenuItem xsi:type=CommandItemType
  FunctionCommand/Function
  CommandSelect/Command
  /MenuItem
  .
  /ContextMenu
  TaskPane
  Visibletrue/Visible
  Width280/Width
  TaskBar
  Visibletrue/Visible
  Home
  NameHome/Name
  TooltipReturn to home task page/Tooltip
  DescriptionReturn to home task 
 page/Description
  ImageURL../stdicons/icon_home.gif/ImageURL
  
 DisabledImageURL../stdicons/icon_home_disabled.gif/DisabledImageURL
  /Home
  Forward
  NameForward/Name
  TooltipForward to next task page/Tooltip
  DescriptionForward to next task 
 page/Description
  
 ImageURL../stdicons/icon_forward.gif/ImageURL
  
 DisabledImageURL../stdicons/icon_forward_disabled.gif/DisabledImageURL
  /Forward
  Back
  NameBack/Name
  TooltipReturn to previous task page/Tooltip
  DescriptionReturn to previous task 
 page/Description
  ImageURL../stdicons/icon_back.gif/ImageURL
  
 DisabledImageURL../stdicons/icon_back_disabled.gif/DisabledImageURL
  /Back
  Tasks
  NameTasks/Name
  TooltipTask list/Tooltip
  DescriptionView a list of available 
 tasks/Description
  ImageURL../stdicons/icon_tasks.gif/ImageURL
  
 DisabledImageURL../stdicons/icon_tasks_disabled.gif/DisabledImageURL
  /Tasks
  MenuButton xsi:type=CommandItemType
  FunctionCommand/Function
  CommandMeasure/Command
  /MenuButton
   .
  /TaskBar
  /TaskPane
  StatusBar
  Visibletrue/Visible
  /StatusBar
  ZoomControl
  Visibletrue/Visible
  /ZoomControl
  CommandSet
  Command xsi:type=BasicCommandType
  NamePan/Name
  LabelPan/Label
  TooltipPan mode/Tooltip
  

RE: [mapguide-users] Regarding - Set Feature Label at Run Time

2009-03-05 Thread ravinder.singh
Hi,

 

I have tried it and written the following code. It works if I
check(select) the Display feature Labels in Label Style Dialog Box(in
maestro) and even don't set any property, but It does not work if I
don't check the Display feature Labels. 

 

Means if there is text None  set in Label Style  in Area Style then it
does not work , otherwise it works by simply checking the Display
feature Labels in Label Style Dialog Box.

 

That's why in your example code, this code if (ar.Label != null) is
written.

 

But my problem is that I do have Only Area style defined in maestro ,
but I have not defined any property as feature label. So I don't want to
check the  Display feature Labels checkbox, To Generate the dynamic
label I tried to write my commented line of code (c#), but does not
work.

 

Please If can be done ?

 

  foreach (VectorScaleRangeType vsr in
vectorLayerDefinition1.VectorScaleRange)

{

foreach (object o in vsr.Items)

{

if (o is AreaTypeStyleType)

{

AreaTypeStyleType ast = o as AreaTypeStyleType;

if (ast.AreaRule != null)

{

foreach (AreaRuleType ar in ast.AreaRule)

{

  //Code to Create the label at run
time

   //

//TextSymbolType txtSymb = new
TextSymbolType();

//txtSymb.Text = MY_PROPERTY_NAME;

//ar.Label = txtSymb;

  //   

if (ar.Label != null)

{

ar.Label.Text = MY_PROPERTY_NAME ;

}

}

}

}

}

}

 

Thanks  Regards,

Ravinder



From: mapguide-users-boun...@lists.osgeo.org
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Kenneth
Skovhede, GEOGRAF A/S
Sent: Thursday, March 05, 2009 1:12 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] Regarding - Set Feature Label at Run Time

 

That is a bit difficult for two reasons.
1) The MapGuide style model is fairly large, so there are many subitems
to examine
2) The styles for Point, Line and Area don't share the same properties,
so they must be handled individually.

I have put up an example on how to do this here:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/IterateLa
yerRules




Regards, Kenneth Skovhede, GEOGRAF A/S



ravinder.si...@birlasoft.com skrev: 

Hi All,

 

I have to set a property as Feature Label for a layer at run time. I got
some hints and tried with VectorLayerDefinitionType and
TextSymbolType.But not able to do so as I don't know the exact
procedure.

 

I am using maestro api for creating run time map.

 

Please assist...

 

I am using c#, asp.net.

 

 

Thanks  Regards,

Ravinder

 



*%CRLF%This message and any attachments are solely
for the intended recipient and may contain Birlasoft confidential or
privileged information. If you are not the intended recipient,any
disclosure,copying, use, or distribution of the information included in
this message and any attachments is %CRLF%prohibited. If you have
received this communication in error, please notify us by reply e-mail
at (administra...@birlasoft.com) and permanently delete this message and
any attachments. Thank
you.%CRLF%*

%CRLF%
 







 
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  

*%CRLF%This
 message and any attachments are solely for the intended recipient and may 
contain Birlasoft confidential or privileged information. If you are not the 
intended recipient,any disclosure,copying, use, or distribution of the 
information included in this message and any attachments is %CRLF%prohibited. 
If you have received this communication in error, please notify us by reply 
e-mail at (administra...@birlasoft.com) and permanently delete this message and 
any attachments. Thank 

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
are not generated from MGMaestro saving a new WebLayout as XML, and the
PrintLayout element is descripted as optional (minOccurs=0) in
WebLayout-1.0.0.xsd schema file.


Thanks for your help.
Fabio

--


sekko970 wrote:
 
 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 
   OwnerAdministrator/Owner 
   CreatedDate2009-03-04T15:50:26Z/CreatedDate 
   ModifiedDate2009-03-04T17:02:27Z/ModifiedDate 
 - ResourceDocumentHeader
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:noNamespaceSchemaLocation=ResourceDocumentHeader-1.0.0.xsd
 - Security xsi:noNamespaceSchemaLocation=ResourceSecurity-1.0.0.xsd
   Inheritedtrue/Inherited 
 - Groups
 - Group
   NameEveryone/Name 
   Permissionsr,w/Permissions 
   /Group
   /Groups
   /Security
   /ResourceDocumentHeader
   /ResourceDocument
   /ResourceList
 
 I also found that the error is originated if the XML has nodes like
 FunctionCommand/Function; if the XML has nodes like
 FunctionSeparator/Function, there aren't errors.
 
 
 Fabio
 
 --
 
 
 Kenneth Skovhede, GEOGRAF A/S wrote:
 
 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:

 ?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;
 xsi:noNamespaceSchemaLocation=WebLayout-1.0.0.xsd
 TitleMyMapTitle/Title
 Map
 ResourceIdMyMap.MapDefinition/ResourceId
 HyperlinkTargetTaskPane/HyperlinkTarget
 /Map
 ToolBar
 Visibletrue/Visible
 Button xsi:type=CommandItemType
 FunctionCommand/Function
 CommandPrint/Command
 /Button
   .
 /ToolBar
 InformationPane
 Visibletrue/Visible
 Width200/Width
 LegendVisibletrue/LegendVisible
 PropertiesVisibletrue/PropertiesVisible
 /InformationPane
 ContextMenu
 Visibletrue/Visible
 MenuItem xsi:type=CommandItemType
 FunctionCommand/Function
 CommandSelect/Command
 /MenuItem
  .
 /ContextMenu
 TaskPane
 Visibletrue/Visible
 Width280/Width
 TaskBar
 Visibletrue/Visible
 Home
 NameHome/Name
 TooltipReturn to home task page/Tooltip
 DescriptionReturn to home task 
 page/Description
 ImageURL../stdicons/icon_home.gif/ImageURL
 
 DisabledImageURL../stdicons/icon_home_disabled.gif/DisabledImageURL
 /Home
 Forward
 NameForward/Name
 TooltipForward to next task page/Tooltip
 DescriptionForward to next task 
 page/Description
 
 ImageURL../stdicons/icon_forward.gif/ImageURL
 
 DisabledImageURL../stdicons/icon_forward_disabled.gif/DisabledImageURL
 /Forward
 Back
 NameBack/Name
 TooltipReturn to previous task page/Tooltip
 DescriptionReturn to previous task 
 page/Description
 ImageURL../stdicons/icon_back.gif/ImageURL
 
 DisabledImageURL../stdicons/icon_back_disabled.gif/DisabledImageURL
 /Back
 Tasks
 NameTasks/Name
 TooltipTask list/Tooltip
 DescriptionView a list of available 
 tasks/Description
 ImageURL../stdicons/icon_tasks.gif/ImageURL
 
 DisabledImageURL../stdicons/icon_tasks_disabled.gif/DisabledImageURL
 /Tasks
 MenuButton 

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 skrev:

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 
  OwnerAdministrator/Owner 
  CreatedDate2009-03-04T15:50:26Z/CreatedDate 
  ModifiedDate2009-03-04T17:02:27Z/ModifiedDate 
- ResourceDocumentHeader

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:noNamespaceSchemaLocation=ResourceDocumentHeader-1.0.0.xsd
- Security xsi:noNamespaceSchemaLocation=ResourceSecurity-1.0.0.xsd
  Inheritedtrue/Inherited 
- Groups

- Group
  NameEveryone/Name 
  Permissionsr,w/Permissions 
  /Group

  /Groups
  /Security
  /ResourceDocumentHeader
  /ResourceDocument
  /ResourceList

I also found that the error is originated if the XML has nodes like
FunctionCommand/Function; if the XML has nodes like
FunctionSeparator/Function, there aren't errors.


Fabio

--


Kenneth Skovhede, GEOGRAF A/S wrote:
  

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:

?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;
xsi:noNamespaceSchemaLocation=WebLayout-1.0.0.xsd
TitleMyMapTitle/Title
Map
ResourceIdMyMap.MapDefinition/ResourceId
HyperlinkTargetTaskPane/HyperlinkTarget
/Map
ToolBar
Visibletrue/Visible
Button xsi:type=CommandItemType
FunctionCommand/Function
CommandPrint/Command
/Button
  .
/ToolBar
InformationPane
Visibletrue/Visible
Width200/Width
LegendVisibletrue/LegendVisible
PropertiesVisibletrue/PropertiesVisible
/InformationPane
ContextMenu
Visibletrue/Visible
MenuItem xsi:type=CommandItemType
FunctionCommand/Function
CommandSelect/Command
/MenuItem
 .
/ContextMenu
TaskPane
Visibletrue/Visible
Width280/Width
TaskBar
Visibletrue/Visible
Home
NameHome/Name
TooltipReturn to home task page/Tooltip
DescriptionReturn to home task 
page/Description
ImageURL../stdicons/icon_home.gif/ImageURL

DisabledImageURL../stdicons/icon_home_disabled.gif/DisabledImageURL
/Home
Forward
NameForward/Name
TooltipForward to next task page/Tooltip
DescriptionForward to next task 
page/Description

ImageURL../stdicons/icon_forward.gif/ImageURL

DisabledImageURL../stdicons/icon_forward_disabled.gif/DisabledImageURL
/Forward
Back
NameBack/Name
TooltipReturn to previous task page/Tooltip
DescriptionReturn to previous task 
page/Description
ImageURL../stdicons/icon_back.gif/ImageURL

DisabledImageURL../stdicons/icon_back_disabled.gif/DisabledImageURL
/Back
Tasks
NameTasks/Name
TooltipTask list/Tooltip
DescriptionView a list of available 
tasks/Description
ImageURL../stdicons/icon_tasks.gif/ImageURL

DisabledImageURL../stdicons/icon_tasks_disabled.gif/DisabledImageURL
/Tasks
MenuButton xsi:type=CommandItemType
FunctionCommand/Function
CommandMeasure/Command
/MenuButton
  

Re: [mapguide-users] Regarding - Set Feature Label at Run Time

2009-03-05 Thread Kenneth Skovhede, GEOGRAF A/S

Yes, that is how it's supposed to be.
If you want to assign the label style, you must set many of the required 
properties for a

label style object:

ar.Label = new TextSymbolType();
ar.Label.BackgroundColor = System.Drawing.Color.FromArgb(0, 
System.Drawing.Color.White); //Transparent

ar.Label.ForegroundColor = System.Drawing.Color.Black;
ar.Label.Unit = LengthUnitType.Points;
ar.Label.SizeX = 12;
ar.Label.SizeY = 12;
ar.Label.FontName = Arial;

I think those are the required ones, but I have not tested it.

Regards, Kenneth Skovhede, GEOGRAF A/S



ravinder.si...@birlasoft.com skrev:


Hi,

 

I have tried it and written the following code. It works if I 
check(select) the Display feature Labels in Label Style Dialog Box(in 
maestro) and even don’t set any property, but It does not work if I 
don’t check the Display feature Labels.


 

Means if there is text “None”  set in Label Style  in Area Style then 
it does not work , otherwise it works by simply checking the Display 
feature Labels in Label Style Dialog Box.


 

That’s why in your example code, this code “if (ar.Label != null)” is 
written.


 

But my problem is that I do have Only Area style defined in maestro , 
but I have not defined any property as feature label. So I don’t want 
to check the  Display feature Labels checkbox, To Generate the dynamic 
label I tried to write my commented line of code (c#), but does not work.


 


Please If can be done ?

 

  foreach (VectorScaleRangeType vsr in 
vectorLayerDefinition1.VectorScaleRange)


{

foreach (object o in vsr.Items)

{

if (o is AreaTypeStyleType)

{

AreaTypeStyleType ast = o as AreaTypeStyleType;

if (ast.AreaRule != null)

{

foreach (AreaRuleType ar in ast.AreaRule)

{

  //Code to Create the label at 
run time


   //

//TextSymbolType txtSymb = new 
TextSymbolType();


//txtSymb.Text = MY_PROPERTY_NAME;

//ar.Label = txtSymb;   

  //   


if (ar.Label != null)

{

ar.Label.Text = MY_PROPERTY_NAME ;

}

}

}

}

}

}   

 


*Thanks  Regards,*

Ravinder



*From:* mapguide-users-boun...@lists.osgeo.org 
[mailto:mapguide-users-boun...@lists.osgeo.org] *On Behalf Of *Kenneth 
Skovhede, GEOGRAF A/S

*Sent:* Thursday, March 05, 2009 1:12 PM
*To:* MapGuide Users Mail List
*Subject:* Re: [mapguide-users] Regarding - Set Feature Label at Run Time

 


That is a bit difficult for two reasons.
1) The MapGuide style model is fairly large, so there are many 
subitems to examine
2) The styles for Point, Line and Area don't share the same 
properties, so they must be handled individually.


I have put up an example on how to do this here:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/IterateLayerRules


Regards, Kenneth Skovhede, GEOGRAF A/S



ravinder.si...@birlasoft.com mailto:ravinder.si...@birlasoft.com skrev:

Hi All,

 

I have to set a property as Feature Label for a layer at run time. I 
got some hints and tried with VectorLayerDefinitionType and 
TextSymbolType.But not able to do so as I don’t know the exact procedure.


 


I am using maestro api for creating run time map.

 


Please assist…

 


I am using c#, asp.net.

 

 


*Thanks  Regards,*

Ravinder

 


*%CRLF%This
 message and any attachments are solely for the intended recipient and may contain Birlasoft 
confidential or privileged information. If you are not the intended recipient,any 
disclosure,copying, use, or distribution of the information included in this message and any 
attachments is %CRLF%prohibited. If you have received this communication in error, please 
notify us by reply e-mail at (administra...@birlasoft.com 
mailto:administra...@birlasoft.com) and permanently delete this message and any 
attachments. Thank 
you.%CRLF%*%CRLF%

 






 
___

mapguide-users mailing list

[mapguide-users] Connecting to tables in Oracle 9.2 in Mapguide - Problems - not using Oracle Spatial...

2009-03-05 Thread Micallef, Michael (MTO)
I am trying to connect to oracle (9.2) within MapGuide - NOT ORACLE
SPATIAL -  just tables - I want to grab lat/long and attributes from
within the table.

 

No tables are showing up in the connection to oracle though - anyone
come across this...

 

Connection (ODBC) does work in Access as far as linked tables... but
nothing in the Mapguide connection - (tried both the ODBC and Oracle
connection in MapGuide)

 

Any comments would help on this...

 

Mike Micallef

 

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] Defect : Confusion between layer.visible and layer.isDisplayed

2009-03-05 Thread Bruno Scott

Using fiddler i found something interresting in two mapguide ajax functions
  QueryFeatureInfo (when selecting a feature )
and
  RequestHyperLinkData (when mouse over a feature)

These 2 functions calls GetVisSelLayers or GetVisLayers 
then GetLayers(onlyVisible, onlySelectable)
the DoGetLayers

This function returns the list of all either visible and/or selectable
layers
this is the code
function DoGetLayers(nodes, layers, onlyVisible, onlySelectable)
{
for(var i=0; i  nodes.length; i++)
{
var node = nodes[i];
if(node.type == 0)
{
if(onlyVisible  !node.visible)
continue;
if(node.children != null  node.children.length  0)
DoGetLayers(node.children, layers, onlyVisible,
onlySelectable);
}
else if(node.type == 1)
{
if(onlyVisible  !node.visible)
continue;
if(onlySelectable  !node.selectable)
continue;
layers.push(new Layer(node.legend, node.name, node.objectId));
}
}
}
It should be
function DoGetLayers(nodes, layers, onlyVisible, onlySelectable)
{
for(var i=0; i  nodes.length; i++)
{
var node = nodes[i];
if(node.type == 0)
{
if(onlyVisible  !node.isDisplayed)
continue;
if(node.children != null  node.children.length  0)
DoGetLayers(node.children, layers, onlyVisible,
onlySelectable);
}
else if(node.type == 1)
{
if(onlyVisible  !node.isDisplayed)
continue;
if(onlySelectable  !node.selectable)
continue;
layers.push(new Layer(node.legend, node.name, node.objectId));
}
}
}

This little defect does not make a big difference on a map like Sheboygan
But mine is Oracle based and has more than 300 layers.
Most of them are eventually visible at a given (low)scale but not displayed
at all.
When i select a feature or i mouse over it, it query the mapguide server
with hundreds of not displayed layers. You bet, things get very slow.

I've made some search on the ajax viewer code and found that this function
is only called by
  QueryFeatureInfo
  RequestHyperLinkData
  selectwithin

Do you aggree that i fill a ticket and a diff patch?

Bruno Scott


-- 
View this message in context: 
http://n2.nabble.com/Defect-%3A-Confusion-between-layer.visible-and-layer.isDisplayed-tp2430031p2430031.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Hyperlink not showing

2009-03-05 Thread mrsyer

Try adding this in place of the attribute
http://www.wherever.com View this site  



I have an attribute in one of my point layers called 'hyperlink'.  When I
select a point in a flexible web layout (i.e., Slate) the selection widget
shows the hyperlink address, but I can not click on the address to advance
to the website.

I know I can use the 'URL Activated for Feature' in the layer editor,
however I may have points that would have multiple hyperlinks to chose from.

I have tried the following in the attributes for the point layer with no
success:

1. www.123.com
2. http://www.123.com
3. a href=http://www.123.com; 123 

-- 
View this message in context: 
http://n2.nabble.com/Hyperlink-not-showing-tp2194703p2430581.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Hyperlink not showing

2009-03-05 Thread mrsyer

try placing this in place of the attribute
http://www.wherever.com View this site  


I have an attribute in one of my point layers called 'hyperlink'.  When I
select a point in a flexible web layout (i.e., Slate) the selection widget
shows the hyperlink address, but I can not click on the address to advance
to the website.

I know I can use the 'URL Activated for Feature' in the layer editor,
however I may have points that would have multiple hyperlinks to chose from.

I have tried the following in the attributes for the point layer with no
success:

1. www.123.com
2. http://www.123.com
3. a href=http://www.123.com; 123 

-- 
View this message in context: 
http://n2.nabble.com/Hyperlink-not-showing-tp2194703p2430620.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


RE: [mapguide-users] Hyperlink not showing

2009-03-05 Thread Martin Morrison
a href='http://www.123.com'123/a

Should work.

Martin



-Original Message-
From: mapguide-users-boun...@lists.osgeo.org 
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of mrsyer
Sent: Thursday, March 05, 2009 11:50 AM
To: mapguide-users@lists.osgeo.org
Subject: Re: [mapguide-users] Hyperlink not showing


try placing this in place of the attribute
http://www.wherever.com View this site  


I have an attribute in one of my point layers called 'hyperlink'.  When I
select a point in a flexible web layout (i.e., Slate) the selection widget
shows the hyperlink address, but I can not click on the address to advance
to the website.

I know I can use the 'URL Activated for Feature' in the layer editor,
however I may have points that would have multiple hyperlinks to chose from.

I have tried the following in the attributes for the point layer with no
success:

1. www.123.com
2. http://www.123.com
3. a href=http://www.123.com; 123 

-- 
View this message in context: 
http://n2.nabble.com/Hyperlink-not-showing-tp2194703p2430620.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] [SOLUTIONATED]Polygon are not recorded in feature

2009-03-05 Thread Micho Gar
After much testing, I created a shp with a ESRI's tool, and she has worked.
Before, I was creating the shp with gvSIG, and it seems that there is a
problem in some way not understood with MapGuide.

Thanks to all.



2009/3/4 Micho Gar micho...@gmail.com

 Thanks to all,

 this the XML for this resource

 FeatureSource xsi:noNamespaceSchemaLocation=FeatureSource-1.0.0.xsd
 ProviderOSGeo.SHP/Provider
 -
 Parameter
 NameDefaultFileLocation/Name
 Value%MG_DATA_PATH_ALIAS[datos]%poligonos/zonas.shp/Value
 /Parameter
 -
 Parameter
 NameTemporaryFileLocation/Name
 Value%MG_DATA_PATH_ALIAS[datos]%temp//Value
 /Parameter
 /FeatureSource

 I am still looking for that these days I could not get it.






 2009/3/3 Ivan Milicevic ivan.milice...@supranet.hr

  MIcho,



 Please, open http://gis.supranet.hr/mapguide/mapagent/index.html click on
 Resource-GetResourceContent



 Maybe your feature source is set to rtead only. I had the same problem in
 past couple of days.



 *From:* mapguide-users-boun...@lists.osgeo.org [mailto:
 mapguide-users-boun...@lists.osgeo.org] *On Behalf Of *Micho Gar
 *Sent:* Monday, March 02, 2009 6:44 PM
 *To:* MapGuide Users Mail List
 *Subject:* [mapguide-users] Polygon are not recorded in feature



 Hi all,

 I have a code that should save the polygons in the feature source after
 using the Digitize. In principle I do not give any error, but when reviewing
 the shp the polygon don´t appear. I leave with you the code because I don´t
 see anything bad.

 MgUserInformation userInfo = new MgUserInformation(sessionId);
 MgSiteConnection siteConnection = new MgSiteConnection();
 siteConnection.Open(userInfo);

 MgResourceService resourceService =
 (MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);
 MgFeatureService featureService =
 (MgFeatureService)siteConnection.CreateService(MgServiceType.FeatureService);

 MgResourceIdentifier zonasFeatureId = new
 MgResourceIdentifier(Library://ConectorGPS/Datos/poligonosZonas.FeatureSource);
 MgFeatureCommandCollection zonasComando = new
 MgFeatureCommandCollection();

 //Abrimos el mapa
 MgMap mapa = new MgMap();
 mapa.Open(resourceService, mapName);

 //creamos la geometria
 MgGeometryFactory geometryFactory = new MgGeometryFactory();
 MgCoordinateCollection coordinateCollection = new
 MgCoordinateCollection();
 //MgLinearRingCollection interiorRingCollection = new
 MgLinearRingCollection();
 MgAgfReaderWriter geometryReaderWriter = new MgAgfReaderWriter();

 int count = xCollection.length;
 for(int i=0; icount;i++)
 {
 Double x = Double.valueOf(xCollection[i]);
 Double y = Double.valueOf(yCollection[i]);
 MgCoordinate  coordinate = geometryFactory.CreateCoordinateXY(x,y);
 coordinateCollection.Add(coordinate);
 }
 MgLinearRing exteriorRing =
 geometryFactory.CreateLinearRing(coordinateCollection);
 MgPolygon polygon = geometryFactory.CreatePolygon(exteriorRing,null);
 MgByteReader geom = geometryReaderWriter.Write(polygon);

 //creamos una coleccion de propiedades y la insertamos
 MgPropertyCollection propiedades = new MgPropertyCollection();
 propiedades.Add(new MgGeometryProperty(Geometry, geom));
 propiedades.Add(new MgStringProperty(ID, zona1));
 zonasComando.Add(new MgInsertFeatures(zonasCapa, propiedades));

 featureService.UpdateFeatures(zonasFeatureId, zonasComando, false);

 //capturamos la capa para salvar el mapa y refrescar
 MgLayerBase zonasCapa = mapa.GetLayers().GetItem(zonasCapa);
 zonasCapa.SetVisible(true);
 zonasCapa.ForceRefresh();
 mapa.Save(resourceService);
 out.println(finish);


 Thanks

 --
 # michogar
 # Analista Programador SIG
 # Ubuntu Linux Counter 462666



 Cuenta una leyenda que si reproduces un DVD de Windows Vista original al
 revés se oye a Bill Gates entonando cantos satánicos... Pero eso no es lo
 peor... Si lo reproduces del derecho... ¡Se instala!.


 It has a legend that if you play an original Windows Vista DVD backwards
 to hear Bill Gates Satanic chanting songs ... But that's not the worst ...
 If you play it right ... It installs!.

 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users




 --
 # michogar
 # Analista Programador SIG
 # Ubuntu Linux Counter 462666



 Cuenta una leyenda que si reproduces un DVD de Windows Vista original al
 revés se oye a Bill Gates entonando cantos satánicos... Pero eso no es lo
 peor... Si lo reproduces del derecho... ¡Se instala!.


 It has a legend that if you play an original Windows Vista DVD backwards
 to hear Bill Gates Satanic chanting songs ... But that's not the worst ...
 If you play it right ... It installs!.




-- 
# michogar
# Analista Programador SIG
# Ubuntu Linux Counter 462666



Cuenta una leyenda que si reproduces un DVD de Windows Vista original al
revés se oye a Bill Gates entonando cantos satánicos... Pero eso no es lo
peor... Si lo reproduces del derecho... ¡Se instala!.


It has a legend 

RE: [mapguide-users] Flow Direction

2009-03-05 Thread Berdel, Brian
Actually this would be nice, Bob, would it be possible to publish that 
document on the MGOS site? because I am not sure how to apply symbolization to 
line layers.

Brian


From: mapguide-users-boun...@lists.osgeo.org 
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Andy Morsell
Sent: Wednesday, March 04, 2009 12:50 PM
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] Flow Direction

This kind of thing is supported via the cartographic stylization engine.  See 
this page to get started: http://trac.osgeo.org/mapguide/wiki/MapGuideRfc14.  
Example 4 is closest to what you are looking for.

There was also a class taught by Bob Bray at Autodesk University 2007 that 
focused on this.  Unfortunately, that document is copyrighted by Autodesk and 
I'm not at liberty to distribute it.  Bob, would it be possible to publish that 
document on the MGOS site?

Andy Morsell, P.E.
Spatial Integrators, Inc.
www.SpatialGIS.com

From: mapguide-users-boun...@lists.osgeo.org 
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Berdel, Brian
Sent: Wednesday, March 04, 2009 8:30 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] Flow Direction

Does anyone know of a way to show flow direction on a line feature with Arrows 
(i.e. Sewer Pipe Layer)? Very easy to do in esri, at a loss for how to 
accomplish in Mapguide though.

Thanks,

Brian

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


RE: [mapguide-users] Defect : Confusion between layer.visible and layer.isDisplayed

2009-03-05 Thread Chris Claydon
The QueryMapFeatures request that gets sent to MapGuide from these functions 
goes through the same process that is used to render the map, and therefore any 
layers not visible at the current scale *should* get filtered out anyway. How 
much of a performance difference do you get when you select a feature?

Regardless of the impact, the current code is wrong and so it would be great if 
you could create a ticket for this issue. 

Having said that, the code you've included below would actually introduce a new 
problem, because layers that are not visible in the legend, but are still 
visible and selectable in the map, will have node.isDisplayed = false. 

I looked through the code to see if there are any other node properties that 
correspond exactly to the current visibility of the layer and I couldn't find 
one. However (node.visible  (node.curScale != -1)) seems to give the required 
value. node.visible reflects whether or not the layer is enabled (e.g. 
unchecking it in the legend sets the value to false). node.curScale corresponds 
to the scale range for the layer that is currently active, and it gets set to 
-1 when the layer is out of visible range.

I hope this all makes sense...

Chris.

-Original Message-
From: mapguide-users-boun...@lists.osgeo.org 
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Bruno Scott
Sent: Thursday, March 05, 2009 8:14 AM
To: mapguide-users@lists.osgeo.org
Subject: [mapguide-users] Defect : Confusion between layer.visible and 
layer.isDisplayed


Using fiddler i found something interresting in two mapguide ajax functions
  QueryFeatureInfo (when selecting a feature )
and
  RequestHyperLinkData (when mouse over a feature)

These 2 functions calls GetVisSelLayers or GetVisLayers 
then GetLayers(onlyVisible, onlySelectable)
the DoGetLayers

This function returns the list of all either visible and/or selectable
layers
this is the code
function DoGetLayers(nodes, layers, onlyVisible, onlySelectable)
{
for(var i=0; i  nodes.length; i++)
{
var node = nodes[i];
if(node.type == 0)
{
if(onlyVisible  !node.visible)
continue;
if(node.children != null  node.children.length  0)
DoGetLayers(node.children, layers, onlyVisible,
onlySelectable);
}
else if(node.type == 1)
{
if(onlyVisible  !node.visible)
continue;
if(onlySelectable  !node.selectable)
continue;
layers.push(new Layer(node.legend, node.name, node.objectId));
}
}
}
It should be
function DoGetLayers(nodes, layers, onlyVisible, onlySelectable)
{
for(var i=0; i  nodes.length; i++)
{
var node = nodes[i];
if(node.type == 0)
{
if(onlyVisible  !node.isDisplayed)
continue;
if(node.children != null  node.children.length  0)
DoGetLayers(node.children, layers, onlyVisible,
onlySelectable);
}
else if(node.type == 1)
{
if(onlyVisible  !node.isDisplayed)
continue;
if(onlySelectable  !node.selectable)
continue;
layers.push(new Layer(node.legend, node.name, node.objectId));
}
}
}

This little defect does not make a big difference on a map like Sheboygan
But mine is Oracle based and has more than 300 layers.
Most of them are eventually visible at a given (low)scale but not displayed
at all.
When i select a feature or i mouse over it, it query the mapguide server
with hundreds of not displayed layers. You bet, things get very slow.

I've made some search on the ajax viewer code and found that this function
is only called by
  QueryFeatureInfo
  RequestHyperLinkData
  selectwithin

Do you aggree that i fill a ticket and a diff patch?

Bruno Scott


-- 
View this message in context: 
http://n2.nabble.com/Defect-%3A-Confusion-between-layer.visible-and-layer.isDisplayed-tp2430031p2430031.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] Live CD mapguide help

2009-03-05 Thread mapas

hi all!!!

im try to create a live cd, but with my maps.. 

some body test or work live cd ?? 

i cant find nothing to create this..

thanks a lot and sorry for my english.

oscar from argentina.
-- 
View this message in context: 
http://n2.nabble.com/Live-CD-mapguide-help-tp2432292p2432292.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] is Geometry in 3D ?

2009-03-05 Thread Jamo

I've been asked if mapguide can handle 3D geometry ?
I'm not talking about displaying 3D solids or surfaces or anything of the
sort, I would like to know how a point or line feature is stored in an SDF
file ? does it retain the X,Y,Z of the point but only work with the X, Y
? I would like to grab the Z of a point and work with it in some way or
another... 

If not then I can always write the height as a property of the feature
before exporting to SDF I guess...
-- 
View this message in context: 
http://n2.nabble.com/is-Geometry-in-3D---tp2433076p2433076.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] is Geometry in 3D ?

2009-03-05 Thread Jackie Ng

Yes geometries can have Z components. They aren't used for rendering but if
your SDF has 3d geometries, you can interrogate the Z component of any
geometry.

- Jackie


Jamo wrote:
 
 I've been asked if mapguide can handle 3D geometry ?
 I'm not talking about displaying 3D solids or surfaces or anything of the
 sort, I would like to know how a point or line feature is stored in an SDF
 file ? does it retain the X,Y,Z of the point but only work with the X,
 Y ? I would like to grab the Z of a point and work with it in some way or
 another... 
 
 If not then I can always write the height as a property of the feature
 before exporting to SDF I guess...
 

-- 
View this message in context: 
http://n2.nabble.com/is-Geometry-in-3D---tp2433076p2433265.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


[mapguide-users] Is MGE accessible by mobile

2009-03-05 Thread flakesns

I plan to develop mge application and publish it in my server.
The question now is it accessible or can browse the map using PDA or any
mobile devices?
Is the mobile web browser support the viewer?
Is opera mini support for viewing?
-- 
View this message in context: 
http://n2.nabble.com/Is-MGE-accessible-by-mobile-tp2433496p2433496.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Is MGE accessible by mobile

2009-03-05 Thread Jackie Ng

The AJAX viewer uses lots of frames. I don't know about Opera Mini, but most
mobile web browsers would choke on the AJAX viewer.

- Jackie


flakesns wrote:
 
 I plan to develop mge application and publish it in my server.
 The question now is it accessible or can browse the map using PDA or any
 mobile devices?
 Is the mobile web browser support the viewer?
 Is opera mini support for viewing?
 

-- 
View this message in context: 
http://n2.nabble.com/Is-MGE-accessible-by-mobile-tp2433496p2433698.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users