ThinkGeo.com    |     Documentation    |     Premium Support

ImageLayer

Hi,


I have a product developed using MapSuite desktop ver. 200, am trying to upgrade it to use MapSuite desktop ver. 3.  In the product, I had some ImageLayers and set their keys in the program, but could not find the ImageLayer in ver 3. beta, tried to use GdiPlusRasterLayer, but could not set the Key any more.


Will Map Suite Desktop Edition 3 support the ImageLayer?


I found it is a pain to upgrade the product developed using ver 2.0  to  use ver.3.  For example, the Map1.CanvasColor is replace by backcolor; The Geometry namespace is gone, PointR is gone...etc, etc. What is the replacement of PointR, RectangleR in ver 3?


Is there a easy way to do this upgrade?


Rose


 



Rose, 



ImageLayer is replaced by RasterLayer in 3.0. Not only GdiPlusRasterLayer, we also have MrSidRasterLayer, Jpeg2000RasterLayer, etc. You can also set a key for raster layer, for example, in 2.0, here is how to add an image layer. 


Dim imageLayer As New ImageLayer()
map1.ImageLayers.Add("imageLayer", imageLayer)  

and in 3.0, it is like this: 

 
Dim gdiPlusRasterLayer As New GdiPlusRasterLayer()
winformsMap1.StaticOverlay.Layers.Add("gdiPlusRasterLayer", gdiPlusRasterLayer)  

PointR / RectangleR in 2.0 are light weight (they are struct instead of class) types, in 3.0 we have the struct “Vertex” which is similar like PointR, we don't have the corresponding one to RectangleR though as we found there are too many properties within a RectangleR to be a light weight type. You can use the class RectangleShape instead. 



Frankly speaking, there is no easy ways for the upgrading. Map Suite 3.0 is a revolutional product which has many improvements, we can hardly involve all the great features while at the same time make it compatible with 2.0. Sorry for the inconvenience for the upgrading, but I'm sure after that short pain, you will find with 3.0 your application is more extensible and powerful. 



Thanks, 



Ben