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

transform from map geometry to control coordinate

Topics: SharpMap v0.9 / v1.x, SharpMap v2.0, Web Controls
Nov 26, 2010 at 10:45 AM


i want to implement a tooltip in my map like google.this means a label that is dynamic and when your mouse is over this label,tooltip raise and show information.

now,i don't know how transform the geometry of a place or element in my map to AjaxMap control coordinate and when i pan the map these labels doesn't change their positions.

check this example to understand my problem:

for example (50.97048 , 35.8568) is the geometry of map,and i want to know what is this geometry  in the control box? => (AjaxMap control: ?px,?px )

thanks alot.


Nov 29, 2010 at 9:13 AM

hello shahin_sharifi,

the SharpMap.Map object has two utility functions:

  • ImageToWorld and
  • WorldToImage

These can help you to transform the coordinates the way you want. The Image Coordinates are always relative to the top left corner, keep that in mind if you think the results are wrong.

Hth FObermaier


Dec 2, 2010 at 12:04 PM
Edited Dec 2, 2010 at 12:07 PM

hi FObermaier,

thanks for your answer.i found a post in discussions about "Added Markers on web map but not able to move them" that has a relation with my problem.

Its writer is inactive now,and i can't ask from you have any example about this approach? do you test his solution?

this link is:

Dec 2, 2010 at 1:46 PM
Edited Dec 2, 2010 at 2:32 PM

Hello shahin sharifi,

I am not at all a web guy, I have no idea where those code snipplets belong in order to make it work. Sorry

At this place you may find what you are looking for:


Dec 2, 2010 at 2:55 PM

thank you