[mapguide-users] try to update SDF FeatureSource...my codedon'twork.

Maciej Skorczewski maciej.skorczewski at procad.pl
Wed Apr 11 12:48:15 EDT 2007


hi andrea !

some time ago i have ask about this problem.
i have make it.

check mailing list again.

http://www.nabble.com/try-to-update-SDF-FeatureSource...my-code-don%27t-work.-tf3333895s16610.html#a9315211

ps. you should use
http://127.0.0.1:8008/mapguide/mapagent/

and add some xml files (source of it is on mailing list)
search it on this post

http://www.nabble.com/try-to-update-SDF-FeatureSource...my-code-don%27t-work.-tf3333895s16610.html#a9315211



andrea tiveron - metodi srl napisał(a):
> I want replace ReadOnly flag to false programmatically by code
> but my code isn't correct
> I don't know why?
> 
> here is the code:
> 
>                     // Create a filter containing the IDs of the selected
> features on this layer        
>                     $layerClassName = $layer->GetFeatureClassName();
>                     $selectionString = $selection->GenerateFilter($layer,
> $layerClassName);
>                     // Get the feature resource for the selected layer
>                     $layerFeatureId = $layer->GetFeatureSourceId();
>                     $byteReader =
> $resourceService->GetResourceContent($layerFeatureId);
>                     $strMapXML = $byteReader->ToString();
>                     $insertPoint = strpos($strMapXML,'<Value>TRUE</Value>');
>                     if ($insertPoint != '')
>                         {
>                         $content = trim(substr_replace($strMapXML,
> '<Value>FALSE</Value>', $insertPoint, 19));
>                         $resourceService->SetResource($featureSourceId,
> $content, NULL);
>                         }
> 
> andrea



-- 
Maciej Skórczewski
www.procad.pl


More information about the mapguide-users mailing list