Plans [was: Re: Gconf or GSettings? - leading to a wider question]

Dirk Hohndel dirk at hohndel.org
Tue Jan 22 15:19:59 PST 2013


"Robert C. Helling" <helling at atdotde.de> writes:

> On Jan 21, 2013, at 7:25 PM, Linus Torvalds wrote:
>
>> I'm not proud of it. It's a dirty disgusting hack, but it happens to
>> work. It makes several assumptions about the map, most notable of them
>> that the map translation is a pure cylindrical translation of
>> latitude/longitude. That happens to be right for OSM (at least the
>> form we use), so it seems to _work_, but it sure is hacky. It just
>> does a "let's try to center the map at random locations and see how
>> close we get to the target", where the "random locations" are just a
>> binary rectangular search.
>> 
>> The "binary rectangular search" is why it wouldn't work if OSM showed
>> the world using some other map projection than the purely cylindrical
>> one.
>> 
>> It also wouldn't work correctly if OSM did the right thing and wrapped
>> the world view - but again, OSM seems to do a pure rectangular mapping
>> of lat/long to x/y.
>> 
>> So this gets us the "correct" zooming behavior, but I want somebody
>> else to look at the code. If you can stand it, commit it and add my
>> sign-off. But I'll understand if anybody goes "that is too ugly to
>> live, please just nuke it from space, that's the only way to make
>> sure".
>
> here is an alternative patch that does it with a bit of algebra
> instead of the binary search.

I love having people on this list who write responses like this.

Seriously!

> There is just one awkward problem: It should do nothing when trying to
> scroll out from minimal zoom or scroll in from maximal zoom. My
> understanding of
> http://nzjrs.github.com/osm-gps-map/docs/reference/html/OsmGpsMap.html#OsmGpsMap.properties
> is that there are "properties" zoom, max-zoom, min-zoom of the map
> widget that should allow to test these cases. Unfortunately, my gtk
> knowledge is not existent and I have not managed to obtain these. This
> needs to be looked at by someone else.

I'll see if I can do that tonight.

In the meantime I have 90% of a patch to show cute little icons for
locations where we have GPS data. (where "cute" is supposed to mean
"Dirk designed the icon based on an existing open source icon and he
thinks that your eyes won't immediately start to bleed")
I just ran out of time last night to clean this up, so I'll push it out
when I have some time tonight.

> But the "zoom fixes position under mouse pointer" works.

Excellent. Now I need to figure out how to do the special case for the
dive site map. Somthing like "if the center is the current dive spot,
then zoom around the center, otherwise zoom around the pointer"

Thanks

/D


More information about the subsurface mailing list