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

How Can I continuously render world map

Topics: Algorithms, SharpMap Project, SharpMap v0.9 / v1.x, WinForms Controls
May 23, 2008 at 8:54 AM
Edited May 23, 2008 at 8:55 AM
        Hi, I'am a newer to learn SharpMap, and create my desktop project which renders world map.
        Now, I meet a problem. Defaultly SharpMap render word map from 180W to 180E in longtitude. How can I joint the map, so I can continuously drag it.
May 25, 2008 at 11:09 AM
Sorry for my poor English.
Do I confuse everybody.
May 26, 2008 at 2:59 AM
Edited May 26, 2008 at 3:00 AM
@paradin -

Not a lack of understanding, just a lack of time.

We currently don't have native support for this, but Odegaard suggested a workaround in the workitem we opened for it.
May 26, 2008 at 4:15 AM
Thank you!
In my apprehension, the point is that SharpMap bases on "map coordinate" but "view coordinate" when renders map.
May 26, 2008 at 7:18 AM
That is correct, it transforms world coordinates to a view coordinate system.
May 26, 2008 at 8:43 AM
The effect of is good.
May 26, 2008 at 9:15 AM
Yes, it is.

But SharpMap doesn't do that out of the box. You'll need to code it. Perhaps you can use the workaround described in the work item I linked to in my earlier post.
May 26, 2008 at 10:27 AM
Thanks again!
I'll post my solution when I resolve it.
May 28, 2008 at 2:17 AM
Under the idea "creating two separate images and stitching them together". I Modified the Map.GetMap() , and added Map.GetMap(Point center) .
When the left or right boundary of view window move out of the flat world map, I render two map, which I called LImage with self LCenter and RImage with self RCenter. Then I stitch the LImage and RImage, and transform the coordinate in reality.

May 28, 2008 at 5:31 AM
Well done!

Your work is a good example that when a developer tries to do something with SharpMap, even if not familiar with it, they can pull it off with some effort. Of course, you did it pretty quickly, so you do seem to have a knack for it... thanks for sharing your results.
May 28, 2008 at 6:02 AM
Hi paradin, codekaizen !
There have been a kind of google's map. I  coded a function to render images with this method in sharpmap, and i was successful.
We are very silly if  we render images directly  to web page.
I will create a thread for that.