Display a symbol on map.center point

Topics: General Topics
Mar 7, 2007 at 4:00 PM
Hiya,

Is there any way to put a symbol at the map center, to show that it is the user position?

I thought I could work like that:

Dim myUserLayer As SharpMap.Layers.VectorLayer = New SharpMap.Layers.VectorLayer("User")

myUserLayer.DataSource = New SharpMap.Data.Providers.GeometryProvider(New SharpMap.Geometries.Point(usersymboltestX, usersysmboltestY))
myUserLayer.Style.Fill = New System.Drawing.SolidBrush(Drawing.Color.Green)
myUserLayer.Style.Outline = New Pen(Color.Green)
myUserLayer.Style.EnableOutline = True
myUserLayer.Style.SymbolScale = 1
myUserLayer.Style.Symbol = New Drawing.Bitmap("programme\\Merlin\\System\\Controls\\icon\\poi.jpg")

Maybe someone here has some ideas. Any hint will be welcome.

Cheers
Madison

PS: I'm developing for Pocket PC 2003 and I’m not working with the new SharpMap version but with an older compact framework version of SharpMap.
Mar 7, 2007 at 4:55 PM
Hi!

I assume you wish to keep the center of the map selected even as you move the map? In this case using layers would not bee a good choice as the center of the map is constantly shifting.
Just draw your map using sharpmap and then draw your bitmap over the map yourself.
In case I'm missing something here SharpMap.Map.Center returns the current center of the map.

Goran
Mar 16, 2007 at 2:37 PM
Hi Goran,

Thank you very much for pointing that out. I didn't even think of it. So, I just put a pictureBox in the center of the map, drew some ellipses and assigned them to the picturebox. Those ellipses not only mark the center of the map, but my gps position, too, which I assigned as the center point.

Cheers
Madison
May 15, 2007 at 4:10 AM

Madison wrote:
Hi Goran,

Thank you very much for pointing that out. I didn't even think of it. So, I just put a pictureBox in the center of the map, drew some ellipses and assigned them to the picturebox. Those ellipses not only mark the center of the map, but my gps position, too, which I assigned as the center point.

Cheers
Madison


Hi Madison,
Any luck with pointing the image on the map ? could you post your code, i need to display the image on my map..

Thank you
Seth Bourne