Re: [mapguide-users] Please help! Has anybody used King.Oracle in real conditions?

2008-10-14 Thread Dragan Podvezanec



FISHeR1 wrote:
> 
> Has anybody used King.Oracle in real conditions? Or it was created and
> tested by the developers, who ascertained outputed and calmed down?
> 
> In real conditions it is impossible to use this provider!
> 
> File mgserver.exe is damaged after a half an hour of intensive working.
> 
> Has anybody any ideas? What to do?
> 

Unfortunately, I can only confirm this problem: after hour or two of
intensive work, mgserver.exe "eats" all ram and application doesn't respond.
Since I'll have to use Oracle on public application, this is a major
obstacle.

10gR2 here, with about 10 tables and few views.
-- 
View this message in context: 
http://www.nabble.com/Please-help%21-Has-anybody-used-King.Oracle-in-real-conditions--tp19793029p19987883.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] SQL Server 2000 FDO

2008-10-14 Thread George McLean
Thanks for all the guidance Jason. I will take a look at the spatial 
support in SQL Server 2008 but I am not sure if my client is ready to 
update their SQL Server. My original problem was fixed by restarting 
mapguide service.


Thanks again,

George

Jason Birch wrote:

George,

Those are part of Autodesk's proprietary SQL Server provider, so yes
there are likely licensing issues.  It may work with MGOS, but you
probably legally have to have a license for MGE to use it.  If your
client prefers SQL Server you may be better off moving to Map
2009/MGOS2.0.2/SQL Server 2008.  This allows you to access SQL Server's
new Spatial support, and doesn't lock you into the semi-proprietary data
structure of the original ADSK SQL Server provider.  It's a relatively
untested provider though...

A couple things to check on your original problem:

- is the FDO version the same between Map 2008 and the version of
MapGuide you are running.

- have you re-started the MapGuide service?  The providers list is
cached.

You should not have to modify your Studio providers.xml list; I believe
that the local FDO installation is only used for load procedures.
Everything else should use the Server providers.  Could be wrong though.

Jason
 
-Original Message-

From: George McLean
Subject: [mapguide-users] SQL Server 2000 FDO

[snip]

I am using MG Studio 2008 and would like to build a data connection to 
this SQL Server datastore. I have copied the SQL Server entry from the 
providers.xml associated with Map 2008 to the  Mapguide Studio 
providers.xml and the MGOS providers.xml.


[snip]

Are 
there licensing issues?


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



No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.173 / Virus Database: 270.8.0/1724 - Release Date: 10/14/2008 2:02 AM


  


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


Re: [mapguide-users] Synchro MapGuide with FDO

2008-10-14 Thread Jackie Ng

You can use FDO Toolbox (http://fdotoolbox.googlecode.com) to create a bulk
copy task from Oracle to SDF. The bulk copy task has options to delete the
data on the [target] before copying from the [source] You can save this task
to an xml file and have it run on a regular schedule.

- Jackie


Lunab wrote:
> 
> 
> Hello
> 
> i search a solution to synchronize with batch a remote mapguide server ose
> 
> on site i use an oracle database and i want every nigth synchronize the
> remote server with new generation SDF
> 
> do you know a solution or method to generate automatically with a batch
> new
> SDF from Oracle ?
> 
> thanks
> 
> luna
> -- 
> View this message in context:
> http://www.nabble.com/Synchro-MapGuide-with-FDO-tp19970744p19970744.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
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Synchro-MapGuide-with-FDO-tp1332138p1334917.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] Maestro: can't find the table containing the geometry field with SQLServerSpatial

2008-10-14 Thread Kenneth Skovhede, GEOGRAF A/S
I guess there should be an "unmapped type" - type, to deal with 
situations like this.

You can set it to "string", and it should read out just fine.
I have created a ticket for the problem:
http://trac.osgeo.org/mapguide/ticket/724

As you may have noticed, Maestro issues calls to a web interface on the 
MapGuide server:

http://localhost/mapguide/mapagent/index.html

On this test form/web interface, you can try the "Feature" -> 
"DescribeSchema".
Leave the "Schema" field blank, and you will get the output from 
MapGuide, which in turn should be

the output directly from FDO.

If the tables are missing there, you cannot get them into Maestro.
If the tables are present, please file a bug report for Maestro, and 
include the resulting xml in the ticket.


If the tables are missing (which I suspect), it could be a problem with 
permissions.
Could it be that the provider only shows tables which are owned by the 
login user?


Regards, Kenneth Skovhede, GEOGRAF A/S



