ThinkGeo.com    |     Documentation    |     Premium Support

Valuestyle with different columns

I wonder if it´s possible to use the valuestyle with different columns, I mean to use the field1 and field2 assigning a different style for that combination of values. You have some example?

Thanks in advance.

Hi Julieta_h
I think you can create a class that inherits from ValueStyle, you can customize the rules to assign a different style in the class.
Here is a sample shows how to inherit our style class. wpfeditionsample_defaultvaluestyle_cs_110218.zip (23.7 KB) Also you can get this sample from Product Center, as shown below:

If this is important for you, please create a ticket with more details, we will spend more time on this.
Any question please feel free to let us know.

Thanks,
Emil

It works! thanks very much!

Hi Julieta,

Very glad to here it works.

Thanks,
Peter

Hello Peter,
we have implemented the example with ValueStyle that you´ve sent to me, but now we have a problem:
1.- We are using msSql2008FeatureLayer, about 150,000 records, it takes about 1 minute to draw the points on map
2- On every change of extend or zoom it takes several seconds to redraw the objects
3.- If the drawing is not completed yet and the user clicks on the map for any action it throws an exception “There is already an open datareader associated with this command wich must be closed first”.

How can we know if drawing is still in progress or finished? Do you have an example?

Thanks in advance.

Hi Julieta,

From your description, it looks the slow is because the query speed, I am not sure whether your database is in the same machine with your application, so maybe there is another network speed problem here. If you want to enhancement the performance, please try to find where is the mainly problem so we can give you some advice about it.

MsSql2008FeatureLayer is a special layer, it have its own event, you can double check the request it sent here:
(msSql2008FeatureLayer.FeatureSource as MsSql2008FeatureSource).ExecutingSqlStatement

And it don’t have a event for let map know whether progress finished, but maybe this event as below should be helpful:
(msSql2008FeatureLayer.FeatureSource as MsSql2008FeatureSource).DrawingProgressChanged

I think you can try to build your logic based on it.

Regards,

Don