Display a symbol on map. center point
Tags: General Topics
MadisonMar 8 2007At 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 cocould 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. |
|
|
GoranMar 8 2007At 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 wocould 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 |
|
|
MadisonMar 16 2007At 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 |
|
|
SethbourneMay 15 2007At 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? Cocould you post your code, I need to display the image on my map .. Thank you Seth Bourne |
|