Carl skrev:

yes, the exception is exactly fired because of the lost the type map.

Then I tried to comment the follow bold line: 


/
public class FeatureSetColumn
{
internal FeatureSetColumn(string name, int type)
{
m_name = name;
m_type = Utility.ConvertMgTypeToNetType(type);
}

internal FeatureSetColumn(XmlNode node)
{
m_name = node.Attributes["name"].Value;
m_allowNull = node.Attributes["minOccurs"] != null &&
node.Attributes["minOccurs"].Value == "0";
if (node.Attributes["type"] != null &&
node.Attributes["type"].Value == "gml:AbstractGeometryType")
m_type = Utility.GeometryType;
else if (node["xs:simpleType"] == null)
m_type = Utility.RasterType;
else
switch
(node["xs:simpleType"]["xs:restriction"].Attributes["base"].Value.ToLower())
{
case "xs:string":
m_type = typeof(string);
break;
case "fdo:byte":
m_type = typeof(Byte);
break;
case "fdo:int32":
m_type = typeof(int);
break;
case "fdo:int16":
m_type = typeof(short);
break;
case "fdo:int64":
m_type = typeof(long);
break;
case "xs:float":
m_type = typeof(float);
break;
case "xs:double":
case "xs:decimal":
m_type = typeof(double);
break;
case "xs:boolean":
m_type = typeof(bool);
return;
case "xs:datetime":
m_type = typeof(DateTime);
break;
default:
//throw new Exception("Failed to find appropriate
type for: " +
node["xs:simpleType"]["xs:restriction"].Attributes["base"].Value);   
break;

}
}

private string m_name;
private Type m_type;
private bool m_allowNull;

public string Name { get { return m_name; } }
public Type Type { get { return m_type; } }
}

//

OK. No messages shown again, and Maestro seems work normally, the resource
editor can show more information. 


But, there still only 16 tables listed, none has a geometry field. In fact
there exist more than 200 tables in the Database. 
  

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


RE: [mapguide-users] SQL Server 2000 FDO

2008-10-14 Thread Jason Birch
George,

Those are part of Autodesk's proprietary SQL Server provider, so yes
there are likely licensing issues.  It may work with MGOS, but you
probably legally have to have a license for MGE to use it.  If your
client prefers SQL Server you may be better off moving to Map
2009/MGOS2.0.2/SQL Server 2008.  This allows you to access SQL Server's
new Spatial support, and doesn't lock you into the semi-proprietary data
structure of the original ADSK SQL Server provider.  It's a relatively
untested provider though...

A couple things to check on your original problem:

- is the FDO version the same between Map 2008 and the version of
MapGuide you are running.

- have you re-started the MapGuide service?  The providers list is
cached.

You should not have to modify your Studio providers.xml list; I believe
that the local FDO installation is only used for load procedures.
Everything else should use the Server providers.  Could be wrong though.

Jason
 
-Original Message-
From: George McLean
Subject: [mapguide-users] SQL Server 2000 FDO

[snip]

I am using MG Studio 2008 and would like to build a data connection to 
this SQL Server datastore. I have copied the SQL Server entry from the 
providers.xml associated with Map 2008 to the  Mapguide Studio 
providers.xml and the MGOS providers.xml.

[snip]

Are 
there licensing issues?

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


Re: [mapguide-users] Maestro: can't find the table containing the geometry field with SQLServerSpatial

2008-10-14 Thread Carl


yes, the exception is exactly fired because of the lost the type map.

Then I tried to comment the follow bold line: 

/
public class FeatureSetColumn
{
internal FeatureSetColumn(string name, int type)
{
m_name = name;
m_type = Utility.ConvertMgTypeToNetType(type);
}

internal FeatureSetColumn(XmlNode node)
{
m_name = node.Attributes["name"].Value;
m_allowNull = node.Attributes["minOccurs"] != null &&
node.Attributes["minOccurs"].Value == "0";
if (node.Attributes["type"] != null &&
node.Attributes["type"].Value == "gml:AbstractGeometryType")
m_type = Utility.GeometryType;
else if (node["xs:simpleType"] == null)
m_type = Utility.RasterType;
else
switch
(node["xs:simpleType"]["xs:restriction"].Attributes["base"].Value.ToLower())
{
case "xs:string":
m_type = typeof(string);
break;
case "fdo:byte":
m_type = typeof(Byte);
break;
case "fdo:int32":
m_type = typeof(int);
break;
case "fdo:int16":
m_type = typeof(short);
break;
case "fdo:int64":
m_type = typeof(long);
break;
case "xs:float":
m_type = typeof(float);
break;
case "xs:double":
case "xs:decimal":
m_type = typeof(double);
break;
case "xs:boolean":
m_type = typeof(bool);
return;
case "xs:datetime":
m_type = typeof(DateTime);
break;
default:
//throw new Exception("Failed to find appropriate
type for: " +
node["xs:simpleType"]["xs:restriction"].Attributes["base"].Value);  
 
break;
}
}

