[mapguide-users] Advanced WMS provider configuration

Chris Tweedie chrislist at narx.net
Thu Apr 12 23:00:33 EDT 2007


Hi Jason, thanks for the additional info.

I'm still a little confused on the relationship between the config file attached to the data connection and the mapguide layer. I used the multi-layer XML example to define multiple layers, however how do i then create a new mapguide layer based on the custom commands? If i try to create a layer based off the connection, it simply queries the WMS featureserver again and gives me a list of the featuretypes as usual?

<Layer name="srtm_mag">
 <Style name="default"/>
</Layer>
<Layer name="global_mosaic">
 <Style name="pseudo"/>
</Layer>

If i can finish this last step it certainly will solve my problems

Chris

On Thu, 12 Apr 2007 15:53:34 -0400, "Greg Boone" <greg.boone at autodesk.com> wrote:
> If users need FDO API examples on how to programmatically generate the
> WMS configuration files, I would be happy to provide some.
> 
> Greg
> 
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jason Birch
> Sent: Thursday, April 12, 2007 2:13 PM
> To: fdo-users at lists.osgeo.org; MapGuide Users Mail List
> Subject: [mapguide-users] Advanced WMS provider configuration
> 
> This is a reply to a post on fdo-users, but I thought others might find
> it useful.
> 
> The FDO provider for WMS allows some fairly complex configurations
> through an XML config file, including multi-layer feature sources,
> different settings for image types, transparency, etc.  Unfortunately,
> none of this complexity is exposed in the Studio user interface.
> 
> The schema for this configuration file is available here:
> 
> http://trac.osgeo.org/fdo/browser/trunk/Providers/WMS/Docs/XmlSchema/Fdo
> WmsOverride.xsd
> 
> And some example XML configuration documents can be found in the
> provider unit tests:
> 
> http://trac.osgeo.org/fdo/browser/trunk/Providers/WMS/Src/UnitTest
> 
> To be used in MapGuide, the configuration document needs to be stored as
> ResourceData associated with the FeatureSource.
> 
> You're on your own building these XML configuration files, but once you
> have one, there's a relatively easy way of uploading them to MapGuide.
> 
> - In your Studio install directory look for the file called
> ProviderEditorMap.xml
> 
> - Comment out the lines dealing with the WMS provider
> 
> <!--
>     <Entry>
>         <ProviderName>OSGeo.WMS</ProviderName>
>  
> <Editor>Autodesk.MapGuide.Studio.UI.FeatureSourceEditors.WmsEditor</Edit
> or>
>     </Entry>
> -->
> 
> - This will expose the raw connection attributes for the WMS provider
> (the URL goes in the FeatureServer property) but will also give you
> links to easily upload the configuration documents
> 
> Jason
> 
> On Wed, 11 Apr 2007 08:56:11 -0700, "Jason Birch" wrote:
>> Hi Chris,
>> 
>> To my knowledge, the FDO installed with Studio is not used for 
>> interacting with the server.  It's there for creating packages and has
> 
>> no relationship with the providers dialog.  Unfortunately, Studio's 
>> dialog mechanism is proprietary and there is no known API for creating
> 
>> or extending them.  You can disable the use of the dialog (reverting 
>> to a generic FDO dialog box) by commenting out the appropriate section
> 
>> of ProviderEditorMap.xml.  However, this only affects the connection 
>> dialog, and it looks like you're wanting the behaviour of the Layer 
>> Editor to change.
>> 
>> As far as the XML configuration file goes, have a look in the UnitTest
> 
>> directory for some examples.  They seem to cover most of your
> comments.
>> 
>> 
>> http://trac.osgeo.org/fdo/browser/trunk/Providers/WMS/Src/UnitTest
>> 
>> The schema for this file appears to be here:
>> 
>> http://trac.osgeo.org/fdo/browser/trunk/Providers/WMS/Docs/XmlSchema
>> 
>> I'm not sure how these would be referenced in MapGuide; perhaps they 
>> could be uploaded as ResourceContent?
>> 
>> It seems like most of the limitations that you're seeing are with 
>> Studio's ability to configure the WMS provider rather than with the 
>> provider itself.  If those XML files can be read as ResourceContent, 
>> then you should be able to disable the Studio dialog for WMS, upload 
>> the content through the generic UI, and be off to the races with 
>> multi-layer sources, transparency, etc, etc.
>> 
>> Then we'll just have to wait for Studio to catch up with the 
>> capabilities of the WMS provider, or add some custom dialogs to Web 
>> Studio to support these additional items.
>> 
>> Jason
>> 
>> 
>> -----Original Message-----
>> From: Chris Tweedie
>> Subject: [fdo-users] General FDO queries
>> 
>> Hey guys, I have quite a few queries after diving into the FDO code. I
> 
>> am certainly not a C guru, but have at least gotten 3.2.2 compiled 
>> from source! This is leading on from a post i sent to mapguide-users a
> 
>> few weeks back but have since gotten my hands a lot more dirty.
>> 
>> First and foremost ... what is the relationship between the Autodesk 
>> Mapguide Studio FDO and the OSS Mapguide Server FDO? If i build a new 
>> provider, does Studio need to reference it also? I am really at a loss
> 
>> how the two co-exist at the moment. I am looking to modify in 
>> particular the FDOWMS Layer configuration dialogs but are at a loss
> where to start.
>> I was initially thinking that the dialog's are created from the server
> 
>> FDO but now i'm not so sure (perhaps these bugs lie with Autodesk and 
>> not FDO??). Most of the following points are connected to the Studio 
>> interface as this is what we need to change (although any workarounds 
>> will be gratefully accepted!).
>> 
>> 1. Remove dependancy on all WMS layers being image/png and allow the 
>> client to choose an appropriate type from a dropdown of supported 
>> formats. (See FDOWmsConnection.cpp Ln 657). The comments mention this 
>> can be changed in the "FDO WMS Configuration file" ... where is this 
>> magical file??
>> 
>> 2. Use layer->GetTitle instead of layer->GetName when populating the 
>> Studio "featureclass" dropdown. Currently you can expect a nice list 
>> of say WMS_Schema:LayerID which isn't as helpful as the title. Minor 
>> fix i'm sure.
>> 
>> 3. Moving on from 2), make the featureclass dropdown a multi-select
> box.
>> I'm not sure what the correct term is, but basically you should be 
>> allowed to select multiple WMS layers to form a mapguide "layer".
>> Currently this is not possible as its a 1:1 relationship. From what i 
>> can see in the code, it makes allowances for multiples in the CURL 
>> request code so it appears to be a matter of modifying the interface??
>> (see FdoWmsGetMap.cpp Ln 135)
>> 
>> 4. Add a transparent checkbox to the config. If the user selects say 
>> image/png or image/gif, give them the option of toggling the 
>> TRANSPARENT KVP that is used to build the request URL. Currently its 
>> hardcoded to false. Argh! (see FdoWMSGetMap.cpp Ln 32)
>> 
>> If someone could explain how the Studio builds the dialogs i am 
>> confident i could fudge my way through fixing the afore-mentioned 
>> annoyances.
>> 
>> Cheers,
>> 
>> --
>> Chris Tweedie
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
--
Chris Tweedie



More information about the mapguide-users mailing list