[mapguide-users] How to prepare the unmanaged feature source?

Carl carlshe at 163.com
Thu Sep 20 11:31:41 EDT 2007


OK. It works. Thank everybody.


Kenneth, GEOGRAF A/S wrote:
> 
> That won't work.
> The filename  "[CADFiles]PrjLines.sdf" is not valid.
> 
> Try something like C:\CadFiles\PrjLines.sdf", and adjust to the actual 
> location.
> 
> Regards, Kenneth, GEOGRAF A/S
> 
> 
> 
> Carl skrev:
>> I have download a featuresource xml and modified it as follows.
>>
>> <?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</Provider> 
>> <Parameter>
>>   <Name>File</Name> 
>>   <Value>[CADFiles]PrjLines.sdf</Value> 
>>   </Parameter>
>> <Parameter>
>>   <Name>ReadOnly</Name> 
>>   <Value>TRUE</Value> 
>>   </Parameter>
>>   </FeatureSource>
>>
>>
>> Then I upload the new xml with mapagent. But the feature can't be shown
>> with
>> MG OS 1.2. When visiting the layer defined based on this feature with
>> Asdk
>> Studio 2007,  a popup is shown with:
>>
>>   The featuresource is invalid.
>>   An exception occured in FDO Component.
>>   SDF connect failed. File doesnot exist or cannot be opened in specified
>> access mode.
>>
>>
>>
>>
>> Kenneth, GEOGRAF A/S wrote:
>>   
>>> To get the actual mapping for an existing featuresource, you can 
>>> download the Xml for an existing FeatureSource, either in Studio or 
>>> through the http interface:
>>> http://localhost/mapguide/mapagent/index.html
>>> Choose the "Resource" and "GetResourceContent"
>>>
>>> The "unmanaged" refers to the fact that the resource files are not 
>>> inside the repository.
>>> So, to make the featuresource unmanaged, modify one of the [Parameter 
>>> Value] strings to point to an external datasource.
>>>
>>> Regards, Kenneth, GEOGRAF A/S
>>>
>>>
>>>
>>> Jackie Ng skrev:
>>>     
>>>> A basic FeatureSource document looks like something below...
>>>>
>>>> <?xml version="1.0"?>
>>>> <FeatureSource xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
>>>>      <Provider>[Name of the provider]</Provider>
>>>>      <Parameter>
>>>>            <Name>[Connection Parameter]</Name>
>>>>            <Value>[Parameter Value]</Value>
>>>>      </Parameter>
>>>>      <Parameter>
>>>>            <Name>[Connection Parameter]</Name>
>>>>            <Value>[Parameter Value]</Value>
>>>>      </Parameter>
>>>>      <Parameter>
>>>>            <Name>[Connection Parameter]</Name>
>>>>            <Value>[Parameter Value]</Value>
>>>>      </Parameter>
>>>>      ....
>>>> </FeatureSource>
>>>>
>>>> [Name of the provider] is the name of the provider (eg. OSGeo.SDF,
>>>> OSGeo.SHP, etc)
>>>>
>>>> To determine what parameters are required. invoke the
>>>> GetConnectPropertyValues of the Feature Service in your mapagent.
>>>>
>>>> - Jackie
>>>>
>>>>
>>>> Carl wrote:
>>>>   
>>>>       
>>>>> Can somebody share a XML example of an unmanaged feature source
>>>>> definition?
>>>>>
>>>>>
>>>>> Kenneth, GEOGRAF A/S wrote:
>>>>>     
>>>>>         
>>>>>> Afaik, there is no template.
>>>>>> To use the "unmanaged feature source" feature, you must have a server
>>>>>> of 
>>>>>> build 1.2 or greater (Enterprise 2008 is roughly 1.2 Beta2).
>>>>>> Sencondly the unmanaged feature is avalible but not displayed in
>>>>>> Studio 
>>>>>> 2007.
>>>>>> You will have to upgrade if you want it displayed in Studio.
>>>>>>
>>>>>> You can setup an unmanaged directory, using the "Site Administrator" 
>>>>>> (there is a menu for opening the site administrator in Studio).
>>>>>> Once the folder is setup, you can use it from within Studio 2008.
>>>>>>
>>>>>> If you use Studio 2007, you must manually edit the FeatureSource xml 
>>>>>> file, and change the path to something like:
>>>>>> %MG_DATA_PATH_ALIAS[name of alias]%/name of datafile.sdf
>>>>>>
>>>>>> You will probably have to restart both the server and studio if you
>>>>>> add 
>>>>>> or remove an alias.
>>>>>>
>>>>>> If you don't want the alias option, but just reference data outside
>>>>>> of 
>>>>>> the repository, you can manually edit the FeatureSource xml, to point
>>>>>> at 
>>>>>> the correct data.
>>>>>>
>>>>>> Regards, Kenneth, GEOGRAF A/S
>>>>>>
>>>>>>
>>>>>>
>>>>>> Carl skrev:
>>>>>>       
>>>>>>           
>>>>>>> Where I can find the template of unmanaged featuresource, or layer?
>>>>>>>   
>>>>>>>         
>>>>>>>             
>>>>>> _______________________________________________
>>>>>> 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
>>>
>>>
>>>     
>>
>>   
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-prepare-the-unmanaged-feature-source--tf4408812s16610.html#a12799640
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list