ThinkGeo.com    |     Documentation    |     Premium Support

Serialize WMS missing IsVisible

Hi,

When I serialize the WMSRasterLayer, the resulting output does not contain an IsVisible property so I can’t set it when I reload the layer.

Regards,
Damian

Hi Damian,

As below is my test code, it looks the IsVisible works well after deserialize.

 WmsRasterLayer layer = new WmsRasterLayer();
        layer.IsVisible = false;

        GeoSerializer geoSerializer = new GeoSerializer();
        string serializeString = geoSerializer.Serialize(layer);
        WmsRasterLayer deserializelayer = geoSerializer.Deserialize(serializeString) as WmsRasterLayer;

        bool result = deserializelayer.IsVisible;

Regards,

Ethan

Hi Ethan,

Please always test against current stable release and not dev build. If not good in stable release please report fixed at x development build. It’s too confusing to see my current stable version without IsVisible and yours showing it is when you are using dev release. I didn’t report this because it wasn’t there.

As a general comment to the team, I just don’t understand why reported bugs aren’t referenced against the current stable release since that is what we will deliver to customers… please think about our position and how hard it is to want to release new code but never testing with dev release. Perhaps you could send me your unit tests so I could review and run to confirm all is well and have more confidence. I have been using Mapsuite libraries for 7 years now, which I really like, but there is a reason I am still using version 9 for release.

Regards,
Damian

Hi Damian,

For your issue, I think maybe you missed some information about it. Because in fact I tested it both for 11.x pre-build and 10.x, the result is just the same. Could you please modify my test code for reproduce it or let us know whether anything I missed?

As below is my test package information:

  <package id="MapSuiteDependency-GeoAPI" version="10.2.1" targetFramework="net45" />
 <package id="MapSuiteDependency-MicrosoftSqlServerTypes" version="10.2.1" targetFramework="net45" />
 <package id="MapSuiteDependency-MicrosoftVisualCRunTime100" version="10.2.2" targetFramework="net45" />
  <package id="MapSuiteDependency-NetTopologySuite" version="10.2.1" targetFramework="net45" />
  <package id="MapSuiteDesktopForWinForms-BareBone" version="10.2.9" targetFramework="net45" />
  <package id="ThinkGeo.MapSuite" version="10.2.9" targetFramework="net45" />
  <package id="ThinkGeo.MapSuite.Layers.ShapeFile" version="10.2.1" targetFramework="net45" />
  <package id="ThinkGeo.MapSuite.Layers.Wms" version="10.2.4" targetFramework="net45" />
  <package id="ThinkGeo.MapSuite.ProductCenter" version="10.2.1" targetFramework="net45" />
  <package id="ThinkGeo.MapSuite.Styles.WorldStreets" version="10.2.1" targetFramework="net45" />

Why we mainly focus on development is because many bugs reported by user had been fixed in development version, and we will periodically move all changes to release, this is a shorten cycle than all old versions. So if you met an issue in release, you can try to test it in latest development also, if you found it get solved there, you can wait our minor release soon after, or you can let us know it’s hurry and important for you, and our developer can look into it to see whether we can did a build a minor release only introduce this change.

And thanks for support our product so long time, I will let our manager knows about your suggestion, I think they will discuss about how to optimize our version control.

Regards,

Ethan

Hi Ethan,

Not sure about your test case. See attached serialized output to file stream. There is no IsVisible property or similar.

I think when you deserialize, the default of the IsVisible property is false because that’s what happens in my program when I reload the file even though it was visible when I saved the file.

Yes, I would really appreciate more on the version control. The current release is 10.2, but development is at 11.0. I looked at change log and bug log, but no idea what is going on between 10.2 and 11.0. And more importantly nothing about what bugs are fixed and pushed from dev back to current release.

Regards,
Damian

SavedLayer.txt (9.5 KB)

Hi Damian,

The default value of IsVisible equal true.

If it’s default value, you cannot find it in your serializeString, but you still can find the property when it get deserialized.

Please try this sample and see whether it works well in your side, in fact it’s don’t related with Winforms so I can create a console sample, but I still create a Winforms sample so we can modify it if we have further requirement about this problem.

9162.zip (11.5 KB)

Regards,

Ethan

Hi Ethan,

Sorry, I reversed my wording for the problem. When I turn the layer to isVisible = false, and then save there is no value for isVisible in the serialized file and hence on reload, the layer is always set to visible which as you say is the default behavior to be isVisible = true.

But, so far I’ve not been able to take your test project and make it do what I am observing in my more complex project. I’ll keep trying and let you know if I find the combination of actions that causes this to happen.

As proof though, have a look at the SavedLayer.txt file I attached previously.

Regards,
Damian

Hi Damian,

You can try to simplify your complex project, for example remove some class and see whether the result is the same to find where is problem.

Because if you can get the same result by my test sample, that means some other code effect the serialize result.

Regards,

Ethan