private string m_name;
private Type m_type;
private bool m_allowNull;

public string Name { get { return m_name; } }
public Type Type { get { return m_type; } }
}

//

OK. No messages shown again, and Maestro seems work normally, the resource
editor can show more information. 

But, there still only 16 tables listed, none has a geometry field. In fact
there exist more than 200 tables in the Database. 
-- 
View this message in context: 
http://www.nabble.com/Maestro%3A-can%27t-find-the-table-containing-the-geometry-field-with-SQLServerSpatial-tp19977173p19978011.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] SQL Server 2000 FDO

2008-10-14 Thread George McLean

This may be more of a Mapguide Studio question but I will ask it anyway.

I have built a datastore in SQL Server 2000 that works will with Autocad 
Map 2008. I can store and retrieve features using the Autodesk provider 
for SQL Server.


I am using MG Studio 2008 and would like to build a data connection to 
this SQL Server datastore. I have copied the SQL Server entry from the 
providers.xml associated with Map 2008 to the  Mapguide Studio 
providers.xml and the MGOS providers.xml. I have also copied  the 
following 3 files to the FDO folders  for  MGOS and Studio:


Autodesk.Gis.Fdo.Providers.SQLServer.Overrides.dll
SqlServerOverrides.dll
SqlServerProvider.dll

In studio when I create a new data connection, I do not see SQL Server 
as an option. Can Studio be set up to use this provider with MGOS? Are 
there licensing issues?


It appears the SL-King provider requires SQL Server 2005 and I am not 
sure my client wants to upgrade or even use the SQL Express version.


I can fall back to my MySQL based solution if needed but the client 
would prefer SQL server.


Thanks

George McLean


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


Re: [mapguide-users] Maestro: can't find the table containing the geometry field with SQLServerSpatial

2008-10-14 Thread Carl

I traced into the code further more, and found the exception occurs while
creating a featuresetcolumn with field type of 'varbinary': (as bold line of
follow code)

