[mapguide-users] MapGuide Open Source Web Studio

Paul Spencer pspencer at dmsolutions.ca
Mon Jun 5 23:00:16 EDT 2006


ok, I think I get it.  I'll have to try this.  This will actually  
help me test the code that enumerates the feature classes in an fdo  
feature source (I didn't have any data to test more than one feature  
class so I bet it will fail ;))

Cheers

Paul

On 5-Jun-06, at 10:50 PM, Robert Bray wrote:

> Paul,
>
> Using local references as in my previous e-mail you do not need to  
> call SetResourceData at all. With SHP just reference a directory  
> like this:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema- 
> instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"  
> xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
> <Provider>OSGeo.SHP.3.0</Provider>
> <Parameter>
> <Name>DefaultFileLocation</Name>
> <Value>C:\MyData</Value>
> </Parameter>
> </FeatureSource>
>
> MapGuide will automatically expose each SHP file in the C:\MyData  
> folder as a Feature Class. Just make sure each SHP file has a PRJ  
> file that MapGuide supports via Proj.4 and you are all set. Note  
> that Studio will not show the SHP files in the Feature Source  
> editor, but that does not mean anything in this case. Studio is  
> just showing the result of enumerating the data associated with the  
> resource (e.g. being managed by that resource). In this case you  
> are managing the data, not MapGuide so it shows nothing.
>
> FYI - I seem to recall a bug with the SHP FDO Provider where all of  
> the data in a directory needs to use the same projection, so you  
> might want to watch out for that.
>
> Bob
>
> -----Original Message-----
> From: Paul Spencer (External)
> Sent: Mon 6/5/2006 10:13 PM
> To: users at mapguide.osgeo.org
> Cc:
> Subject: Re: [mapguide-users] MapGuide Open Source Web Studio
>
> ahhh ... thats the trick.
>
> When I looked at an uploaded shape file using GetResourceContents
>
> <?xml version="1.0" encoding="utf-8"?>
> <FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
>    <Provider>OSGeo.SHP.3.0</Provider>
>    <Parameter>
>      <Name>DefaultFileLocation</Name>
>      <Value>%MG_DATA_FILE_PATH%</Value>
>    </Parameter>
> </FeatureSource>
>
> it didn't seem to list the actual files so I wasn't sure what I could
> do with this and SetResourceContent.  Using EnumerateResourceData
> listed the actual files but there didn't seem to be a way to put this
> XML back into the server.   Now that I look at the schema for the
> feature source, I realize that I could probably just have multiple
> Parameter tags, one for each file, and used SetResourceContent :)
>
> Cheers
>
> Paul
>
>
>
>
>
> On 5-Jun-06, at 9:48 PM, Robert Bray wrote:
>
> > Paul,
> >
> > A typical FeatureSourceDefintion (for SDF) that is created by
> > Studio looks like:
> >
> > <?xml version="1.0" encoding="utf-8" ?>
> > <FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-
> > instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
> > <Provider>OSGeo.SDF.3.0</Provider>
> > <Parameter>
> > <Name>File</Name>
> > <Value>%MG_DATA_FILE_PATH%Parcels.sdf</Value>
> > </Parameter>
> > <Parameter>
> > <Name>ReadOnly</Name>
> > <Value>TRUE</Value>
> > </Parameter>
> > </FeatureSource>
> >
> > If you replace the %MG_DATA_FILE_PATH% with a physical path to the
> > file on the servers file system you can effectively "reference"
> > data and not worry about uploading it. A similar technique can be
> > used for SHP files, Raster files, etc.
> >
> > Bob
> > -----Original Message-----
> > From: Paul Spencer (External)
> > Sent: Mon 6/5/2006 9:14 PM
> > To: users at mapguide.osgeo.org
> > Cc:
> > Subject: Re: [mapguide-users] MapGuide Open Source Web Studio
> >
> > The preview of the web layout is from the sample Sheboygan package.
> > Web Studio can load web layouts using the ajax viewer, you just  
> can't
> > create or edit them yet.
> >
> > I had originally thought that we would only be supporting data that
> > was already on the server.  The data that is stored on the server is
> > reported through the MapAgent using the EnumerateResourceData
> > operation.  The XML returned from this lists the data file or files
> > that are part of the resource.  There doesn't seem to be a way to
> > create the XML and put it into the server.  Thus it doesn't seem
> > possible to support creating a feature source that refers to data
> > already on the server.  I could be wrong about this, though.
> >
> > Cheers
> >
> > Paul
> >
> >
> > On 5-Jun-06, at 6:20 PM, Jason Birch wrote:
> >
> > > IANAP (I am not a Paul), but I think that "The primary goal of  
> this
> > > release is to enable users to get data into the server" must mean
> > > that there is some mechanism for either uploading data, or (based
> > > on some questions Paul asked on this list) possibly referring to
> > > data that is already on the server.
> > >
> > > One of the screen shots shows a web layout.  Perhaps there is a
> > > "default" web layout provided?
> > >
> > > Jason
> > >
> > > ________________________________
> > >
> > > From: Andy Morsell [@spatialgis.com]
> > > Sent: Mon 2006-06-05 2:44 PM
> > > Subject: RE: [mapguide-users] MapGuide Open Source Web Studio
> > >
> > > Wow, that really does look great.  I'm confused on a couple of
> > issues,
> > > though.  First, it doesn't support load procedures, etc.  I think
> > > that makes
> > > sense for a pure web-based authoring tool, but at this point,
> > > people will
> > > still have to use MapGuide Studio to load their data and then
> > > author it with
> > > this tool instead?  I could see that a company may choose to  
> have a
> > > couple
> > > of licenses of Studio for this and other advanced functionality
> > > purposes and
> > > then use the open source version for other folks needing to create
> > > maps from
> > > that data.  I also imagine that others will eventually develop  
> open
> > > source
> > > tools for loading data without the need for Studio.
> > >
> > > Second, you say that it doesn't support web layouts.  Are the
> > > webLayout's in
> > > the Web Studio version different than MapGuide Studio web layouts?
> > >
> > > Thanks again for developing this open source tool.  It will be  
> very
> > > useful.
> > >
> > > <winmail.dat>
> > >
> >  
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> > > For additional commands, e-mail: users-help at mapguide.osgeo.org
> >
> > +-----------------------------------------------------------------+
> > |Paul Spencer                           pspencer at dmsolutions.ca   |
> > +-----------------------------------------------------------------+
> > |Applications & Software Development                              |
> > |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> > +-----------------------------------------------------------------+
> >
> >
> >
> >
> >
> >  
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> > For additional commands, e-mail: users-help at mapguide.osgeo.org
> >
>
> +-----------------------------------------------------------------+
> |Paul Spencer                           pspencer at dmsolutions.ca   |
> +-----------------------------------------------------------------+
> |Applications & Software Development                              |
> |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: users-help at mapguide.osgeo.org
>

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+








More information about the Mapguide-users mailing list