This project has moved and is read-only. For the latest updates, please go here.

Rendering One VectorLayer

Topics: SharpMap v0.9 / v1.x, WinForms Controls
Apr 24, 2014 at 1:22 PM
Edited Apr 24, 2014 at 1:22 PM
I want to refresh only one LayerCollection in Map.

The Layerstyle fills polygons with transparent Color, perhaps
Fill = new SolidBrush(Color.FromArgb(127, 0, 150, 255)),

After Refresh with

this.mapBox.Map.RenderMap(, LayerCollectionType.Static, drawMapDecorations: true, drawTransparent: true);

there is an overlay of transparency! So I see the polygon multiple times...

Sometime I Click in the Map , no Tool ist active, an the Maprefreshed Event fired. So the map has been refreshed automatically?

Can you help me?
Apr 25, 2014 at 1:22 AM
I'm not quite sure if I understand correctly, did you change some of the code in MapBox?
Apr 25, 2014 at 8:32 AM
Hello FObermaier,
there is no code changing in MapBox.
There is still a vectorlayer (Polygon) with transperency "Fill"-Color.

I want to refresh only this layer!
But I get still overlay polygons with darker transperency and so on...

Apr 28, 2014 at 1:56 PM
Edited Apr 28, 2014 at 3:22 PM
Any Ideas for this problem?
Apr 28, 2014 at 3:01 PM
So, is this related to your other post or is it independant?
Apr 28, 2014 at 3:08 PM
Edited Apr 28, 2014 at 3:17 PM
It's related, too.
The other post fires the maprefreshed-event, so the layer is drawing correct but the whole map refreshed, proble with performance.

But is there any way to refresh only one Layer in the map with transparency?
Like PartialRefresh on ESRIs ArcGIS Engine?
Apr 28, 2014 at 3:15 PM
There is nothing similar to the partial refresh in arcgis engine at the moment, this is planned for 3.0.
Apr 28, 2014 at 3:24 PM
Ok petlof, thanks. It's a pity.
And can you confirm, that mapBox.Map.RenderMap have problems with transparency?

Is there another option for refreshing one layer with transparency correctly?

Thanks a lot!
Apr 28, 2014 at 7:54 PM
I've checked in some enhancements to the mapbox control that prevent refresh because of mousemove or -click. An updated sample using solid brushes with partially transparent colors did no longer show the effect you are describing.

See #35166 and r105759.