public FeatureSourceSchema(XmlNode node, XmlDocument doc,
XmlNamespaceManager mgr)
{
XmlNode root = doc.FirstChild;
if (root.NodeType == XmlNodeType.XmlDeclaration)
root = root.NextSibling;
m_schema = root.Attributes["targetNamespace"] 
== null ? null :
root.Attributes["targetNamespace"].Value;
if (m_schema != null && m_schema.IndexOf("/") > 
0)
m_schema = 
m_schema.Substring(m_schema.LastIndexOf("/") + 1);
m_name = node.Attributes["name"].Value;
if (m_name.EndsWith("Type"))
m_name = m_name.Substring(0, 
m_name.Length - "Type".Length);

XmlNodeList lst;
if (node.ChildNodes.Count == 0)
{
m_columns = new FeatureSetColumn[0];
return;
}
else if (node.FirstChild.Name == "xs:sequence")
lst = 
node.SelectNodes("xs:sequence/xs:element", mgr);
else
lst =
node.SelectNodes("xs:complexContent/xs:extension/xs:sequence/xs:element",
mgr);

m_columns = new FeatureSetColumn[lst.Count];
for(int i = 0;i 
> I don't know whether it is the issue of Maestro, or MGOS server, or even
> the FDO provider for SQL server 2008.
> 
> I have a SQL server 2008 Database with more than 200 tables. some tables
> has the name with the max length of 64 alpha-beta letters. there is only
> one table, with name length of 35 letters, has a field of type 'geometry'.
> I want to show the distribution map of this geometry with MapGuide OS.
> 
> I now created a feature datasource successfully with Maestro, by setting
> the server, database, username,password, and then I tried to create a
> layer referencing the featuredatasource. But Maestro always show a message
> as follows:
> 
>   Failed to read schema from data source. The operation gave the error
> message: Failed to find appropriate type for: xs:hexBinary.
> 
>   I traced the project 'Maestro' with VS 2008. and from 'public override
> FeatureSourceDescription DescribeFeatureSource(string resourceID, string
> schema)' of file 'HttpServerConnection.cs' to public
> FeatureSourceDescription(System.IO.Stream stream)' of file
> 'FeatureSourceDescription.cs', and find the XML document, loaded from the
> input stream, only covers the definition about 16 tables, and the spatial
> table isn't among these tables.
> 
> I also test the SQL Server Spatial with only one table with a geometry
> field, the feature datasource and the relative layer can be defined and
> can be previewed.
> 
> Hope somebody could help me.
> 
> Thanks!
> 

-- 
View this message in context: 
http://www.nabble.com/Maestro%3A-can%27t-find-the-table-containing-the-geometry-field-with-SQLServerSpatial-tp19977173p19977444.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] Maestro: can't find the table containing thegeometry field with SQLServerSpatial

2008-10-14 Thread Jason Birch
Great problem report!

Sounds like it might be a missing type map in Maestro. 

http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/Fe
atureSetReader.cs#L158

I would suggest adding a Trac Ticket (make sure to set the Component to
Maestro) so that Kenneth can address this.

http://trac.osgeo.org/mapguide/wiki/SubmitTicket

Jason

-Original Message-
From: Carl
Subject: [mapguide-users] Maestro: can't find the table containing
thegeometry field with SQLServerSpatial

[snip]

I now created a feature datasource successfully with Maestro, by setting
the
server, database, username,password, and then I tried to create a layer
referencing the featuredatasource. But Maestro always show a message as
follows:  Failed to read schema from data source. The operation gave the
error
message: Failed to find appropriate type for: xs:hexBinary.

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


[mapguide-users] Maestro: can't find the table containing the geometry field with SQLServerSpatial

2008-10-14 Thread Carl

I don't know whether it is the issue of Maestro, or MGOS server, or even the
FDO provider for SQL server 2008.

I have a SQL server 2008 Database with more than 200 tables. some tables has
the name with the max length of 64 alpha-beta letters. there is only one
table, with name length of 35 letters, has a field of type 'geometry'. I
want to show the distribution map of this geometry with MapGuide OS.

I now created a feature datasource successfully with Maestro, by setting the
server, database, username,password, and then I tried to create a layer
referencing the featuredatasource. But Maestro always show a message as
follows:

  Failed to read schema from data source. The operation gave the error
message: Failed to find appropriate type for: xs:hexBinary.

  I traced the project 'Maestro' with VS 2008. and from 'public override
FeatureSourceDescription DescribeFeatureSource(string resourceID, string
schema)' of file 'HttpServerConnection.cs' to public
FeatureSourceDescription(System.IO.Stream stream)' of file
'FeatureSourceDescription.cs', and find the XML document, loaded from the
input stream, only covers the definition about 16 tables, and the spatial
table isn't among these tables.

I also test the SQL Server Spatial with only one table with a geometry
field, the feature datasource and the relative layer can be defined and can
be previewed.

Hope somebody could help me.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Maestro%3A-can%27t-find-the-table-containing-the-geometry-field-with-SQLServerSpatial-tp19977173p19977173.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] Adding a point to a map... PLZ Help!!! (.NET - C#)

2008-10-14 Thread Kenneth Skovhede, GEOGRAF A/S

Did you look at the buffer sample code in the AJAX viewer?
It does exactly what is required, besides inserting your points.

About your code:
You do not use the "resourceIdentifier" variable, which means your layer 
might reference something else.
You save the layers to the regular repository, which is fine, but each 
use will overwrite the previous copy, making

it impossible to reliably serve more than one user.
You do not add the layer to the runtime map, and you do not save the 
runtime map.


You write: "I just want to display them".
Well, MapGuide works by displaying data from a FeatureSource, styled 
through a LayerDefinition.
You cannot insert data in the LayerDefinition, it must be in a 
FeatureSource.


If you insert the data in an existing FeatureSource, with an existing 
layer, that is fine too, but I cannot guess that is what you want.


You did not mention an Xml file with points before, just a single point.

Depending on your data, you may want to insert them into a database 
(like Sqlite or Access), or into an SDF file.

If you choose the database version, your FeatureSource can be of type ODBC.

If you use a database, you can insert the points using regular SQL 
queries against the database.
If the points are persistent (that is, not tied to a particular users 
map, like session values),
you can just create a FeatureSource + Layer through Maestro or Studio 
without requirering any code.


If you are looking to create something similar to "Points of interrest" 
with a nice little flag, you might

consider using OpenLayers instead of the AJAX viewer:
http://www.openlayers.org/
http://www.openlayers.org/dev/examples/georss-markers.html
(OpenLayers also supports MapGuide as the backend server)


Regards, Kenneth Skovhede, GEOGRAF A/S



Galois skrev:

First of all, thank u fro your reply.

I don't get why should I create a temp layer.
I have some coordinates in an XML file, and I just want to display them on
an existing layer.

Though I tried to create a new layer, it does not appear in my maps layers.

That's what I did...



MgResourceIdentifier resourceIdentifier = new
MgResourceIdentifier("Library://GoSpatial/Data/airports.FeatureSource");
MgResourceIdentifier layerResId = new
MgResourceIdentifier("Library://GoSpatial/Layers/TmpLayer.LayerDefinition");


string layerDefinition =
File.ReadAllText("C:/Inetpub/wwwroot/iwaygis/TmpLayer.LayerDefinition.xml");


MgByteReader reader = new MgByteReader(layerDefinition, "text/xml");

resourceSrvc.SetResource(layerResId, reader, null);


tmpLayer = new MgLayer(layerResId, resourceSrvc);
tmpLayer.SetName("TempLayer");
tmpLayer.SetLegendLabel("TempLayer");
tmpLayer.SetDisplayInLegend(true);
tmpLayer.SetSelectable(true);

MgLayerCollection layers = map.GetLayers();
layers.Insert(0, tmpLayer);
tmpLayer.SetVisible(true);
tmpLayer.ForceRefresh();

Thx!



Kenneth Skovhede, GEOGRAF A/S wrote:
  

A few steps are involved:

1. Create a temporary featuresource
2. Create a temporary layer to display the features
3. Insert the temporary layer into the runtime map

The buffer files in the MapGuide viewer has template code for all three
steps.
All steps are explained in the Developer Guide (PDF version at least).

You might also want to look here:
http://trac.osgeo.org/mapguide/wiki/CodeSamples/ASP.Net/ScribbleApp

Regards, Kenneth Skovhede, GEOGRAF A/S



Galois skrev:


Hello,

I´m trying to add a point to a map but I have no idea how to it.

I have declare the map object, and also I create a point with it's
coordinates.

But I don't know what is the next step that I have to do...

The code follows


public partial class _Default : System.Web.UI.Page
{
public string sessionId;
public string webLayout;

protected void Page_Load(object sender, EventArgs e)
{
string physicalPath = @"C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\webconfig.ini";

try
{
MapGuideApi.MgInitializeWebTier(physicalPath);


passAndSession();

//Associate a session ID with the MgSiteConnection Object
MgUserInformation userInfo_new = new
MgUserInformation(sessionId);

MgSiteConnection siteConnection = new MgSiteConnection();

siteConnection.Open(userInfo_new);

MgResourceService resourceSrvc =
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);


MgMap map = new MgMap(siteConnection);

webLayout =
"Library://GoSpatial/Web+Layouts/Autostrada+Brescia+Padova+Map.WebLayout";

MgResourceIdentifier resId = new
MgResourceIdentifier("Library://GoSpatial/Maps/Italy Map.MapDefinition");

String mapName = resId.GetName();

MgResourceIdentifier mapStateId = new
MgResourceIdentifier("Session:" + sessionId + "//" + mapName + "." +
MgResourceType.Map);

map.Cre

Re: [mapguide-users] programmatically add layer to initial map

2008-10-14 Thread Kenneth Skovhede, GEOGRAF A/S

This is a PHP version of the same:
http://trac.osgeo.org/mapguide/wiki/CodeSamples/PHP/AddLayerToInitialMap

If you are using .Net, be aware of the UTF-8 BOM problem, as it 
validates, but fails to create the map.

If you are using .Net, you can try the MaestroAPI:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/AddInitialLayer

Regards, Kenneth Skovhede, GEOGRAF A/S



Galois skrev:

Hello,

if u find a way to solve your problem, can u plZ show me some sample code.

I'm trying also to add a layer via .NET and I'm going really crazy with that
thing...

Thx in advance!



Carl Grice wrote:
  

Hi,

I am trying to programmatically filter and add a layer to a map that
exists in the repository before the map is initially loaded in the clients
viewer. The steps i am performing are as follows;

1)Initialize the web teir and open site
2)Create a new session and open a site connection
3)Use map.create() to create a map from an existing map definition in the
repository
4)Create a session resource identifier and use map.Save() to save the
existing map into the session repository
5)Use map.Open() to open the map resource just created in the session
repository
6)Use map.Getlayers() and insert() to add a new layer into the map
7)use map.save() to save the map with the added layer into the session
repository

