Hi,

Thanks for the note. I've cc'd the floatcanvas list, so as to get this
in the archives.

On Fri, Jan 20, 2012 at 3:21 AM, Simfake Fake <[email protected]> wrote:
> Just emailing to say how much I like floatcanvas. It's let me relatively
> easily display tiles from open street map and plot  a marker at a point on
> that map. I'm mostly using the example provided in the wxPython 2.8.1 demos
> to make my program.

I hope you've taken a look at the demos in SVN, too -- there are a
bunch more! Myabe I should have those put with the wxPython demo...
hmmm.

> Having (0, 0) at the center of the screen,

actually, it's not at the center -- it is wherever your data and
zoom+pan level need it to be.

> along with the proper use of the
> cartesian coordinate system (y + as you move up the screen) was slightly
> disorientating at first.

Kind of ironic, really -- as that's one of the key points of
floatcanvas -- most of the data we all deal with is in y-up cartesian
coordinates. But I can see if you've been thinking bitmap drawing,
you'd be used to something else.


> Additionally, when not using addScaledBitmap, the
> bitmaps have a tendency to disappear as soon as they move slightly off the
> edge.

yes, that's because without scaleing, there is no way to know what the
bounding box of the bitmap is in world coordinates, so when the
reference point is out of the viewport -- they aren't drawn. The trick
here is that the bounding box check to see if an object should be
drawn is done by the canvas, not the object. That may need to be
re-factored -- it would be a tiny bit slower, but probably not
anything anyone would notice.

> Here is a link to my project.
> http://laptimer.git.sourceforge.net/git/gitweb.cgi?p=laptimer/laptimer;a=blob;f=awesomeSauce/mapView.py;h=23ed26e5ef1a7e3d3a5e96030e73419fc4e6b3ca;hb=a607c9e

Thanks -- I may post that on the floatcanvas page, if you don't mind.

I have had in mind a tiled image draw object for a while -- nice to
see it done. Do you think your implementation is generic enough to
include with the lib?

I haven't had a chance to look at it much, but I'm wondering how you
handled the projection -- OSM tiles use spherical, mercator, yes? But
FloatCanvas can't handle that (though it should...) did you project
all the coords of your data first?

Thanks for the note,

-Chris

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to