Re: [Potlatch-dev] Ooops

2011-03-11 Thread Andy Allan
On Fri, Mar 11, 2011 at 9:01 AM, Andy Allan  wrote:
> On Fri, Mar 11, 2011 at 8:44 AM, Ed Loach  wrote:
>> I created this way yesterday by mistake:
>> http://www.openstreetmap.org/browse/way/103531496/history
>> Is this a known issue, or should I report it in trac?
>
> It should be reported to trac, but it's best if you get some steps to 
> reproduce.
>
> But I've just spend two secs investigating, and it's quite easy to reproduce.
> * Start drawing from an existing node.
> * Pause for a second
> * Click the same node again.
>
> Voila, the way ends as is the same node twice, e.g.
> http://api06.dev.openstreetmap.org/browse/way/201780
>
> I'll make some investigations. It doesn't happen if you're just
> starting a new way.

OK, I've fixed this and I'm pretty sure it works[1]. However, the
DrawWay.as logic is getting ever-more complex and I think the nested
if-then-else loops can probably be refactored to make things clearer.
I'm loathe to refactor them until we get some unit tests since there's
a surprisingly large number of things you can do when drawing!

Cheers,
Andy

[1] It'll need deploying at some point when the sysadmins get a chance.

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


Re: [Potlatch-dev] MapCSS clarificiation

2011-03-11 Thread Steve Bennett
On Sat, Mar 12, 2011 at 12:04 AM, Andy Allan  wrote:
> Rules are parsed in order and applied in order - it's the way that CSS
> works too. Later rules can override ones set earlier.

Normal CSS also has some rules about specificity though, right?

banner.h3 { background: red; }

h3 { background: blue; }

The background of an h3 element in a div with class 'banner' is red.

Does (or will) MapCSS have anything like that?

Steve

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


Re: [Potlatch-dev] MapCSS clarificiation

2011-03-11 Thread Andy Allan
On Fri, Mar 11, 2011 at 12:41 PM, Serge Wroclawski  wrote:
> I have a question about MapCSS.
>
> This may end up being moot, because the implementation may drive the
> standard,

There's multiple implementations, and some of them are much more
advanced than Halcyon is.

> way[highway=primary]  color: red; ...
>
> way[name=Main Street] ... color: blue; ...
>
> Which rule would apply to the street?

Blue

> More importantly (since that queation can be tested), which is the right 
> answer?

Rules are parsed in order and applied in order - it's the way that CSS
works too. Later rules can override ones set earlier.

Cheers,
Andy

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


[Potlatch-dev] MapCSS clarificiation

2011-03-11 Thread Serge Wroclawski
I have a question about MapCSS.

This may end up being moot, because the implementation may drive the
standard, but is MapCSS first match, or last match?

Eg. Given a primary road named "Main Street", and these to rules:

way[highway=primary]  color: red; ...

way[name=Main Street] ... color: blue; ...

Which rule would apply to the street?

More importantly (since that queation can be tested), which is the right answer?
I didn't see this question addressed in
http://wiki.openstreetmap.org/wiki/MapCSS/Implementation

Thanks,

- Serge

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


Re: [Potlatch-dev] Ooops

2011-03-11 Thread Andy Allan
On Fri, Mar 11, 2011 at 8:44 AM, Ed Loach  wrote:
> I created this way yesterday by mistake:
> http://www.openstreetmap.org/browse/way/103531496/history
> Is this a known issue, or should I report it in trac?

It should be reported to trac, but it's best if you get some steps to reproduce.

But I've just spend two secs investigating, and it's quite easy to reproduce.
* Start drawing from an existing node.
* Pause for a second
* Click the same node again.

Voila, the way ends as is the same node twice, e.g.
http://api06.dev.openstreetmap.org/browse/way/201780

I'll make some investigations. It doesn't happen if you're just
starting a new way.

Cheers,
Andy

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


[Potlatch-dev] Ooops

2011-03-11 Thread Ed Loach
I created this way yesterday by mistake:
http://www.openstreetmap.org/browse/way/103531496/history
Is this a known issue, or should I report it in trac? 

I can't exactly remember how I did it - I had intended to select a
way to add a maxspeed tag, but selected a node by mistake. Or maybe
double clicked it by mistake. Not sure exactly. The node itself had
at the time a created_by=JOSM tag on it in case that is relevant,
though of course saving my changes removed it.

The build in the changeset tags reports as 0.5-291-g0c68ba6

Thanks

Ed


___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev