I am using DotSpatial 1.7 in my win form app. I have an image (original image) downloaded from Universal Map Downloder and then loaded this file with a shapefile in QGIS and then georeferencing the image in QGIS using shapefile to produce an image that matches with shapefile (modified image).
Now: I used code below to load two files in my app (shapefile and original image) and it works well and I can select the shapefile:
private void Form1_Load(object sender, EventArgs e)
{
map1.AddLayer(@"C:\originalimage.png");
map1.AddLayer(@"C:\shapefile.shp");
MapPolygonLayer polygonLayer = default(MapPolygonLayer);
polygonLayer = (MapPolygonLayer)map1.Layers[1];
polygonLayer.Symbolizer = new PolygonSymbolizer(Color.FromArgb(0, Color.White), Color.DeepSkyBlue);
map1.FunctionMode = FunctionMode.Select;
}
But, the code below:
private void Form1_Load(object sender, EventArgs e)
{
//map1.AddLayer(@"C:\originalimage.png");
map1.AddLayer(@"C:\modifiedimage.tiff");
map1.AddLayer(@"C:\shapefile.shp");
MapPolygonLayer polygonLayer = default(MapPolygonLayer);
polygonLayer = (MapPolygonLayer)map1.Layers[1];
polygonLayer.Symbolizer = new PolygonSymbolizer(Color.FromArgb(0, Color.White), Color.DeepSkyBlue);
map1.FunctionMode = FunctionMode.Select;
}
I can not select the shapefile (modified image is on the shapefile ). I also convert the .tiff to .png, but it is on the shapefile.
Any idea/solution?