Conversion from SharpMap coords to Lat/lon's

Topics: Data Access, SharpMap v0.9 / v1.x
Nov 3, 2007 at 8:31 PM
Hi to all,

let me first say that I really appreciate your fantastic project!

Dealing with it for two days there raised a question:

I want to search for certain "world points" out of a database which stores places in lat/lon points.

So I create a map, zoom to a certain rectangle and depending on that bounding coordinates (points) I want to retrieve all lat/lon corresponding data belonging to the specific region - so to populate the map.

Can you give me a hint, please!

Mike

Coordinator
Nov 5, 2007 at 4:00 PM
Hi mikesb -

I'm a bit curious on the flow of your scenario. To paraphrase, it looks like you have queried all of your data in order to display a map, and then zoom and query again?

You're using v1.0?
Nov 5, 2007 at 7:47 PM
Hi codekaizen,

I must apologize for asking so soon :-)

Meanwhile I've got acquainted with SharpMap a little bit more and finally found what I am looking for. Didn't expect that SharpMap 0.9 is as comfortable as it is ...

All I demanded is implemented - just use a database source. That I did and all went as I expected!

Thank you for your reply anyway!

Ah ok - one more question: Before seeking - are there some lines of code for panning a (zoomed) clipped area and reload the needed corresponding data?

Thanx again

Mike
Coordinator
Nov 5, 2007 at 7:52 PM
In v1.0 you'll have to do the pan and re-query yourself (although it isn't hard).

In v2.0, this is handled by the FeatureDataTable's interaction with the FeatureLayer by raising an event than the data needs to be requeried, which makes it even easier, and allows some sophisticated caching patterns to speed up map rendering greatly.
Nov 5, 2007 at 8:00 PM
ok - I will do it by myself and will wait for 2.0

Mike
Coordinator
Nov 5, 2007 at 8:04 PM
You could try 2.0 Beta 1... ;)

Or does Beta 1 sound too unfit?
Nov 5, 2007 at 9:06 PM
Edited Nov 5, 2007 at 9:07 PM
No it seems to be not unfit - the only one being unfit is me ...

I experienced that some Classes/Structures have changed and as I am keen getting a working result and as I know a little bit of V1.0 which I could install to run and let it work but totally know nothing about V 2.0 I decided to do it by V1.0 now.

Onbviously 2.0 is really better, indeed - no manual need to code a rubber band - a silly but not uninteresting point to me ;-)

Mike

P.S. If you can give me some hints about moving towards 2.0 or to use more/other functionality - assuming you have the time to do it - I really would appreciate that!