Im’ revealing myself a bit more, I’m a user of the very old Esri Mapobjects ActiveX. After 18 years of loyal and good services, i’m intending to change it and looking of another solution. And I’m discovering MapWinGis, that’s wonderful, it can do everything that I’m expecting. My first question is about labelplacer.
In my old project we use a lot of labelplacer (Mo20.ocx)
Do you think it’s possible to have the same or something approaching ?
And it’s really fun to you GIS capabilites in a marina software. Imagine about 50 different layers over and under water.
My second question it’s was about wpf because we’re intend to use wapwingis with core.Net and we’re wondering about it?
The following code of boatname with mapobject
Dim Layer As MapLayer
Set Layer = Map1.Layers(sCouche)
If Layer Is Nothing Then Exit Sub
Dim pGroupRend As MapObjects2.GroupRenderer
Set pGroupRend = Layer.Renderer
If pGroupRend.Count > 1 Then
Exit Sub
End If
Dim LabelPlacer As New MapObjects2.LabelRenderer
Layer.Symbol.color = moYellow
' create a font to be used by the LabelPlacer
Dim fnt As New stdole.StdFont
If sCouche = COUCHE_SYMBOLES Then
fnt.Name = "EAS Seaport"
Else
fnt.Name = FONT_GRAPHIQUE
End If
fnt.Bold = True
' fnt.Size = fnt.Size / 1.5
LabelPlacer.SymbolCount = 1
LabelPlacer.Symbol(0).color = color
LabelPlacer.Symbol(0).Font = fnt
LabelPlacer.Symbol(0).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(0).VerticalAlignment = moAlignCenter
LabelPlacer.Symbol(0).ROTATION = 0
' LabelPlacer.Symbol(0).Fitted = True
LabelPlacer.field = coltext
Layer.Renderer.Add LabelPlacer
the following code for berth name
Dim Layer As MapLayer
Set Layer = Map1.Layers(COUCHE_POSTES)
If Layer Is Nothing Then Exit Sub
Dim pGroupRend As MapObjects2.GroupRenderer
Set pGroupRend = Layer.Renderer
If bVisible = False Then
Layer.RemoveRelates
If Not pGroupRend Is Nothing Then
While pGroupRend.Count > 1
pGroupRend.Remove (1)
Wend
End If
Exit Sub
End If
If pGroupRend.Count > 1 Then
Exit Sub
End If
Dim LabelPlacer As New MapObjects2.LabelRenderer
Layer.Symbol.color = moYellow
' create a font to be used by the LabelPlacer
Dim fnt As New stdole.StdFont
fnt.Name = FONT_GRAPHIQUE
fnt.Bold = True
LabelPlacer.DrawBackground = True
LabelPlacer.SymbolCount = 3
LabelPlacer.Symbol(0).color = m_GlobalClass.UserParams.ForeColor(COLOR_POSTE_NOM)
LabelPlacer.Symbol(0).Font = fnt
LabelPlacer.Symbol(0).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(0).VerticalAlignment = moAlignTop
LabelPlacer.Symbol(1).color = m_GlobalClass.UserParams.ForeColor(COLOR_POSTE_NOM)
LabelPlacer.Symbol(1).Font = fnt
LabelPlacer.Symbol(1).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(1).VerticalAlignment = moAlignBottom
LabelPlacer.Symbol(2).color = m_GlobalClass.UserParams.ForeColor(COLOR_POSTE_NOM)
LabelPlacer.Symbol(2).Font = fnt
LabelPlacer.Symbol(2).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(2).VerticalAlignment = moAlignBaseline
LabelPlacer.field = SHP_COL_LABEL
LabelPlacer.SymbolField = SHP_COL_ALIGN
LabelPlacer.RotationField = SHP_COL_ANGLE
LabelPlacer.HeightField = SHP_COL_SIZE
LabelPlacer.XOffsetField = SHP_COL_X
LabelPlacer.YOffsetField = SHP_COL_Y
Layer.Renderer.Add LabelPlacer
Last image for fun