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

'Bubble-like' labels in SharpMap?

Topics: SharpMap v0.9 / v1.x, WinForms Controls
Jun 30, 2011 at 2:39 PM
Edited Jun 30, 2011 at 2:44 PM

Is it possible create labels like on GoogleMaps like these?

(I don't know which is the right English term for it, I use bubble-label)

Thx: Tamas

Jun 30, 2011 at 4:58 PM

You need to create a CustomTheme and apply that to your puntal layer.

In the GetStyle method you need to create the bitmap symbol yourself, by measuring the icon, creating a bitmap that is e.g. twice the size of the icon, rendering the bubble to it an placing the icon above. Then you neet to set the appropriate offset value.

If all your icons are the same size, you can save time with prerendering the bubble image and just blitting the bubble and the icon together.

THere are samples using CustomTheme class in the WinFormSamples project

Hth FObermaier