Display a symbol on map.center point

Display a symbol on map.center point 
Tags: General Topics

Mar 8 2007 at 12:00 AM
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 8 2007 at 12:55 AM
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 9: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 11: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
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值