When i debug my code i get no errors and the map displays in the viewer
but the added layer does not (even after performing a map refresh).

Please can you point me in the direction of a sample that performs a
similar task or provide a code example? (I have found similar problems
disscussed but cannot find a solution)

Thanks in advance.




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


RE: [mapguide-users] difficulty to publish file raster

2008-10-14 Thread Dave Wilson
Check your php file upload settings in your php.ini. The packaging uses php 
which limits the file upload size by default.

Dave

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jackie Ng
Sent: Sunday, October 12, 2008 6:31 PM
To: mapguide-users@lists.osgeo.org
Subject: Re: [mapguide-users] difficulty to publish file raster


Can the MGOS server see the path that you have defined in your raster feature
source connection?

- Jackie


alfredo54 wrote:
>
> I find difficulty to publish file raster from MapGuide Studio to MapGuide
> Open Source. I don't succeed in understanding if it is a problem of format
> file or it needs to directly effect the publication intervening on map
> guides open source. In this case as it needs to proceed?
> :confused::confused:
> a lot of graces
>

--
View this message in context: 
http://n2.nabble.com/difficulty-to-publish-file-raster-tp1319742p1324022.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] Adding a point to a map... PLZ Help!!! (.NET - C#)

2008-10-14 Thread Galois

First of all, thank u fro your reply.

I don't get why should I create a temp layer.
I have some coordinates in an XML file, and I just want to display them on
an existing layer.

Though I tried to create a new layer, it does not appear in my maps layers.

That's what I did...



MgResourceIdentifier resourceIdentifier = new
MgResourceIdentifier("Library://GoSpatial/Data/airports.FeatureSource");
MgResourceIdentifier layerResId = new
MgResourceIdentifier("Library://GoSpatial/Layers/TmpLayer.LayerDefinition");


string layerDefinition =
File.ReadAllText("C:/Inetpub/wwwroot/iwaygis/TmpLayer.LayerDefinition.xml");


MgByteReader reader = new MgByteReader(layerDefinition, "text/xml");

resourceSrvc.SetResource(layerResId, reader, null);


tmpLayer = new MgLayer(layerResId, resourceSrvc);
tmpLayer.SetName("TempLayer");
tmpLayer.SetLegendLabel("TempLayer");
tmpLayer.SetDisplayInLegend(true);
tmpLayer.SetSelectable(true);

MgLayerCollection layers = map.GetLayers();
layers.Insert(0, tmpLayer);
tmpLayer.SetVisible(true);
tmpLayer.ForceRefresh();

Thx!



Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> A few steps are involved:
> 
> 1. Create a temporary featuresource
> 2. Create a temporary layer to display the features
> 3. Insert the temporary layer into the runtime map
> 
> The buffer files in the MapGuide viewer has template code for all three
> steps.
> All steps are explained in the Developer Guide (PDF version at least).
> 
> You might also want to look here:
> http://trac.osgeo.org/mapguide/wiki/CodeSamples/ASP.Net/ScribbleApp
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> 
> Galois skrev:
>> Hello,
>>
>> I´m trying to add a point to a map but I have no idea how to it.
>>
>> I have declare the map object, and also I create a point with it's
>> coordinates.
>>
>> But I don't know what is the next step that I have to do...
>>
>> The code follows
>>
>>
>> public partial class _Default : System.Web.UI.Page
>> {
>> public string sessionId;
>> public string webLayout;
>>
>> protected void Page_Load(object sender, EventArgs e)
>> {
>> string physicalPath = @"C:\Program
>> Files\MapGuideOpenSource\WebServerExtensions\www\webconfig.ini";
>>
>> try
>> {
>> MapGuideApi.MgInitializeWebTier(physicalPath);
>>
>>
>> passAndSession();
>>
>> //Associate a session ID with the MgSiteConnection Object
>> MgUserInformation userInfo_new = new
>> MgUserInformation(sessionId);
>>
>> MgSiteConnection siteConnection = new MgSiteConnection();
>>
>> siteConnection.Open(userInfo_new);
>>
>> MgResourceService resourceSrvc =
>> (MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);
>>
>>
>> MgMap map = new MgMap(siteConnection);
>>
>> webLayout =
>> "Library://GoSpatial/Web+Layouts/Autostrada+Brescia+Padova+Map.WebLayout";
>>
>> MgResourceIdentifier resId = new
>> MgResourceIdentifier("Library://GoSpatial/Maps/Italy Map.MapDefinition");
>>
>> String mapName = resId.GetName();
>>
>> MgResourceIdentifier mapStateId = new
>> MgResourceIdentifier("Session:" + sessionId + "//" + mapName + "." +
>> MgResourceType.Map);
>>
>> map.Create(resourceSrvc, resId, mapName);
>>
>> map.Save(resourceSrvc, mapStateId);
>>
>> map.Open(resourceSrvc, mapName);
>>
>> createPoint();
>>
>>
>> }
>> catch (Exception ex)
>> {
>> throw (ex);
>> }
>> }
>>
>>
>>
>>
>> public string passAndSession()
>> {
>> MgUserInformation userInfo = new
>> MgUserInformation("Administrator",
>> "admin");
>>
>> MgSite site = new MgSite();
>>
>> site.Open(userInfo);
>>
>> sessionId = site.CreateSession();
>> return sessionId;
>> }
>>
>> public MgPoint createPoint()
>> {
>> MgGeometryFactory geometryFactory = new MgGeometryFactory();
>>
>> MgCoordinateXY coordinate = (MgCoordinateXY)
>> geometryFactory.CreateCoordinateXY(10.913161, 45.408046);
>>
>> MgPoint point = geometryFactory.CreatePoint(coordinate);
>> return point;
>> }
>> }
>>
>>   
> ___
> mapguide-users mailing list
> mapguide-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-a-point-to-a-map...-PLZ-Help%21%21%21-%28.NET---C-%29-tp19954532p19974224.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] programmatically add layer to initial map

2008-10-14 Thread Galois

Hello,

if u find a way to solve your problem, can u plZ show me some sample code.

I'm trying also to add a layer via .NET and I'm going really crazy with that
thing...

Thx in advance!



Carl Grice wrote:
> 
> Hi,
> 
> I am trying to programmatically filter and add a layer to a map that
> exists in the repository before the map is initially loaded in the clients
> viewer. The steps i am performing are as follows;
> 
> 1)Initialize the web teir and open site
> 2)Create a new session and open a site connection
> 3)Use map.create() to create a map from an existing map definition in the
> repository
> 4)Create a session resource identifier and use map.Save() to save the
> existing map into the session repository
> 5)Use map.Open() to open the map resource just created in the session
> repository
> 6)Use map.Getlayers() and insert() to add a new layer into the map
> 7)use map.save() to save the map with the added layer into the session
> repository
> 
> When i debug my code i get no errors and the map displays in the viewer
> but the added layer does not (even after performing a map refresh).
> 
> Please can you point me in the direction of a sample that performs a
> similar task or provide a code example? (I have found similar problems
> disscussed but cannot find a solution)
> 
> Thanks in advance.
> 

-- 
View this message in context: 
http://www.nabble.com/programmatically-add-layer-to-initial-map-tp12125213p19974012.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] Change map scale or get min and max scale from layer

2008-10-14 Thread Kenneth Skovhede, GEOGRAF A/S
IIRC, IsVisible() is the same as GetVisible(), which is a property that 
determines if the layer is visible.
If the layer is "visible", it will be displayed, but only appears in the 
map at predefined scale ranges.


The scale ranges are actually present in the layer object, but not 
accesible from the API.
You have to read out the LayerDefinition ResourceIdentifier, load the 
xml from the LayerDefinition, and find the  tags:

 
 0
 100


Be aware that both  and  may be missing, in which 
case they are 0 and inifinite respectively.


Regards, Kenneth Skovhede, GEOGRAF A/S



Lukas Hybner skrev:

Hi all,

I have a problem when I show tree of layers. I need to know if the layer
is Visible or not. 


For Example client send scale=500 and some layers is visible from 1
to 4000. When I want to know if the layers is visible, I use method
isVisible(). This method return always true because map.getViewScale()
returns 1.0 (not 500).

My code is (in jsp):

String mapDefinition = "some map definition";
MgMap map = new MgMap();
MgResourceIdentifier resId = new MgResourceIdentifier(mapDefinition);
String mapName = resId.GetName();
map.Create(resourceSrvc, resId, mapName);

MgGeometryFactory factory = new MgGeometryFactory();
MgCoordinate centerCoord = factory.CreateCoordinateXY(centerx,centery); 



//here is scale property from client
MgByteReader mgImage = renderingSrvc.RenderMap( map, null, centerCoord,
scale,width, height, color, "JPG" );

out.println(map.GetViewScale()); //returns 1.0

