[mapguide-users] Can't GenerateFilter on newly added features
Bruno Scott
bscott at geomapgis.com
Mon Apr 23 11:25:00 EDT 2007
I have found my problem.
2 things
1) Identation of the xml layer definition, if we do not respect some form
of identation, it produces weird things
// Create a line rule to stylize the lines
string layerDefinition = "";
layerDefinition += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
layerDefinition += "<LayerDefinition version=\"1.0.0\" ...>";
layerDefinition += " <VectorLayerDefinition>\n";
layerDefinition += " <ResourceId>" + featureSourceName +
"</ResourceId>\n";
layerDefinition += " <FeatureName>SHP_Schema:" + layerName +
"</FeatureName>\n";
layerDefinition += "
<FeatureNameType>FeatureClass</FeatureNameType>\n";
layerDefinition += " <Geometry>" + geometryPropertyName +
"</Geometry>\n";
layerDefinition += " <VectorScaleRange>\n";
layerDefinition += " <MinScale>0</MinScale>\n";
layerDefinition += " <MaxScale>1000000000000</MaxScale>\n";
layerDefinition += " <LineTypeStyle>\n";
layerDefinition += " <LineRule>\n";
layerDefinition += " <LegendLabel>Lines
Rule</LegendLabel>\n";
layerDefinition += " <Filter></Filter>\n";
layerDefinition += " <LineSymbolization2D>\n";
layerDefinition += " <LineStyle>Solid</LineStyle>\n";
layerDefinition += " <Thickness>2</Thickness>\n";
layerDefinition += " <Color>FFFF00FF</Color>\n";
layerDefinition += " <Unit>Points</Unit>\n";
layerDefinition += " </LineSymbolization2D>\n";
layerDefinition += " </LineRule>\n";
layerDefinition += " </LineTypeStyle>\n";
layerDefinition += " </VectorScaleRange>\n";
layerDefinition += " </VectorLayerDefinition>\n";
layerDefinition += "</LayerDefinition>\n";
2)
I was using MgBaseLayer class instead of MgLayer.
When doing this, everithing seems to works fine except that the
generatefilter does not work
Bruno Scott wrote:
>
> I've build a small redlining application following the DevGuide samples.
> So i create a new FeatureDefinition
> then i insert my features in it
> then i create a new layer and add it to the map.
>
> This thing works pretty well
> Since i have set my layer as selectable i can select any of my redlines
>
> The thing i want to implement is the possibility to delete a single
> redline feature.
> So i get the selectionXML from the viewer and i pass it to an server page
> to delete it.
> when i do
> 'string filter = selection.GenerateFilter(layer, layerClassName);'
> my filter is allways empty...
>
> I have suspected a wrong sdf...
> So i created manually a new layer in studio and i have added my sdf
> On this new layer, i have no problem generating the layer...
> This meens that my sdf is OK.
>
>
> Anyone have an idea on what's happening?
>
> Thanks
> Bruno
>
>
--
View this message in context: http://www.nabble.com/Can%27t-GenerateFilter-on-newly-added-features-tf3553044s16610.html#a10142568
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list