Aug 22, 2011 at 10:14 PM
Edited Aug 22, 2011 at 10:15 PM

Hi ,

 there is a way to don't add label when a collision detection occurs ??


Aug 24, 2011 at 2:01 PM
Edited Aug 24, 2011 at 4:50 PM

i have make some test with collisiondectection but i did'nt see any change

i have test with 

 style.CollisionDetection = true;
style.CollisionBuffer = new SizeF(2000000f,2000000f);

LayerBatimentLabel.LabelFilter = SharpMap.Rendering.LabelCollisionDetection.ThoroughCollisionDetection;










Aug 29, 2011 at 6:39 PM
Edited Aug 29, 2011 at 6:40 PM

i have find this way a way to do.

i have set this variable in my custom them function

style.CollisionDetection = true; 
style.CollisionBuffer = new SizeF(4f, 4f); 

and when i make the layer i need to assign 
the CollisionDetection at true too.
if i did'nt assign the CollisionDetection boolean twice that dont work and this work without the priority setting.
Aug 29, 2011 at 10:53 PM

Ah, ok you are working with a CustomTheme.... there are inconsistencies in the LabelLayer.Render method regarding the use of Style (property of the label layer) and style (evaluated by ITheme.GetStyle method).

Hth FObermaier