MgLayerCollection layers = map.GetLayers();
for (int i = 0; i < layers.GetCount(); ++i)
out.println( (layers.GetItem(i).isVisible ? "on" : "off") );
//this write on


How can I change scale in object map? Or is some other solution? Or can
I read from layer object min and max scale?

Lukas Hybner


___
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] Change map scale or get min and max scale from layer

2008-10-14 Thread Lukas Hybner
Hi all,

I have a problem when I show tree of layers. I need to know if the layer
is Visible or not. 

For Example client send scale=500 and some layers is visible from 1
to 4000. When I want to know if the layers is visible, I use method
isVisible(). This method return always true because map.getViewScale()
returns 1.0 (not 500).

My code is (in jsp):

String mapDefinition = "some map definition";
MgMap map = new MgMap();
MgResourceIdentifier resId = new MgResourceIdentifier(mapDefinition);
String mapName = resId.GetName();
map.Create(resourceSrvc, resId, mapName);

MgGeometryFactory factory = new MgGeometryFactory();
MgCoordinate centerCoord = factory.CreateCoordinateXY(centerx,centery); 


//here is scale property from client
MgByteReader mgImage = renderingSrvc.RenderMap( map, null, centerCoord,
scale,width, height, color, "JPG" );

out.println(map.GetViewScale()); //returns 1.0

MgLayerCollection layers = map.GetLayers();
for (int i = 0; i < layers.GetCount(); ++i)
out.println( (layers.GetItem(i).isVisible ? "on" : "off") );
//this write on


How can I change scale in object map? Or is some other solution? Or can
I read from layer object min and max scale?

Lukas Hybner


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


Re: [mapguide-users] Oracle view crashing map server

2008-10-14 Thread btenbroeck

Hi Dragan

I don't have anything for you, other than to let you know we have run into
the same issue. View works fine under the Autodesk provider, or in Map, and
it is specific to a certain view. I posted in the FDO list back on 5/16, but
no resolution yet. Basically, I wanted to tie these two issues together.

Best regards,

Bill



Dragan Podvezanec wrote:
> 
> Hi all.
> 
> I followed instructions how to make layer from oracle view on Haris's
> site, and everything seemed ok, i managed to create few layers this way.
> But now I have one view which crashes the server everytime I turn the
> layer on, with following error:
> 
> (3216) An unclassified exception occurred.
> Exception occurred in method
> MgApplicationRepositoryManager.EnumerateParentMapDe
> finitions at line 699 in file
> d:\buildforgeprojects\mapguide_open_source_v2.0\bu
> ild_27.16\mgdev\server\src\services\resource\ApplicationRepositoryManager.cpp
> 
> View has primary key, and table from which is created has spatial index,
> PK and all metadata set.
> Interrestingly, this layer shows ok using Autodesk Map3D and King.Oracle
> and I can even edit it. also, the table from which is created this view
> shows ok and doesn't throw any errors. But I need the view to show just
> last 5 records from the table. And this crashes mgserver. Any ideas?
> 

-- 
View this message in context: 
http://www.nabble.com/Oracle-view-crashing-map-server-tp19952132p19970858.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] Synchro MapGuide with FDO

2008-10-14 Thread Lunab

Hello

i search a solution to synchronize with batch a remote mapguide server ose

on site i use an oracle database and i want every nigth synchronize the
remote server with new generation SDF

do you know a solution or method to generate automatically with a batch new
SDF from Oracle ?

thanks

luna
-- 
View this message in context: 
http://www.nabble.com/Synchro-MapGuide-with-FDO-tp19970744p19970744.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] Supported WMS and WFS in MapGuide

2008-10-14 Thread Kenneth Skovhede, GEOGRAF A/S
If found the following document describing the versions of WMS and WFS 
supported in MapGuide:

http://mapguide.osgeo.org/faq_ogcserices.html

The page appears quite outdated: "as soon as the FDO providers for WMS 
and WFS are available".


The above mentioned page is not making a clear distinciton between being 
a client and being a server.
There was no apparent mentioning of WMS/WFS versions on the FDO website 
either.



My questions are:
1. What versions are supported when MapGuide is a WMS/WFS server?
2. What versions are supported when MapGuide is a WMS/WFS client?
3. Does MapGuide support WFS-T as a server?
4. Does MapGuide support WFS-T as a client?
5. How are the OGC certifications for server/client WMS/WFS coming along?

--
Regards, Kenneth Skovhede, GEOGRAF A/S


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