ThinkGeo.com    |     Documentation    |     Premium Support

Raster image overlaying on winforms map

Hi,

I am trying to overlay a .jpg image on winforms map using GdiPlusRasterLayer class… but either i am getting some distortion or some parameter issue in testing machine…

And i wanted to know the difference between following two lines…

  1. GdiPlusRasterLayer rasterLightening = new GdiPlusRasterLayer(Application.StartupPath + @"\Data\as.jpg",_proj.ConvertToExternalProjection(new RectangleShape(-180, 90, 179, -89)));

  2. GdiPlusRasterLayer rasterLightening = new GdiPlusRasterLayer(Application.StartupPath + @"\Data\as.jpg",new RectangleShape(-180, 90, 179, -89));
    rasterLightening.ImageSource.Projection = _proj;

Please help me on this…

Thanks,
Ashok

Hi Ashok,

What’s the problem using your code? Does that the jpg file don’t rendered succeed?

I think you need set the mapunit to decimal degree for your code 1 and make sure your layer had been added into map.

So, please provide us more information or directly upload your jpg file, we can help you look into this.

Regards,

Don