ThinkGeo.com    |     Documentation    |     Premium Support

Upgrade to 10.0 Issues

I’m upgrading WebEdition from 9.x to 10.x. My usages of ThinkGeo are (1) I have an interactive map with the Map control, and (2) I also let the user generate an image to a static image file, which happens in my C# code not inside the Map control, which I used MapEngine for. Both of these have an IsoLine layer and marker layers, and labels. I allow the user to switch between Google, Bing, and OpenStreetMaps background layers.

I removed WebEdition.dll, and other references from my projects. Then I added Nuget packages for the following:
MapSuiteWebForWebForms-BareBone
ThinkGeo.MapSuite
ThinkGeo.MapSuite.Layers.Adornments
ThinkGeo.MapSuite.Layers.BingMaps
ThinkGeo.MapSuite.Layers.GoogleMaps
ThinkGeo.MapSuite.Layers.OpenStreetMap
ThinkGeo.MapSuite.Layers.ProductCenter (this was added automatically as dependency)

For the most part, I was able to get most of my code compiling by changing namespaces as mentioned in the upgrade guide (http://wiki.thinkgeo.com/wiki/map_suite_10_upgrade_guide).
However, I can’t figure out the following issues:

  1. ClassBreakStyle and ClassBreak classes. Where are these now?

  2. MapEngine. I realize this class has been removed. But how do I achieve the same functionality? See my example code below:

         var mapEngine = new MapEngine();
         var layer = GetBackgroundLayer();
         mapEngine.CurrentExtent = extent;
         mapEngine.StaticLayers.Add(layer);
         // .... a bunch of code to generate isoLineLayer and labelLayer
         mapEngine.StaticLayers.Add(isoLineLayer);
         mapEngine.StaticLayers.Add(labelLayer);
         var bitmap = new Bitmap(width, height);
         mapEngine.OpenAllLayers();
         mapEngine.DrawStaticLayers(bitmap, GeographyUnit.Meter);
         mapEngine.DrawDynamicLayers(bitmap, GeographyUnit.Meter);
         mapEngine.CloseAllLayers();
    

Please let me know if I’ve imported the correct Nuget packages, of if I’m missing something. Thank you.

Hi Randy,

  1. You can find the ClassBreakStyle and ClassBreak here:https://www.nuget.org/packages/ThinkGeo.MapSuite.Styles.ClassBreak/11.0.0-beta007

Please add using ThinkGeo.MapSuite.Styles; before your code.

In fact you can search in Nuget like this: “MapSuite classbreak” and you can find that, all special layers and styles is separated package in Nuget now.

  1. The MapEngine is our old service edition, it can only works when you want to draw map in image, for V10 we removed it from our product, if you are using WebEdition, directly add layer in overlay, then add overlay in map, the map will be drawn in map control. If your scenario still need to use MapEngine, please view the code of MapEngine here: http://wiki.thinkgeo.com/wiki/_media/mapengine.zip

And I think this topic should be helpful: How do i save the map as image in thinkgeo 10?

Regards,

Ethan

Ok, I have it basically working, but now am getting the white map with “Not Licensed for Runtime” error message. It actually worked a few times and then started failing with this error. This is on my dev machine.

I read the deployment and licensing info here:
http://wiki.thinkgeo.com/wiki/map_suite_license_guide#thinkgeomapsuite_for_web_webforms_mvc_webapi
http://wiki.thinkgeo.com/wiki/map_suite_deployment_license_guide_for_web

But I am still unsure what I need to do. I think I understand what I need for the production runtime, but how do I get my developer machine working?

Thanks,
Randy

Hi Randy,

For make your development machine works, you should want to upgrade the ProductCenter package to the latest version(include prerelease). Then you can find the ProductCenter.exe in your bin folder, directly run it, login your account, active your product(For example web eidtion).

Then delete all cache you set in your application, clear browser cache, and run your project again, that should works now.

If you still met problem please let us know.

Regards,

Ethan

It seems to be working now. On my developer machine it sometimes shows the “Not Licensed for Run Time” on the map but it is still usable for development. The licensing seems sporadic on dev machine, but as long as the production server works correctly without watermark I will be ok.

Hi Randy,

“Not Licensed for Run Time” should be from our deployment license but not development license. If you want to test runtime license, please just generate that from our product center like the guide shows. And we suggest you test deployment license in another machine but not in your development machine.

If you update the license file for deployment environment, please recycle the application pool and delete all the cache files.

Wish that’s helpful.

Regards,

Ethan