[mapguide-users] Changing existing dynamic layer's Filter on the fly

2007-11-15 Thread Maksim Sestic
I think I'm having problems with changing existing dynamic layer's Filter property (the one that filters data from FeatureSource) using .NET. Here's the approach that doesn't report any error, but when I refresh the map there are no changes to the layer - new filter doesn't get applied. Dim

Re: [mapguide-users] Changing existing dynamic layer's Filter on the fly

2007-11-15 Thread Kenneth, GEOGRAF A/S
When the MapDefinition is turned into a runtime Map, it copies properties from the layerdefinition. This means that you will see no changes, even if you choose to modify the LayerDefinition. You must modify the layer copy in the runtime map. Fortunately, that is actually easier than what you

Re: [mapguide-users] Changing existing dynamic layer's Filter on the fly

2007-11-15 Thread Maksim Sestic
This layer removal thingy is funny. Could anyone, plese, explain what's going on here? === This works: Dim layerName as String = TestLayer Dim map As MgMap = ...get active MgMap from session... Dim layerCol As MgLayerCollection = map.GetLayers() Dim layerToRemove As MgLayer = Nothing For Each

Re: [mapguide-users] Changing existing dynamic layer's Filter on the fly

2007-11-15 Thread Kenneth, GEOGRAF A/S
Hmm, I see. I am using an alternative API that has those properties, so I didn't verify that the properties were actually exposed. Regards, Kenneth, GEOGRAF A/S Maksim Sestic skrev: Hi Kenneth, It would be much easier if MgLayer had Filter property in first place :-) Alas, it doesn't (MGE

Re: [mapguide-users] Changing existing dynamic layer's Filter on the fly

2007-11-15 Thread Maksim Sestic
Hi Kenneth, It would be much easier if MgLayer had Filter property in first place :-) Alas, it doesn't (MGE 2008). It has FeatureSourceId and FeatureClassName properties, though, but not Filter property (and I have no clue why's that, probably somebody forgot to expose it). So I guess I still